Skip to content
Permalink
231559b97c
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
54 lines (43 sloc) 1.45 KB
/**
* Overlay CellProfiler ROIs.
*
* Uses ImageJ2 libraries whereever possible.
*/
import groovy.io.FileType // Recurse directories per http://stackoverflow.com/a/3954639
//import ij.io.Opener
//import io.scif.SCIFIO
import ij.plugin.FolderOpener
import io.scif.img.ImgOpener
import net.imglib2.img.display.imagej.ImageJFunctions
/** Path to project Git repo */
def prefix_project = "/share/Pariksheet/consultations/rnai-screen-tf"
/**
* Read a stack of raw images.
*
* @param plate name of the plate to match
* @param well name of the well in [A-P][01-24] format
*/
def open = { String plate, String well ->
def opener = new FolderOpener()
opener.run()
// Build a list of the relevant image files.
def dirBg = new File( "${prefix_project}/results/z_projection" )
def files = []
dirBg.eachFileMatch( FileType.FILES, ~/${plate}_${well}_.+/ ) {
files << it.name
}
paths = files.collect { "${dirBg}/${it}" }
//def imp = new Opener().openImage("${prefix}")
// Open the images as a stack per the scifio tutorial
// https://github.com/scifio/scifio-tutorials
//def scifio = new SCIFIO()
//def reader = scifio.initializer().initializeReader(paths[0])
//reader.getClass().getMethods().each {println it}
// Open using imglib2 ImgOpener() as described in wiki examples
// http://imagej.net/ImgLib2_Examples
def imgOpener = new ImgOpener()
def im = imgOpener.openImg( paths[0] )
//ImageJFunctions.show( im )
//println im
}
open("160415_015529-V", "C03")