<div dir="ltr">Hi Jay,<div><br></div><div><div>> I thought it used to be automatic upon adding the scifio and</div><div>> scifio-bf-compat dependencies.</div></div><div><br></div><div>Yeah, that's correct.</div><div><br></div><div><div>> A "limited" list of 30 formats show up in the DefaultFormatService</div><div>> currently and don't include ND2.</div></div><div><br></div><div>The format that supports ND2 (and all Bio-Formats formats) is the "Bio-Formats Compatibility Format" at the front of your list.</div><div><br></div><div>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><br></div><div><div>> It looks like the parent pom of scifio-bf-compat (pom-scijava)</div><div>> specifies <bio-formats.version>5.0.7</bio-formats.version>.</div><div>> Is it likely to be "risky" to leverage the most recent changes</div><div>> for ND2 compatibility?</div></div><div><br></div><div>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><br></div><div>The good news is: updating it to use the OME 5.1 API was easy. I pushed a branch:</div><div><br></div><div><a href="https://github.com/scifio/scifio-bf-compat/compare/ome-5.1">https://github.com/scifio/scifio-bf-compat/compare/ome-5.1</a></div><div><br></div><div>You can use it during development by:</div><div><br></div><div>* Cloning scifio-bf-compat.</div><div>* Switching to the ome-5.1 branch.</div><div>* Importing scifio-bf-compat into your Eclipse.</div><div>* Setting your project's bio-formats.version property to 5.1.0-SNAPSHOT.</div><div>* Setting your project's scifio-bf-compat.version property to 1.11.1-SNAPSHOT.</div><div><br></div><div>And then Eclipse should switch to a project coupling for scifio-bf-compat and use the branch.</div><div><br></div><div>But you'll want to stay on a corresponding branch of your own project development until the OME 5.1.0 release.</div><div><br></div><div>Regards,</div><div>Curtis</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 10:42 AM, Jay Warrick <span dir="ltr"><<a href="mailto:jay.w.warrick@gmail.com" target="_blank">jay.w.warrick@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi All,</div><div><br></div><div>I have 2 problems you all hopefully have suggestions for... (thanks in advance)</div><div><br></div><div><b>Problem 1:</b></div><div><br></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><div><br></div><div>Hopefully relevant details of what I am currently doing with maven imports are below. (see listing B)</div><div><br></div><div>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><br></div><div><b>Problem 2:</b></div><div><br></div><div>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">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><br></div><div>Thanks,</div><div><br></div><div>Jay</div><div><br></div><div>%%%%%%%%%%%%%</div><div>Listing A</div><div>%%%%%%%%%%%%%</div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="color:rgb(147,26,104)">final</span> SCIFIO scifio = <span style="color:rgb(147,26,104)">new</span> SCIFIO(<span style="color:rgb(3,38,204)">ij</span>.getContext());</div><div style="margin:0px;font-size:11px;font-family:Monaco">Reader reader;</div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(147,26,104)">try</div><div style="margin:0px;font-size:11px;font-family:Monaco">{</div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="white-space:pre-wrap">        </span>reader = scifio.initializer().initializeReader(nd2File, <span style="color:rgb(147,26,104)">new</span> SCIFIOConfig().checkerSetOpen(<span style="color:rgb(147,26,104)">true</span>));</div><div style="margin:0px;font-size:11px;font-family:Monaco">}</div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="color:rgb(147,26,104)">catch</span> (Exception e)</div><div style="margin:0px;font-size:11px;font-family:Monaco">{</div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="white-space:pre-wrap">    </span>e.printStackTrace();</div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(147,26,104)"><span style="color:rgb(0,0,0)"><span style="white-space:pre-wrap"> </span></span>return<span style="color:rgb(0,0,0)"> </span>false<span style="color:rgb(0,0,0)">;</span></div><div style="margin:0px;font-size:11px;font-family:Monaco">}</div></div><div><br></div><div><br><div><div>%%%%%%%%%%%%%</div><div>Listing B</div><div>%%%%%%%%%%%%%</div></div><div><br></div><div>My project parent pom is </div><div><br></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#009193"><span style="white-space:pre-wrap">  </span><</span>parent<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">            </span></span><span style="color:#009193"><</span>groupId<span style="color:#009193">></span><span style="color:#000000">net.imagej</span><span style="color:#009193"></</span>groupId<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">             </span></span><span style="color:#009193"><</span>artifactId<span style="color:#009193">></span><span style="color:#000000">pom-imagej</span><span style="color:#009193"></</span>artifactId<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">               </span></span><span style="color:#009193"><</span>version<span style="color:#009193">></span><span style="color:#000000">5.12.0</span><span style="color:#009193"></</span>version<span style="color:#009193">></span></div><div><span style="font-family:Monaco;font-size:11px"><span style="white-space:pre-wrap">  </span></span><span style="font-family:Monaco;font-size:11px;color:rgb(0,145,147)"></</span><span style="color:rgb(78,145,146);font-family:Monaco;font-size:11px">parent</span><span style="font-family:Monaco;font-size:11px;color:rgb(0,145,147)">></span></div><div><br></div><div> I have the following maven dependencies</div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#009193"><span style="white-space:pre-wrap">                </span><</span>dependency<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">                        </span></span><span style="color:#009193"><</span>groupId<span style="color:#009193">></span><span style="color:#000000">io.scif</span><span style="color:#009193"></</span>groupId<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">                        </span></span><span style="color:#009193"><</span>artifactId<span style="color:#009193">></span><span style="color:#000000">scifio</span><span style="color:#009193"></</span>artifactId<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">           </span></span><span style="color:#009193"></</span>dependency<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">              </span></span><span style="color:#009193"><</span>dependency<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">                       </span></span><span style="color:#009193"><</span>groupId<span style="color:#009193">></span><span style="color:#000000">io.scif</span><span style="color:#009193"></</span>groupId<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">                        </span></span><span style="color:#009193"><</span>artifactId<span style="color:#009193">></span><span style="color:#000000">scifio-bf-compat</span><span style="color:#009193"></</span>artifactId<span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco"><span style="white-space:pre-wrap">                   </span><span style="color:#009193"><</span><span style="color:#4e9192">scope</span><span style="color:#009193">></span>runtime<span style="color:#009193"></</span><span style="color:#4e9192">scope</span><span style="color:#009193">></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:#000000"><span style="white-space:pre-wrap">                </span></span><span style="color:#009193"></</span>dependency<span style="color:#009193">></span></div></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">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)"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">%%%%%%%%%%%%%</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Listing C</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">%%%%%%%%%%%%%</div></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">(*) Formats in DefaultFormatService</span></div><div style="margin:0px;font-size:11px;font-family:Monaco;color:rgb(78,145,146)"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div><div style="margin:0px"><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px">ImageJ ij = <span style="color:#931a68">new</span> ImageJ();</div><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px">Set<Format> <span style="text-decoration:underline">formats</span> = ij.scifio().format().getAllFormats();</div><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px"><br></div><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">returns</span></div><div style="color:rgb(78,145,146);font-family:Monaco;font-size:11px;margin:0px"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></span></div><div style="margin:0px">[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"><br></div><div style="margin:0px"><br></div></div></div></div></div><br>_______________________________________________<br>
ImageJ-devel mailing list<br>
<a href="mailto:ImageJ-devel@imagej.net">ImageJ-devel@imagej.net</a><br>
<a href="http://imagej.net/mailman/listinfo/imagej-devel" target="_blank">http://imagej.net/mailman/listinfo/imagej-devel</a><br>
<br></blockquote></div><br></div>