[ome-devel] Some trouble with RGB image export and import
Alexander Görtz
ome at nyloc.de
Fri Sep 18 16:22:24 BST 2015
Hi David,
> I just wanted to provide you with an update on the issue you reported.
> We have been able to confirm the issue is related to C++ version of bio
> formats and are currently investigating a fix.
Nice to hear that you found the issue. As an additional input I would like to
provide my workaround I used to test RGB images in the C++ lib.
I converted a 512x512x1x1000x3 lsm file with bfconvert -merge to a ome.tif
image. I was expecting to get a 512x512x1x1000x1x3 file with 1 channel and 3
subchannels (RGB) but in stead I got a 512x512x1x1000x3x3 file so three
channels with each three subchannels (RGB) and all three channels contain the
same RGB image. That file could be properly processed with the c++ lib, so not
problem there in general. Even tho I'm not sure if I hit another bug with
bfconvert ;).
A small bug I also encountered with bfconvert is that if I use the -range
option with i.E. bfconvert -range 4001 6000 the progress percentages are
computed wrong. It gives me something like:
bfconvert -range 4001 6000 input.czi /tmp/output.tif
[Zeiss CZI] -> /tmp/output.tif [Tagged Image File Format]
Converted -3970/2000 planes (-198%)
Converted -3928/2000 planes (-196%)
Converted -3885/2000 planes (-194%)
Converted -3842/2000 planes (-192%)
Converted -3799/2000 planes (-189%)
Have a nice weekend,
Alex
PS: Had to send again as I used the wrong from address.
> Hi Alexander ,
>
> I just wanted to provide you with an update on the issue you reported.
> We have been able to confirm the issue is related to C++ version of bio
> formats and are currently investigating a fix. We will provide a further
> update for you next week.
>
> With Thanks,
> David Gault
>
> OME Software Developer
>
> ________________________________________
> From: ome-devel <ome-devel-bounces at lists.openmicroscopy.org.uk> on behalf of
> Alexander Görtz <ome at nyloc.de> Sent: 16 September 2015 12:00
> To: ome-devel at lists.openmicroscopy.org.uk
> Subject: [ome-devel] Some trouble with RGB image export and import
>
> Hi,
>
> I new to the list and developing with the Bioformats library but on my way I
> came across some problems that for now I was able to solve on my one or
> with the help of the very friendly #ome irc channel at freenode. But this
> one seems to be a bit harder to solve ;)
>
> My motivation for the following scenario was that I'm currently concerned
> with the task of analyzing microscopy images with the OpenCV library for
> integration into a bigger C++ based software. In my current use case I only
> have non RGB channels which made the conversion from the bioformats
> PixelBuffer to a OpenCV Mat quiet easy, but I wanted to test how RGB data
> is handled in the C++ library. So I tried to create a RGB OME TIFF image
> from a simple RGB jpg I downloaded from the net
> (http://nyloc.de/public/test.jpg).
> For that I used ImageJ and the command line bfconvert function to create a
> .ome.tif image (http://nyloc.de/public/test.ome.tif).
> With the c++ library I can read the metadata and the results look ok
> (http:// paste.pound-python.org/show/KjrtdMefBfzgqAr3ZH5M/) and don't
> differ from the results given by showinf
> (http://paste.pound-python.org/show/
> LmzoDQ7j4vryhmtTs5VM/)
> But ImageJ shows different meta data if I import the RGB OME TIFF image
> (https://dpaste.de/ROip)
> The image opened by ImageJ shows 3 channels but each channel seems to
> contain the entire RGB image not only a single color as the isRGB false
> would suggest.
>
> And if I try to open the image data with the OMETIFFReader::openBytes
> function it crashes with
> terminate called after throwing an instance of
> 'ome::bioformats::tiff::Exception'
> what(): TIFFReadEncodedStrip: 2720: Strip out of range, max 2160
>
> This was checked with bioformats 5.14 and 5.13 and mtbc from the IRC also
> mentioned that the "Bio-Formats remote importer [...] complain that there
> are 18768 bits per sample".
>
> If you need any more information to clear this up I would be happy to
> provide them.
>
> Sincerely
> Alex (nyloc)
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
Am Friday 18 September 2015, 14:11:51 schrieb David Gault:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20150918/9cb58ddd/attachment.asc>
More information about the ome-devel
mailing list