[Insight-developers] ImageIO Streaming

Hans Johnson hans-johnson at uiowa.edu
Mon Jul 2 15:42:15 EDT 2007


Luis,

I fully support removing the CanStreamRead method.
Hans

-- 
Hans J. Johnson, Ph.D.
Hans-johnson at uiowa.edu

278 GH
The University of Iowa
Iowa City, IA 52241
(319) 353 8587


> From: kent williams <norman-k-williams at uiowa.edu>
> Date: Mon, 02 Jul 2007 09:35:48 -0500
> To: Insight Developers <insight-developers at itk.org>
> Conversation: [Insight-developers] ImageIO Streaming
> Subject: Re: [Insight-developers] ImageIO Streaming
> 
> Interesting -- I just wrote an image viewer that accepts image data through
> a socket for debugging purposes.  I was thinking about using ImageIO to
> stream through the socket.  Not only would this provide metadata along with
> the image pixels, it would give you the image pixel type conversions
> transparently.
> 
> The real problem I saw with the existing ImageIO classes is that they
> generally read the header information in one pass, and the image data in a
> second.  The ImageIO classes are also public, so it's possible to get a
> handle on them and call their methods directly.
> 
> Some ImageIO classes also use lseek or seekg to jump around the file, which
> won't work so well with a stream.  Of course, any file format that is spread
> across multiple files wouldn't make any sense.
> 
> 
> On 7/2/07 9:26 AM, "Luis Ibanez" <luis.ibanez at kitware.com> wrote:
> 
>> Hi Hans, Doug,
>> 
>> After looking closely at the API required for Streaming the
>> readers, it seems redundant to have the CanStreamRead() method
>> along with the DetermingStreamableRegionFromRequestedRegion()
>> method.
>> 
>> I suggest we get rid of the first one, and simply call the
>> second one.  When a reader cannot stream, it will simply return
>> the LargestPossibleRegion as the Streamable region.
>> 
>> This is an unused API, so we shouldn't have any backward
>> compatibility issues by removing the unused method.
>> 
>> Please let me know if you see any reason for keeping the
>> CanStreamRead() method.
>> 
>> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list