[Insight-users] Pipeline and ReleaseDataFlagOn().

Michal Postrozny sandarak at wp.pl
Mon Jun 6 10:50:26 EDT 2005


Hello James,

Thank you for explenation. Now it's much clearer for me.


Regards

Michal Postrozny

> When you call ReleaseDataFlagOn() on a filter, it sets a flag
> on the filter's OUTPUT that the data is to be release when requested.

> The filter finishes executing, it runs through its INPUTS and 
> checks if to see if any of the inputs are marked for release. If they
> are marked, the bulk data (pixel data) is freed.

> In your example, there is no filter after the RegionOfInterestFilter,
> so its OUTPUT will be available.  This image is still marked for
> release, so if you later pass it to another filter, that filter 
> will free that memory.

> A reasonable practise is to call ReleaseDataFlagOn() on all your
> filters EXCEPT the last one.

> Jim



> -----Original Message-----
> From: insight-users-bounces+millerjv=crd.ge.com at itk.org
> [mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of
> Michal Postrozny
> Sent: Monday, June 06, 2005 5:48 AM
> To: insight-users at itk.org
> Subject: [Insight-users] Pipeline and ReleaseDataFlagOn().


> Hello,

> I have a question regarding releasing filter data in pipeline.

> Let's have a pipeline like this:

ImageFileReader ->> RegionOfInterestImageFilter -> my_Image

> If I set:

ImageFileReader->>ReleaseDataFlagOn();
> RegionOfInterestImageFilter->ReleaseDataFlagOn();

> I assume that after calling

> RegionOfInterestImageFilter->Update()

> my_Image is not pointing to any data, so calling any filter with
> my_Image as input parameter will casue an exception.

> Is this true or am I completely wrong?


> Thanks in advance

> Michal Postrozny



> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list