[ome-users] Handling tiled images

Roger Leigh r.leigh at dundee.ac.uk
Wed Jul 31 10:27:10 BST 2013


On 30/07/2013 18:50, Robert Schuler wrote:
> I am having trouble figuring out how to handle large tiled images with Bio-Formats 5, OMERO 5, and ImageJ 2 (using Bio-Formats 5). The input format is Zeiss CZI coming from a new Zeiss Axio Scan.Z1.
>
> It seems in all cases to treat the tiles as any other series of images, and in my test image there are some 423 series. It could very well be that I don't know what I'm doing...
>
> In OMERO5, when uploading the image, it expands it to 423 images. Also, when trying to open any of those images, it says the image is corrupt, so maybe some trouble handling the pixel data.

It's possible, but whether this is a problem with Bio-Formats or OMERO
isn't possible to determine without having a sample image to investigate
further.  Would it be possible to upload an image demonstrating this
problem using http://qa.openmicroscopy.org.uk/qa/upload/ ?

> In ImageJ2, when importing using the loci tools plugin (release 5), it asks which of the 423 images I want to open. So I cannot really view the whole image this way.

This is a  limitation of the current OME data model, where tiles are
separate "images" in the XML, since each Image is essentially limited to
x/y/c/z/t dimensions.  However, each image does contain the positional
information which would enable a viewer to visualise the tiles together
as a whole; but I'm unaware of ImageJ currently being able to do that.
In the past, I've used the stitching plugin to stitch the separate
images into a single big image.

> With bfconvert, I've tried to convert to JPEG2000, and it does seem to convert one of the series of images to a standalone JPEG2000. Ideally, there would be a flag so that I could convert the whole image rather than individual tiles/series.

You should be able to convert the whole lot in one go using the "%s"
parameter, e.g.

   bfconvert input.czi output-%s.tiff

which will give you

   output-1.tiff
   output-2.tiff
   ...
   output-n.tiff

for each series.  This can be combined with %z/%t/%c (for z, time,
channel) and others if you want one image per tile, one image per stack,
or whatever fits your needs.

> With bfconvert, converting to JPEG fails:
>
> ./bfconvert ~/cirm/ip-test-file.czi ~/ip-test-file.jpg
> /Users/schuler/cirm/ip-test-file.czi
> ZeissCZIReader initializing /xxx/xxx/cirm/ip-test-file.czi
> Unknown IlluminationType value 'Fluorescence' will be stored as "Other"
> Unknown IlluminationType value 'Fluorescence' will be stored as "Other"
> Unknown IlluminationType value 'Fluorescence' will be stored as "Other"
> Unknown Immersion value 'Unknown' will be stored as "Other"
> Unknown Immersion value 'Unknown' will be stored as "Other"
> Unknown Immersion value 'Unknown' will be stored as "Other"
> [Zeiss CZI] -> /xxx/xxx/ip-test-file.jpg [JPEG]
> Exception in thread "main" loci.formats.FormatException: Unsupported image type 'uint16'.

> In the past, with non-tiled slides, I've been using the Bio-Formats API directly to read pixel data from one series, which worked for our tools because that was basically the whole image. With tiled images, does Bio-Formats have an API for reading in a tiled series of images AS IF it were just a single image? Or what's the recommended way to get the tiles out, and make sense of them?

In this particular case, your CZI image is using the uint16 pixel type.
  However, JPEG only supports uint8 which is why you're getting the
"unsupported pixel type" error here--it's not possible to convert
directly.  If you downsample the original image to use 8-bit channels
then conversion will be possible.  It doesn't look like you can do this
directly with bfconvert though.  TIFF would work as an alternative to JPEG.


Regards,
Roger

--
Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364

The University of Dundee is a registered Scottish Charity, No: SC015096




More information about the ome-users mailing list