Access to loci.formats.tools.TiffComment
Posted: Tue Nov 27, 2018 3:21 pm
Hi, I'm writing a MATLAB function `bfTiffComment.m` that'll help verification and editing of OME-XML metadata.
bfTiffComment.m
https://github.com/ome/bio-formats-tool ... idate.java
In this function, in order to get access to `loci.formats.tools.TiffComment`class, which is the main part, I relied on `bfCheckJavaPath`.
It works, but I realized that it does not work with ImageJ-MATLAB. When launching ImageJ-MATLAB, the jar files in `Fiji.app\jars`are added to MATLAB dynamic Java class path. This includes `formats-bsd-5.9.2.jar'`. Looking into this jar file by Java decompiler, this jar file contains the `loci.formats.tools` package, but the `loci.formats.tools` does not contain `TiffComment` or `XMLvalidate` class.
`bfCheckJavaPath` apparently cannot handle this properly. So, when I call `loci.formats.tools.TiffComment`class, I get an error.
Why the Bio-Formats for Fiji is designed in this way? Why only some of the classes are missing from `loci.formats.tools`package in `formats-bsd-5.9.2.jar`?
More practically, is there a workaround for this for us to use ImageJ-MATLAB and `loci.formats.tools.TiffComment` at the same time?
Best,
Kouichi
bfTiffComment.m
https://github.com/ome/bio-formats-tool ... idate.java
In this function, in order to get access to `loci.formats.tools.TiffComment`class, which is the main part, I relied on `bfCheckJavaPath`.
It works, but I realized that it does not work with ImageJ-MATLAB. When launching ImageJ-MATLAB, the jar files in `Fiji.app\jars`are added to MATLAB dynamic Java class path. This includes `formats-bsd-5.9.2.jar'`. Looking into this jar file by Java decompiler, this jar file contains the `loci.formats.tools` package, but the `loci.formats.tools` does not contain `TiffComment` or `XMLvalidate` class.
`bfCheckJavaPath` apparently cannot handle this properly. So, when I call `loci.formats.tools.TiffComment`class, I get an error.
Why the Bio-Formats for Fiji is designed in this way? Why only some of the classes are missing from `loci.formats.tools`package in `formats-bsd-5.9.2.jar`?
More practically, is there a workaround for this for us to use ImageJ-MATLAB and `loci.formats.tools.TiffComment` at the same time?
Best,
Kouichi