<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Lee,
<div><br>
</div>
<div>You are right that this method always return true irrespective of the file contents for a few</div>
<div>reader (like NPISReaderr). While seeking the adapted reader, isThisType(RandomAccessInputStream)</div>
<div>is really called as part of <span class="nf">isThisType</span><span class="o">(</span><span class="n">String</span> <span class="n">name</span><span class="o">,</span> <span class="kt">boolean</span> <span class="n">open</span><span class="o">)</span>.
And these readers typically</div>
<div>correspond to file formats where we have no proper way to know whether the reader should be used</div>
<div>apart from the file extension.</div>
<div><br>
</div>
<div>Is there a reason not to call directly setId() which iterates through all readers. Catching a </div>
<div>loci.formats.UnknownFormatException exception would allow you to handle the case where no</div>
<div>suitable reader was found.</div>
<div><br>
</div>
<div>Best,</div>
<div>Sebastien</div>
<div><br>
<div>
<div>On 22 Oct 2014, at 16:53, Lee Kamentsky <<a href="mailto:leek@broadinstitute.org">leek@broadinstitute.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr">Hi all,
<div>I have some code that iterates through the Bio-Formats format readers, calling isThisType(RandomAccessInputStream) (as a last resort) to find a reader capable of reading a file format. The NDPISReader returns true irrespective of the file contents. Is
this correct? How can I determine which readers are the indiscriminately omnivorous ones?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Lee</div>
</div>
_______________________________________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk">ome-devel@lists.openmicroscopy.org.uk</a><br>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel<br>
</blockquote>
</div>
<br>
</div>
<br>
<br>
<div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>Dr Sébastien Besson</div>
<div>Open Microscopy Environment / Harvard Medical School</div>
<div>Wellcome Trust Centre for Gene Regulation and Expression,</div>
<div>College of Life Sciences, University of Dundee, Dow Street,</div>
<div>Dundee DD1 5EH Scotland UK Tel: (01382) 386364</div>
</div>
</span></div>
</span></span></div>
<br>
<br>
<span style="font-size:10pt;">The University of Dundee is a registered Scottish Charity, No: SC015096</span>
</body>
</html>