Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# ./parade.test number_of_datasets number_of_images /ouput/directory /where/is/your/OMERO -s omero.server.address -u user.name -w password
NUMBER_OF_DATASETS=$1
NUMBER_OF_IMAGES=$2
OUTPUT_DIR=$3
OMERO_HOME=$4
OMERO_ARGUMENTS="${@:5}"
PROJECT_NAME="Parade.Test"
@emilroz
emilroz / TiledWriter.java
Last active January 19, 2017 13:55
Basic ome.tif tile writer
public void dummyTiledTiff(
String directory, String imageName)
throws DependencyException, ServiceException,
FormatException, IOException
{
Integer sizeX = 1024;
Integer sizeY = 1024;
Integer sizeC = 4;
Integer bpp = 2;
Integer tileSizeX = 256;
@emilroz
emilroz / Create_mask.py
Created January 18, 2016 12:47
Create masks in OMERO.
import omero
from omero.rtypes import rint, rdouble
from omero.gateway import ColorHolder
from omero.gateway import BlitzGateway
import numpy
import struct
import math
@emilroz
emilroz / getImageListFromPlate.m
Last active August 29, 2015 14:15
Retrieve a list of image ids contained in a plate.
function well_list_return = ...
getImageListFromPlate(session, plate_id)
% GETIMAGELISTFROMPLATE retrieves a list of image ids belonging to plate id.
%
% well_list_return = getImageListFromPlate(session, plate_id)
% returns 3D array of Image ID of size (# of columns, # of rows, # of
% fields)
%
% author: Emil Rozbicki <[email protected]
% Copyright (C) 2015 Glencoe Software, Inc.
@emilroz
emilroz / check_thumbnails.py
Last active August 29, 2015 14:11
Check for permission issues with thumbnails.
'''
Copyright (C) 2014 Glencoe Software, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@emilroz
emilroz / update_image_names.py
Last active August 29, 2015 14:10
Script shows how to change file names after import. Custom filter are used to select images of interest.
'''
Copyright (C) 2014 Glencoe Software, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
@emilroz
emilroz / downloadOriginalFiles
Last active August 29, 2015 14:08
Download Original Files belonging to the fileset (OMERO)
function downloadedFileList = ...
downloadOriginalFiles(session, imageId, folder, chunkSize)
% DOWNLOADORIGINALFILES downloaded original files assosiated with the Image.
%
% downloadedFileList = getFilePaths(session, image_id, folder, chunkSize)
% returns list of paths to downloaded files.
%
% author: Emil Rozbicki <[email protected]
% Copyright (C) 2014 Glencoe Software, Inc.
% All rights reserved.
@emilroz
emilroz / CMakeLists.txt
Last active August 29, 2015 14:08
Example use of Bio-formats CPP library
cmake_minimum_required(VERSION 2.8)
project(test_bio)
set(CMAKE_PREFIX_PATH "/usr/local/lib/cmake/;${CMAKE_PREFIX_PATH}")
set(CMAKE_MODULE_PATH "/usr/local/lib/cmake/;${CMAKE_MODULE_PATH}")
find_package(ome-bioformats REQUIRED)
include_directories(${OME_BIOFORMATS_INCLUDE_DIR})
MESSAGE(STATUS "OME BIOFORMATS: " ${OME_BIOFORMATS_INCLUDE_DIR})
@emilroz
emilroz / getOriginalMetadata.m
Created November 5, 2014 12:42
Retrieve Original Metadata from OMERO using MATLAB toolbox
function [global_metadata, series_metadata] = ...
getOriginalMetadata(client, session, image_id)
% GETORIGINALMETADATA Retrieves the global and the series orignal metadata.
%
% author: Emil Rozbicki <[email protected]
% Copyright (C) 2014 Glencoe Software, Inc.
% All rights reserved.
%
% Redistribution and use in source and binary forms, with or without
% modification, are permitted provided that the following conditions are met: