[Insight-users] Restrict filter execution to certain region

Karthik Krishnan Karthik.Krishnan at kitware.com
Mon Apr 4 14:59:54 EDT 2005


Hi Jens,

It is possible.

If you have a chain of filters or let's say a filter2 which takes input from filter2 and you only want to process a region region2 from the output that filter1 generates,

//
//Define region2....which is a subset of filter1->GetLargestPossibleRegion
//

filter2->SetInput(filter1->GetOutput());
filter2->GetOutput()->SetRequestedRegion(region2);

Please also take a look at "How to write a filter" chapter of the SW Guide.

Thanks
regards
karthik

Jens Eickmeyer wrote:

>Hi!
>
>I want to restrict the execution of a filter or a chain of filters to
>a certain region of an image. I've not found any hints to functions to
>set the desired region? How can I do this? Is it even possible?
>
>Jens
>_______________________________________________
>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