Page 1 of 1

Extracting channels from multichannel .tif images

PostPosted: Wed Jun 03, 2015 10:04 am
by PhilippeP
We are developing a Java in-house application to handle our high-throughput images. All images have multiple channels, are generated through MicroManager, and are stored in OMERO as multichanel .tif images.
Our computer people need to set up a function to allow us to have a view of a cell of interest (isolated following image processing) either in channel 1, or channel 2, or channel x, or a merge of chosen channels.
However, they are not familiar with multichannel images, and do not know how to "call" a single channel from the multichannel images stored in OMERO (and whose URL are known, of course).
Do they have to download the multichannel first and then extract the channel of interest (how?), or can they directly add some code (which one?) to only download the selected chanel(s) from the OMERO image URL ?
Thanks!
Philippe.

Re: Extracting channels from multichannel .tif images

PostPosted: Fri Jun 05, 2015 8:51 am
by bramalingam
Hi,

Since you're building a java application,
Please look into the following documentation page for the OMERO Java bindings,
https://www.openmicroscopy.org/site/sup ... /Java.html

Specifically please look into,

Raw data access
Retrieve a given plane.
This is useful when you need the pixels intensity.
Code: Select all
//To retrieve the image, see above.
PixelsData pixels = image.getDefaultPixels();
int sizeZ = pixels.getSizeZ();
int sizeT = pixels.getSizeT();
int sizeC = pixels.getSizeC();
long pixelsId = pixels.getId();
RawPixelsStorePrx store = entryUnencrypted.createRawPixelsStore();
store.setPixelsId(pixelsId, false);
for (int z = 0; z < sizeZ; z++) {
  for (int t = 0; t < sizeT; t++) {
    for (int c = 0; c < sizeC; c++) {
      byte[] plane = store.getPlane(z, c, t);
      //Do something
    }
  }
}
store.close();


Hope that helps.
Please let us know if you need more information.

Best,
Balaji

Re: Extracting channels from multichannel .tif images

PostPosted: Wed Jun 17, 2015 7:51 am
by PhilippeP
We'll have a look into that!
Thanks,
Philippe.