[Insight-users] How to restrict work region of filters

Luis Ibanez luis.ibanez at kitware.com
Mon Aug 28 12:46:03 EDT 2006



Hi Chris,


You can do it with the following Pipeline



          ImageToBeFiltered------------+
                  |                    |
                  |                    |
                  V                    |
    ExtractRegionOfInterestFilter      |
                  |                    |
                  |                    |
                  V                    |
            Your Filter                |
                  |                    |
                  |                    |
                  V                    |
           PasteImageFilter-<----------+



If you have concerns about memory, you can use
the PasteImageFilter as an InPlace filter. So
that the output image is using the same memory
buffer as the ImageToBeFiltered.

Just call the InPlaceOn() method on the Past
image filter. Please not that this only makes
sense if your filter uses the same pixel
type for the input and output images.



    Regards,



       Luis




--------------------------
niedermayr at trium.de wrote:
> Hi Luis!
> 
> 
>>Do you want to get as output only a subregion of the image ?
> 
> 
> no.
> 
> 
>>or do you want to get as output an image of the same size
>>as the original image, but where the filter has been
>>applied only to a subregion ?
> 
> 
> yes :)
> 
> greetz,
> chris
> 
> 
> 
>>---------------------------
>>Christoph Niedermayr wrote:
>>
>>>Hi!
>>>
>>>I hope i didn't miss this subject in the software guide...
>>>
>>>Is there a ITK-way to restrict a filter to a region of the image?
>>>I know i could run the filter on the (cropped) original and then create
>>>the desired image by combining original and filtered image.
>>>
>>>
>>>tia,
>>>chris
>>>
>>>
>>>
>>>
>>>_______________________________________________
>>>Insight-users mailing list
>>>Insight-users at itk.org
>>>http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>
>>
>>
> 
> 
> _______________________________________________
> 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