[Insight-users] forcing pipeline to update
Jakub Bican
jakub.bican at matfyz.cz
Tue Jun 28 05:21:10 EDT 2005
Hello,
i have a short pipeline - two filters: ResampleImageFilter followed by
FFTWRealToComplexConjugateImageFilter.
I am using it to compute different transforms of the same data:
1) connect the pipeline, set input to the resample filter
2) loop:
A) change the transform in resample filter according to the loop
variable i
B) set up the output parameters of resmaple filter
(origin,spacing,size)
C) UpdateLargestPossibleRegion() of resample filter
D) UpdateLargestPossibleRegion() of fourier filter
E) store the transformed data and disconnect it:
transformedData[i] = fourierFilter->GetOutput();
transformedData[i]->DisconnectPipeline();
3) end loop
* step C is neccessary due to some bug in fourier filter that i reported
some weeks ago (otherwise fourier filter fails)
* step B is not usually neccessary - but sometimes i use different
parameters for each transformed version
The problem is, that if the parameters of the resample filter do not
change in step B, then step C does not process anything and immediately
terminates without having updated resample filter's output.
I suppose this behavior is expectable, because resample filter has no
reason to update its output ("input and any parameters else than
something inside of the transform did not change"), but i need to force
it to compute.
The only solution i thought of is resetting and reconnecting the
pipeline, but i don't like it very much. Please, if anyone knows any
clear solution how to force the filter or pipeline to update even if it
is up-to-date, let me know.
Thank you very much in advance.
Cheers,
Jakub
More information about the Insight-users
mailing list