[Insight-users] Filter and SetRequestedRegion
Luis Ibanez
luis.ibanez at kitware.com
Sat Mar 11 18:13:19 EST 2006
Hi Arnaud,
You may want to look at the following filters:
1) ExtractImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ExtractImageFilter.html
2) RegionOfInterestImageFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html
Regards,
Luis
---------------------
Arnaud Garcia wrote:
> Hi all,
>
> Is there a simple filter in ITK that take image with a RequestedRegion ?
>
> I did a simple filter by implemented the GenerateData methods, but now I
> want to set a BoundingBox so I set a RequestedRegion in my InputImage
> but the requestedImage region is lost in my GenerateDate (the
> requestedRegion is replaced by the LargestPossibleRegion !) ...
>
> I also overide the GenerateInputRequestedRegion and
> EnlargeOutputRequestedRegion as below but no change ... I still lost my
> RequestedRegion of my InputImage in my Filter ...
>
>
> thanks,
> Arnaud
>
>
> ---------------------------------------------------------------------
> GenerateInputRequestedRegion ()
> {
> Superclass::GenerateInputRequestedRegion ();
> if (this->GetInput ())
> {
> InputImagePointer image = const_cast < InputImageType *
> >(this->GetInput ());
> // image->SetRequestedRegionToLargestPossibleRegion ();
> image->SetRequestedRegion( image->GetRequestedRegion());
> }
>
> :EnlargeOutputRequestedRegion (DataObject * output)
> {
> Superclass::EnlargeOutputRequestedRegion (output);
> //output->SetRequestedRegionToLargestPossibleRegion ();
> this->GetOutput()->SetRequestedRegion(
> this->GetOutput()->GetRequestedRegion() );
>
>
>
> _______________________________________________
> 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