<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Curtis,</div><div class=""><br class=""></div><div class="">Super helpful feedback. Thanks for the tips on leveraging the newest OME stuff.</div><div class=""><br class=""></div>Re: Problem 1 - Did some debugging. As you already know, the scifio-bf-compat dependency is pulling in the formats-api-5.0.7.jar artifact which contains some crucial classes for all this. Critical to matching a file with an appropriate reader is the loci.formats.ImageReader class which has a static method (getDefaultReaderClasses()) that should populate a cache of readers based on the readers.txt file (short example snippet in listing #1). As you can see from the snippet, the readers are expected to be contained within the loci.formats.in package. During population of this cache, each attempt to load a class listed in the file is met with a ClassNotFoundException. In confirmation of this, when I look in that package within the formats-api-5.0.7.jar artifact, none of these readers exist. Thus, the cache of readers does not get populated and Scifio is not able to match my file with any reader. Seems like this is the issue, right? However, it would seem like this would affect almost ANY proprietary format, which tells me I am likely doing something weird if this hasn't come up yet in feedback from others. <div class=""><br class=""><div class="">Suggestions? I re-downloaded the artifact directly from <a href="http://maven.imagej.net" class="">maven.imagej.net</a> again to check. I change the extension to zip and looked in the corresponding folder and did not find any of the readers I would expect.<div class=""><br class=""></div><div class="">%%%%%%%%%%%%%%</div><div class="">Listin #1 - short snippet of readers.txt file.</div><div class="">%%%%%%%%%%%%%%</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Monaco;" class=""># standalone readers with unique file extensions</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;" class="">loci.formats.in.PGMReader # pgm</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;" class="">loci.formats.in.FitsReader # fits</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;" class="">loci.formats.in.PCXReader # pcx</div><div style="margin: 0px; font-size: 11px; font-family: Monaco;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Monaco;" class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Mar 3, 2015, at 11:28 AM, Curtis Rueden <<a href="mailto:ctrueden@wisc.edu" class="">ctrueden@wisc.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Jay,<div class=""><br class=""></div><div class=""><div class="">> I thought it used to be automatic upon adding the scifio and</div><div class="">> scifio-bf-compat dependencies.</div></div><div class=""><br class=""></div><div class="">Yeah, that's correct.</div><div class=""><br class=""></div><div class=""><div class="">> A "limited" list of 30 formats show up in the DefaultFormatService</div><div class="">> currently and don't include ND2.</div></div><div class=""><br class=""></div><div class="">The format that supports ND2 (and all Bio-Formats formats) is the "Bio-Formats Compatibility Format" at the front of your list.</div><div class=""><br class=""></div><div class="">You'll need to debug into the code to find out why the BioFormatsFormat is not being selected properly for your ND2 file.</div><div class=""><br class=""></div><div class=""><div class="">> It looks like the parent pom of scifio-bf-compat (pom-scijava)</div><div class="">> specifies <bio-formats.version>5.0.7</bio-formats.version>.</div><div class="">> Is it likely to be "risky" to leverage the most recent changes</div><div class="">> for ND2 compatibility?</div></div><div class=""><br class=""></div><div class="">Yes, it will not work. The scifio-bf-compat component has not yet been updated to use the Bio-Formats 5.1.x codebase.</div><div class=""><br class=""></div><div class="">The good news is: updating it to use the OME 5.1 API was easy. I pushed a branch:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/scifio/scifio-bf-compat/compare/ome-5.1" class="">https://github.com/scifio/scifio-bf-compat/compare/ome-5.1</a></div><div class=""><br class=""></div><div class="">You can use it during development by:</div><div class=""><br class=""></div><div class="">* Cloning scifio-bf-compat.</div><div class="">* Switching to the ome-5.1 branch.</div><div class="">* Importing scifio-bf-compat into your Eclipse.</div><div class="">* Setting your project's bio-formats.version property to 5.1.0-SNAPSHOT.</div><div class="">* Setting your project's scifio-bf-compat.version property to 1.11.1-SNAPSHOT.</div><div class=""><br class=""></div><div class="">And then Eclipse should switch to a project coupling for scifio-bf-compat and use the branch.</div><div class=""><br class=""></div><div class="">But you'll want to stay on a corresponding branch of your own project development until the OME 5.1.0 release.</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Curtis</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Mar 3, 2015 at 10:42 AM, Jay Warrick <span dir="ltr" class=""><<a href="mailto:jay.w.warrick@gmail.com" target="_blank" class="">jay.w.warrick@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">Hi All,</div><div class=""><br class=""></div><div class="">I have 2 problems you all hopefully have suggestions for... (thanks in advance)</div><div class=""><br class=""></div><div class=""><b class="">Problem 1:</b></div><div class=""><br class=""></div>I'm interested in opening ND2 file format programmatically in Java via a SCIFIO object used with an ImageJ context but can't seem to get it to work. (see listing A) Error message indicates format not found.<div class=""><div class=""><br class=""></div><div class="">Hopefully relevant details of what I am currently doing with maven imports are below. (see listing B)</div><div class=""><br class=""></div><div class="">Suggestions? Is there a BioFormats dependency I am not bringing in that is necessary to expose/discover all the additional proprietary formats or do I have to add the proprietary formats myself using a combination of a bioformats artifact I'm not aware of and adding each format using the mechanism provided by scifio-bf-compat? I thought it used to be automatic upon adding the scifio and scifio-bf-compat dependencies. Any help is appreciated. I looked in scifio tutorials but couldn't figure it out. Sorry.</div><div class=""><br class=""></div><div class=""><b class="">Problem 2:</b></div><div class=""><br class=""></div><div class="">After resolution of problem 1, I'd like to leverage recent changes to the bioformats package that addresses a bug in ND2 metadata handling that was affecting me (<a href="https://trac.openmicroscopy.org.uk/ome/ticket/12548" target="_blank" class="">https://trac.openmicroscopy.org.uk/ome/ticket/12548</a>). The link suggests using bioformats 5.1.x vs 5.0.x which also requires use a few other updated jars (as noted near end of ticket). Suggestions on the best way to do this given my use case? It looks like the parent pom of scifio-bf-compat (pom-scijava) specifies <bio-formats.version>5.0.7</bio-formats.version>. Is it likely to be "risky" to leverage the most recent changes for ND2 compatibility?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">Jay</div><div class=""><br class=""></div><div class="">%%%%%%%%%%%%%</div><div class="">Listing A</div><div class="">%%%%%%%%%%%%%</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;font-family:Monaco" class=""><span style="color:rgb(147,26,104)" class="">final</span> SCIFIO scifio = <span style="color:rgb(147,26,104)" class="">new</span> SCIFIO(<span style="color:rgb(3,38,204)" class="">ij</span>.getContext());</div><div style="margin:0px;font-size:11px;font-family:Monaco" class="">Reader reader;</div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(147,26,104)" class="">try</div><div style="margin:0px;font-size:11px;font-family:Monaco" class="">{</div><div style="margin:0px;font-size:11px;font-family:Monaco" class=""><span style="white-space:pre-wrap" class=""> </span>reader = scifio.initializer().initializeReader(nd2File, <span style="color:rgb(147,26,104)" class="">new</span> SCIFIOConfig().checkerSetOpen(<span style="color:rgb(147,26,104)" class="">true</span>));</div><div style="margin:0px;font-size:11px;font-family:Monaco" class="">}</div><div style="margin:0px;font-size:11px;font-family:Monaco" class=""><span style="color:rgb(147,26,104)" class="">catch</span> (Exception e)</div><div style="margin:0px;font-size:11px;font-family:Monaco" class="">{</div><div style="margin:0px;font-size:11px;font-family:Monaco" class=""><span style="white-space:pre-wrap" class=""> </span>e.printStackTrace();</div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(147,26,104)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span>return<span style="" class=""> </span>false<span style="" class="">;</span></div><div style="margin:0px;font-size:11px;font-family:Monaco" class="">}</div></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><div class="">%%%%%%%%%%%%%</div><div class="">Listing B</div><div class="">%%%%%%%%%%%%%</div></div><div class=""><br class=""></div><div class="">My project parent pom is </div><div class=""><br class=""></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="color:#009193" class=""><span style="white-space:pre-wrap" class=""> </span><</span>parent<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""><</span>groupId<span style="color:#009193" class="">></span><span style="" class="">net.imagej</span><span style="color:#009193" class=""></</span>groupId<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""><</span>artifactId<span style="color:#009193" class="">></span><span style="" class="">pom-imagej</span><span style="color:#009193" class=""></</span>artifactId<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""><</span>version<span style="color:#009193" class="">></span><span style="" class="">5.12.0</span><span style="color:#009193" class=""></</span>version<span style="color:#009193" class="">></span></div><div class=""><span style="font-family:Monaco;font-size:11px" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="font-family:Monaco;font-size:11px;color:rgb(0,145,147)" class=""></</span><span style="color:rgb(78,145,146);font-family:Monaco;font-size:11px" class="">parent</span><span style="font-family:Monaco;font-size:11px;color:rgb(0,145,147)" class="">></span></div><div class=""><br class=""></div><div class=""> I have the following maven dependencies</div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="color:#009193" class=""><span style="white-space:pre-wrap" class=""> </span><</span>dependency<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""><</span>groupId<span style="color:#009193" class="">></span><span style="" class="">io.scif</span><span style="color:#009193" class=""></</span>groupId<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""><</span>artifactId<span style="color:#009193" class="">></span><span style="" class="">scifio</span><span style="color:#009193" class=""></</span>artifactId<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""></</span>dependency<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""><</span>dependency<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""><</span>groupId<span style="color:#009193" class="">></span><span style="" class="">io.scif</span><span style="color:#009193" class=""></</span>groupId<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""><</span>artifactId<span style="color:#009193" class="">></span><span style="" class="">scifio-bf-compat</span><span style="color:#009193" class=""></</span>artifactId<span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco" class=""><span style="white-space:pre-wrap" class=""> </span><span style="color:#009193" class=""><</span><span style="color:#4e9192" class="">scope</span><span style="color:#009193" class="">></span>runtime<span style="color:#009193" class=""></</span><span style="color:#4e9192" class="">scope</span><span style="color:#009193" class="">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="" class=""><span style="white-space:pre-wrap" class=""> </span></span><span style="color:#009193" class=""></</span>dependency<span style="color:#009193" class="">></span></div></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="font-family: Helvetica; font-size: 12px;" class="">A "limited" list of 30 formats show up in the DefaultFormatService currently and don't include ND2. (see Listing C)</span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><div style="font-family: Helvetica; font-size: 12px;" class="">%%%%%%%%%%%%%</div><div style="font-family: Helvetica; font-size: 12px;" class="">Listing C</div><div style="font-family: Helvetica; font-size: 12px;" class="">%%%%%%%%%%%%%</div></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="font-family: Helvetica; font-size: 12px;" class="">(*) Formats in DefaultFormatService</span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)" class=""><span style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin:0px" class=""><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px" class="">ImageJ ij = <span style="color:#931a68" class="">new</span> ImageJ();</div><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px" class="">Set<Format> <span style="text-decoration:underline" class="">formats</span> = ij.scifio().format().getAllFormats();</div><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px" class=""><br class=""></div><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px" class=""><span style="font-family: Helvetica; font-size: 12px;" class="">returns</span></div><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px" class=""><span style="font-family: Helvetica; font-size: 12px;" class=""><br class=""></span></div><div style="margin:0px" class="">[Bio-Formats Compatibility Format, Animated PNG, Audio Video Interleave, Windows Bitmap, DICOM, Encapsulated PostScript, Flexible Image Transport System, Simulated data, Graphics Interchange Format, Image Cytometry Standard, JPEG-2000, JPEG, Java source code, Multiple Network Graphics, Micro-Manager, NRRD, OBF, PCX, Portable Gray Map, Text, Zip, QuickTime, PICT, plugin:class io.scif.ome.formats.OMEXMLFormat, Tile JPEG, QuickTime, plugin:class io.scif.ome.formats.OMETIFFFormat, Tagged Image File Format, Minimal TIFF, Tagged Image File Format]</div><div style="margin:0px" class=""><br class=""></div><div style="margin:0px" class=""><br class=""></div></div></div></div></div><br class="">_______________________________________________<br class="">
ImageJ-devel mailing list<br class="">
<a href="mailto:ImageJ-devel@imagej.net" class="">ImageJ-devel@imagej.net</a><br class="">
<a href="http://imagej.net/mailman/listinfo/imagej-devel" target="_blank" class="">http://imagej.net/mailman/listinfo/imagej-devel</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></div></body></html>