[Insight-users] Streaming and memory allocation

Jarek Sacha galicjan at yahoo . com
Wed, 5 Jun 2002 09:25:45 -0700 (PDT)


Will:

Thanks for the document. It was quite helpful in understanding the basics
of how streaming in ITK works. I am trying to create a very simple
application that reads an image and just writes it out, since this a basis
for anything else to work. Looks that I need to start from the end of the
pipeline. First implement a StreamingImageFileWriter (extend
ImageFileWriter using StreamingImageFilter as an example) and add
streaming support to concrete ImageIO class that is used for writing. Then
go up the pipeline and verify proper streaming support.
StreamingImageFilter, as an object, seems to be of limited help since it
does not stream down the pipeline.

Thanks for you help,

Jarek

--- Will Schroeder <will.schroeder@kitware.com> wrote:
> I have sent a preliminary pdf document; let me know if anyone else wants
> a 
> peek.
> Will
> 
> At 07:31 AM 6/5/2002 -0700, Jarek Sacha wrote:
> >I am trying to figure out how streaming works in ITK and write some
> >streaming applications. I see how a 'RequestedRegion' can be pulled
> >through a pipeline during processing (StreamingImageFilter).
> >
> >I have problem figuring out, however, what is the process of allocating
> >the memory for streaming. Memory allocation is critical since in most
> >streaming applications you want to do processing using amount of memory
> >that is a fraction of the size of the image that is being process. For
> >instance, I want to do processing on an image that is 6GB while my RAM
> is
> >only 1GB.
> >
> >Here are some issues that I see as roadblocks of proper memory
> allocation
> >or as my lack of understanding what is going on:
> >
> >1) Image objects tend to allocate memory for the LargestPossibleRegion
> >rather then BufferedRegion, see ImageBase< >::UpdateOutputInformation()
> >
> >2) ImageFileReader<>::GenerateOutputInformation() forces allocation of
> >memory buffer equal to input image size.
> >
> >3) Allocation is performed during GenerateOutputInformation, which is
> >before information about RequestedRegion is pushed up the pipeline
> >
> >4) StreamingImage filter does not overwrite GetInputRequestedRegion,
> >rather this method is called from ImageToImageFilter and in turn from
> >ProcessObject that calls an all inputs
> >SetRequestedRegionToLargestPossibleRegion()
> >
> >Could somebody give me some clues how memory allocation for streaming
> >works?
> >
> >Jarek
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Yahoo! - Official partner of 2002 FIFA World Cup
> >http://fifaworldcup.yahoo.com
> >_______________________________________________
> >Insight-users mailing list
> >Insight-users@public.kitware.com
> >http://public.kitware.com/mailman/listinfo/insight-users
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com