[Insight-developers] RequestedRegion are modified when calling itk filters

Karthik Krishnan Karthik.Krishnan at kitware.com
Tue Mar 14 17:01:01 EST 2006


What I meant was: what if I want to put the filter in a pipeline and 
just have my application run on an interactive user chosen VOI. I would 
need to use crop filters etc ?
It could run the separable gaussian filters on the requested region 
instead of the whole region.

If I did want it to run on the whole image, I could always say: 
UpdateLargestPossibleRegion().  But there is no way I can have it update 
on just a defined image region.

-karthik

Luis Ibanez wrote:

>
> Hi Arnaud,
>
> The Recursive Gaussian image filter needs the entire image as
> input because it is implemented using IIR separable filters.
>
> IIR filters have infinite support and therefore cannot be
> computed using pieces of the image.  A better understanding
> of this implementation can be gained by looking at how it
> is expressed in the Z transform space.
>
>
> You may want to read the report by Rachid Deriche:
>
> "Recursively Implementing The Gaussian and Its Derivatives",
> INRIA, 1993,
> ftp://ftp.inria.fr/INRIA/tech-reports/RR/RR-1893.ps.gz
>
>
> Where these filters were originally proposed.
>
>
>
>
>    Regards,
>
>
>
>        Luis
>
>
> ------------------------
> Karthik Krishnan wrote:
>
>>
>>
>> Arnaud Garcia wrote:
>>
>>> Hi itk developers,
>>>
>>> It seems that most itk filters change the RequestedRegion when 
>>> calling them ...
>>> Some filters overide  the GenerateInputRequestedRegion with  
>>> something like:
>>>
>>> SetRequestedRegion( input->GetLargestPossibleRegion() );
>>>
>>>
>>>
>>> => So if you set your requested region and call such filters you 
>>> have to set it again after calling theses filters ...
>>>
>>> is it right ?
>>>
>> Yes. This is the expected behaviour since if you use such a filter in 
>> a pipeline and the filter needs the whole input to process, it must 
>> make such a request to those filters on its upstream. That said, such 
>> a request will not be propagated downstream. For instance if you use
>>
>> A --> B --> C
>> and B needs the whole input to process.
>>
>> C->SetRequestedRegion( ... )
>> C->Update();
>>
>> This should set the requested regions of A's input and B's input to 
>> the whole image, but C's input's requested region should stay unchanged.
>>
>> That said, there are a good number of filters that require the whole 
>> input to process, either because they do, or in some cases the filter 
>> is not well written to handle them.
>>
>> For instance RecursiveSeparableGaussianFilter: I am not sure why the 
>> filter must make an assumption that it requires the entire input. It 
>> doesn't sound reasonable. Maybe the others have something to say 
>> about it.
>>
>> -karthik
>>
>>> thanks for answer,
>>>
>>> Arnaud
>>>
>>> _______________________________________________
>>> Insight-developers mailing list
>>> Insight-developers at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk.org
>> http://www.itk.org/mailman/listinfo/insight-developers
>>
>>
>
>


More information about the Insight-developers mailing list