[Insight-developers] filter questions : Allocate() -> tcon

Luis Ibanez ibanez at cs.unc.edu
Fri Nov 10 10:22:16 EST 2000


Hi,

Could we include this topic in today's tcon ?

I'm having trouble with "GenerateData()"
allocating memory for the output image.

Thanks,

Luis


On Thu, 9 Nov 2000, Miller, James V (CRD) wrote:

> To clarify:
> 
> A filter's GenerateData() method is responsible for allocating the output pixel data.  The output
> object is allocated by the pipeline mechanism but the pixel data is not allocated until
> GenerateData() (i.e. GenerateData makes a call to outputPtr->Allocate()).
> 
> If you are writing a single threaded filter, then your filter provides the GenerateData() method and
> is responsible for calling Allocate().
> 
> If you are writing a multithreaded filter, then your filter provides the ThreadedGenerateData()
> method and the superclass object calls Allocate() automatically.
> 
> Jim
> 
> -----Original Message-----
> From: Luis Ibanez [mailto:ibanez at cs.unc.edu]
> Sent: Thursday, November 09, 2000 1:34 AM
> To: lng at statsci.com; insight-developers at public.kitware.com
> Subject: Re: [Insight-developers] filter questions
> 
> 
> Hi,
> 
> Lydia Ng wrote:
> >.....
> > 3) FilterImageBinary used to allocate memory for the output data
> >  in GenerateData(), it doesn't anymore. Why the change?
> >
> 
> I made that change  in response to the new needs of the execution
> model.
> 
> The allocation was done when we expected that the filter will
> receive an entire input image, and using its size, will be able
> to determine the size of the output image.  So the filter allocated
> this output memory before being executed.
> 
> Now with the streaming model.  The filters should not allocate the
> memory for the output image because the output is now imposed
> as a constrain.   The filter is now told to : "produce data for filling
> this particular region of the image", the filter should then determine
> how much input it needs for producing this output region.
> 
> So when the filter is executed, allocations should have already 
> been solved by... "someone else",  and my guess is that this 
> "someone else" is the superprocess controlling the setting of 
> image regions and activating the filters on each particular
> piece.
> 
> Please correct me if this is a wrong assumption...
> 
> Thanks 
> 
> Luis
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
> 





More information about the Insight-developers mailing list