[ome-devel] NDPISReader.isThisType
Sebastien Besson
s.besson at dundee.ac.uk
Thu Oct 23 21:19:23 BST 2014
Hi Lee,
You are right that this method always return true irrespective of the file contents for a few
reader (like NPISReaderr). While seeking the adapted reader, isThisType(RandomAccessInputStream)
is really called as part of isThisType(String name, boolean open). And these readers typically
correspond to file formats where we have no proper way to know whether the reader should be used
apart from the file extension.
Is there a reason not to call directly setId() which iterates through all readers. Catching a
loci.formats.UnknownFormatException exception would allow you to handle the case where no
suitable reader was found.
Best,
Sebastien
On 22 Oct 2014, at 16:53, Lee Kamentsky <leek at broadinstitute.org<mailto:leek at broadinstitute.org>> wrote:
Hi all,
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?
Thanks,
Lee
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
Dr Sébastien Besson
Open Microscopy Environment / Harvard Medical School
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK Tel: (01382) 386364
The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20141023/2e7a6c20/attachment.html>
More information about the ome-devel
mailing list