Open kferrari opened 6 years ago
Hi, is there any performance impact while using RawImgDummy instead of the regular reader for SI files?
Hi @pbl007
We haven't directly compared the two, but in my view there shouldn't be a major difference in performance. However, ScanImage writes a lot of information to the file header, and this information gets lost when importing via RawImgDummy
. This can be accounted for by creating a Metadata
object by hand and supplying the necessary parameters (please see this guide for more information).
Best, Kim
Got it! Thanks a lot. This looks like a very promising tool! Best Pablo
Looking deeper into the metadata issue. What will be the best approach for the CalibrationPixelSize' ? Should I create a
Dummy` obj for each combination of image size and zoom (as all zoom values obtain the same pixel size per the corresponding documentations)? It looks like the regular 'CalibrationPixelSize' object with measured values can suffice. Please be kind to clarify.
You should only need a single CalibrationPixelSize
per microscope/objective combination. You need to supply a vector of zoom values and their corresponding pixel sizes. Please look into this guide for more information. You can then use CalibrationPixelSize
's plot
function to look at the graphs for your calibration. When you're happy with it, save it to your drive and re-load it as needed.
Best, Kim
Hi @kferrari, regarding the original discussion, would you be interested in a PR that adds support for newer SI TIFs?
Regarding the new dependency issue, the MATLAB Tif
object, at least the one for versions 2019 and 2020, identifies the relevant metadata so it seems that ScanImage's own Tiff reader won't be necessary, at least not for these newer MATLAB versions. I don't have an older MATLAB version to check whether the older Tiff reader also parses that information successfully.
Hi @HagaiHargil, yes absolutely! Thanks a lot for the effort. I don't know yet how long it'll take me to review it, but it would definitely be a great enhancement. Thank you!
Allow import of images acquired in newer ScanImage versions than r3.8.
This may require adding ScanImageTiffReader library as downloadable utility. Unfortunately the reader isn't backwards-compatible. So we need at least two parsers for header information.
Also,
utils.scim.openTif()
gives some cryptic error messages when trying to load newer images because it tries to access libraries not supplied with CHIPS (line 177).utils.scim.openTif()
could, dependent on header information retrieved withhTif.getTag('ImageDescription')
, decide whether to use the newScanImageTiffReader()
or the oldparseHeader()
to parse header information. It then needs some sort of unifying to get them to the same structure.Until this is solved, loading ScanImage 2017 TIFF files with the general purpose RawImgDummy class works well.