Re: [base] genepix 6.0/6.1, multi-image tif-s, spot finding,
Chad Matsalla wrote: Nicklas wrote: Nice work! It seems like you have spent some time on this. I certainly have. JAI isn't exactly intuitive. No, it isn't. Do you have some code and/or images that can be useful for us? I certainly do. I basically check to see if the user provided one and only one image and if so call 'loadMultiImageTiff' with the indices of the desired images: (in SpotImages.mergeColorImages()) : HashMapString,RenderedOp images = loadMultiTiff(red,index_635,index_532); sourceImages[0] = images.get(635); sourceImages[1] = images.get(532); This means nothing to me. Exactly where is this code located? Where can I find the loadMultiTiff() method? Does it still work if you have separate images for the two channels? For the code to be useful I need something I can put in and compile without having to redo things that you probably already have done. A diff would probably work. I'll clean up my code this weekend. Would you like me to send you a diff of some sort? I wrote a Test class based on yours and heavily altered (in parts) SpotImages.java. I certainly have data I can 'lend' you for testing (please email for a url). I'll also ask the Molecular Devices people for a dataset that we can put into the svn for testing.[1] It would be nice to have an image and some raw data with it. It doesn't have to be a complete file. Remove all headers (except those needed for the spot image creation) if you like. We have a locked repository for test data that we aren't allowed to share. I think that adding parameters for which image to use in a multi-image TIFF should be easy to implement. This can be done earliest at the 2.4 release. Great. Another point: The 'zip' that contains spot images isn't a zip. It looks like a zip, but this[2] is what I see when I try to open it in osx. Can you provide a hint as to how to open it? It seems like you are right. All programs I have tried to use also fail to open the zip file. I know that it has worked before so something is probably broken, except that Java seems to not have the same problems. /Nicklas - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject unsubscribe to [EMAIL PROTECTED]
Re: [base] genepix 6.0/6.1, multi-image tif-s, spot finding,
Nice work! It seems like you have spent some time on this. Do you have some code and/or images that can be useful for us? The image and data we have access to are from Genepix 4.1. I think that adding parameters for which image to use in a multi-image TIFF should be easy to implement. This can be done earliest at the 2.4 release. /Nicklas Chad Matsalla wrote: Greetings! I've been troubleshooting a problem that exists when trying to use images generated by Genepix 6.0/6.1 as images for spots. Genepix generates a single, multi-image, 16 bit greyscale TIFF. It's composition is as follows: Index Description 1 635 preview (495x1396 pixels) 2 532 preview (495x1396 pixels) 3 635 image (1884x5472 pixels) 4 523 image (1884x5472) The image offsets and scales are found in the .gpr file that Genepix creates. I used those numbers to try to use the single-image tiff for spots but most of the time it failed with an exception that I described in previous posts: java.lang.ClassCastException: [[B at com.sun.media.jai.opimage.BandMergeOpImage.shortLoop(BandMergeOpImage.java:3 41) Once in a while, though, it would succeed but the spots would be tiny in the images. This is because BASE2 is using indices 1 and 2 for the images in a multi-image tiff. In the case of GenePix 6.0/6.1 these are preview images. If you select 'Export Images' in Genepix 6.0/6.1 it does not do what you expect. I would expect that it would run it's own version of tiffsplit and generate two 16-bit greyscale tiffs. It actually creates two RGB images with 8 bits in the appropriate colour channel - red or green. These images cannot be imported into BASE (they provide the same exception as above). The reason why this exception is so mysterious can be balmed on JAI. IN core/net/sf/basedb/core/SpotImages.java the method In private RenderedOp loadTiffImage(File file, int band) executes this: RenderedOp image = JAI.create(tiff, params); For the single-image tiffs described above, this call returns the equivalent of an empty image: (PlanarImage[minX=0 minY=0 width=0 height=0 tileGridXOffset=0 tileGridYOffset=0 tileWidth=0 tileHeight=0 sampleModel=null colorModel=null]) It's my opinion that this should somehow throw an exception either through JAI or have this condition be trapped by BASE because, well, the call CLEARLY failed. Can a developer have this throw an exception? It would make image parsing problems MUCH easier to find. RIGHT! Let's return to the problem of the images. As a user of Genepix, I cannot change it's exporting behavior. However, when I use 'tiffsplit' on the commandline to split the GenePix multi-image tiff and import each image (full-size, not preview) into BASE2 separately everything works. This implies that there is not a fundamental problem with the individual GenePix images (as found in the multi-image tiff). BASE1 had a feature in 'Create Spot Images' that allowed you to specify: 'Index of ch1 TIFF' 'Index of ch2 TIFF' Can you please bring back this feature in BASE2? In the meantime I will modify our local copy to do this without prompting. Thanks for your efforts! Chad Matsalla Plant Biotechnology Institute, National Research Council of Canada Saskatoon, Saskatchewan, Canada - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject unsubscribe to [EMAIL PROTECTED] - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject unsubscribe to [EMAIL PROTECTED]
[base] genepix 6.0/6.1, multi-image tif-s, spot finding,
Nicklas wrote: Nice work! It seems like you have spent some time on this. I certainly have. JAI isn't exactly intuitive. Do you have some code and/or images that can be useful for us? I certainly do. I basically check to see if the user provided one and only one image and if so call 'loadMultiImageTiff' with the indices of the desired images: (in SpotImages.mergeColorImages()) : HashMapString,RenderedOp images = loadMultiTiff(red,index_635,index_532); sourceImages[0] = images.get(635); sourceImages[1] = images.get(532); I'll clean up my code this weekend. Would you like me to send you a diff of some sort? I wrote a Test class based on yours and heavily altered (in parts) SpotImages.java. I certainly have data I can 'lend' you for testing (please email for a url). I'll also ask the Molecular Devices people for a dataset that we can put into the svn for testing.[1] I think that adding parameters for which image to use in a multi-image TIFF should be easy to implement. This can be done earliest at the 2.4 release. Great. Another point: The 'zip' that contains spot images isn't a zip. It looks like a zip, but this[2] is what I see when I try to open it in osx. Can you provide a hint as to how to open it? Thanks! Chad Matsalla Plant Biotechnology Institute, National Research Council of Canada Saskatoon, Saskatchewan, Canada [1] I can't do that with these images - their content is proprietary. [2] chad$ file 20th.zip 20th.zip: Zip archive data, at least v2.0 to extract chad$ zip -v ... This is Zip 2.3+CAN-2004-1010 (November 29th 1999), by Info-ZIP. ... chad$ unzip 20th.zip Archive: 20th.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of 20th.zip or 20th.zip.zip, and cannot find 20th.zip.ZIP, period. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject unsubscribe to [EMAIL PROTECTED]
[base] genepix 6.0/6.1, multi-image tif-s, spot finding,
Greetings! I've been troubleshooting a problem that exists when trying to use images generated by Genepix 6.0/6.1 as images for spots. Genepix generates a single, multi-image, 16 bit greyscale TIFF. It's composition is as follows: Index Description 1 635 preview (495x1396 pixels) 2 532 preview (495x1396 pixels) 3 635 image (1884x5472 pixels) 4 523 image (1884x5472) The image offsets and scales are found in the .gpr file that Genepix creates. I used those numbers to try to use the single-image tiff for spots but most of the time it failed with an exception that I described in previous posts: java.lang.ClassCastException: [[B at com.sun.media.jai.opimage.BandMergeOpImage.shortLoop(BandMergeOpImage.java:3 41) Once in a while, though, it would succeed but the spots would be tiny in the images. This is because BASE2 is using indices 1 and 2 for the images in a multi-image tiff. In the case of GenePix 6.0/6.1 these are preview images. If you select 'Export Images' in Genepix 6.0/6.1 it does not do what you expect. I would expect that it would run it's own version of tiffsplit and generate two 16-bit greyscale tiffs. It actually creates two RGB images with 8 bits in the appropriate colour channel - red or green. These images cannot be imported into BASE (they provide the same exception as above). The reason why this exception is so mysterious can be balmed on JAI. IN core/net/sf/basedb/core/SpotImages.java the method In private RenderedOp loadTiffImage(File file, int band) executes this: RenderedOp image = JAI.create(tiff, params); For the single-image tiffs described above, this call returns the equivalent of an empty image: (PlanarImage[minX=0 minY=0 width=0 height=0 tileGridXOffset=0 tileGridYOffset=0 tileWidth=0 tileHeight=0 sampleModel=null colorModel=null]) It's my opinion that this should somehow throw an exception either through JAI or have this condition be trapped by BASE because, well, the call CLEARLY failed. Can a developer have this throw an exception? It would make image parsing problems MUCH easier to find. RIGHT! Let's return to the problem of the images. As a user of Genepix, I cannot change it's exporting behavior. However, when I use 'tiffsplit' on the commandline to split the GenePix multi-image tiff and import each image (full-size, not preview) into BASE2 separately everything works. This implies that there is not a fundamental problem with the individual GenePix images (as found in the multi-image tiff). BASE1 had a feature in 'Create Spot Images' that allowed you to specify: 'Index of ch1 TIFF' 'Index of ch2 TIFF' Can you please bring back this feature in BASE2? In the meantime I will modify our local copy to do this without prompting. Thanks for your efforts! Chad Matsalla Plant Biotechnology Institute, National Research Council of Canada Saskatoon, Saskatchewan, Canada - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject unsubscribe to [EMAIL PROTECTED]