[SCIFIO] reuse reader for files of same format

Mark Hiner hinerm at gmail.com
Tue Aug 27 09:54:01 CDT 2013


Hi all,

 This was an issue with ReaderFilters specifically not catching all of the
magic that happens when setting the source on a Reader. Fixed & tested as
of
https://github.com/scifio/scifio/commit/fa5c4993ca429fe427378134f6cb480057fda332

- Mark


On Mon, Aug 26, 2013 at 1:14 PM, Mark Hiner <hinerm at gmail.com> wrote:

> Should be fixed on master. Let me know if you run into any more issues
> reusing readers though.
>
>
> On Mon, Aug 26, 2013 at 8:02 AM, Mark Hiner <hinerm at gmail.com> wrote:
>
>> See Issue 57 <https://github.com/scifio/scifio/issues/57>
>>
>>
>> On Mon, Aug 26, 2013 at 7:53 AM, Mark Hiner <hinerm at gmail.com> wrote:
>>
>>> Hi Michael,
>>>
>>>   This definitely should work. The Metadata attached to a Reader should
>>> determine the image dimensionality, and the Metadata should be re-parsed
>>> automatically when setting the source.
>>>
>>>  Oh.. but looking at the source, the PNG reader has state (it remembers
>>> the last plane it read. So if the reader was stateless (which it's supposed
>>> to be) it should work. I'll just have to make a pass through the formats
>>> and remove any state from the readers, or if that's not possible I'll make
>>> sure they reset properly when calling setSource.
>>>
>>> Thanks for pointing this out,
>>> Mark
>>>
>>>
>>> On Mon, Aug 26, 2013 at 7:13 AM, Michael Zinsmaier <
>>> michael.zinsmaier at gmx.de> wrote:
>>>
>>>> Hi together,
>>>>
>>>> is it possible to use the same reader for multiple files of the same
>>>> format?
>>>> I want to read e.g. 10  .png files that may differ in their
>>>> dimensionality but use all the same format and encoding can I reuse a
>>>> reader instead of doing the potentially expensive format tests for each
>>>> file. We tried it naively with reader.setSource which somehow works but
>>>> dimensionality and size data is not rediscovered => the reader tries to
>>>> load all images with the same size.
>>>>
>>>> Is their a better way to do this?
>>>> (We still want to use the format discovery for the first image but
>>>> assume for all others that they have the same format.)
>>>>
>>>> Best Regards Michael
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://scif.io/pipermail/scifio/attachments/20130827/3352b231/attachment-0002.html>


More information about the SCIFIO mailing list