[Insight-users] release data flags for composite filters
Luis Ibanez
luis.ibanez at kitware.com
Sun Oct 1 15:57:18 EDT 2006
Hi Jakub,
Sorry, it doesn't happen automatically.
The propagation of the release data flag is something that
the developer of the filter must carefully consider.
You may have to pass the ReleaseDataFlag of the composite
filter to the internal filters, and you probably only
want to pass it to some of them. It all depends on how do
you consider that is safe to release the memory of intermediate
results inside your filter.
Note that you could also overload the "SetReleaseDataFlag()"
method, so that only when it is called in your semi-composite
filter it propagates to your internal filters, (in a way that
you must define according to how your mini-pipeline work)
Regards,
Luis
------------------
Kuba Bican wrote:
>
> Hi,
>
> i have a semi-composite filter that executes several internal filters
> during its GenerateData(). The semi-composite means, that the output of
> the internal pipeline is not grafted to the output of the composite
> filter, but is somehow processed by the composite filter and then
> normally written to the output as if the composite filter was common
> ImageToImageFilter.
>
> The question is - should i manage "ReleaseDataFlag" and
> "ReleaseDataBeforeUpdateFlag" somehow?
> Should there be something like:
>
> internalFilter->SetReleaseDataFlag( this->GetReleaseDataFlag() );
> ----------------the similar for BeforeUpdateFlag-----------------
>
> at the beginning of GenerateData() or GenerateInput/OutputInformation()
> or wherever?
>
> Or does it happen somehow automatically? ;))
>
> Thanks,
>
> Jakub
> _______________________________________________
> 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