[Insight-users] forcing pipeline to update

Jakub Bican jakub.bican at matfyz.cz
Tue Jun 28 14:20:47 EDT 2005


Thank you Zach,

that's it i think - i will try it as soon as possible.

The problem was, when i did not change the resample filter itself, but 
the transform, that was set to the filter once at the start of algorithm.

I haven't been examining the FFTW filter problem since i reported it, 
and i am using the filter everydays with the "update preceding filter 
manually" hack. Has someone tested it on any other platforms than my VC7?

Regards,
	Jakub


Zachary Pincus napsal(a):
> Hi Jakub,
> 
> Calling filter->Modified() tells a filter that it is no longer up to date.
> 
> The setter macros that most ITK classes use to set member variables 
> (itkSetMacro, etc., defined in itkMacro.h) are clever and only call 
> this->Modified() if they have set a member variable to a *new* value. So 
> when you set the parameters to a value that is the same as the old 
> value, Modified() never gets called. Doing it manually should solve your 
> problem.
> 
> The bigger problem, of course, is the bizarrely broken behavior of the 
> FFT filter that you reported earlier. Have you (or anyone else?) gotten 
> any closer to figuring out the problem?
> 
> Zach Pincus
> 
> Department of Biochemistry and Program in Biomedical Informatics
> Stanford University School of Medicine
> 
> 
> On Jun 28, 2005, at 2:21 AM, Jakub Bican wrote:
> 
>>
>> 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
>>
>> _______________________________________________
>> 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