[Insight-users] RequestedRegion and LargestPossibleRegion
Mathieu Malaterre
Mathieu . Malaterre at creatis . insa-lyon . fr
Fri, 23 May 2003 09:20:47 +0200
George,
I recall having posted the very same question:
http://www . itk . org/pipermail/insight-users/2003-February/002615 . html
There should also be some posts before this one that mention the fact
that FileWriter call UpdateWholeExtent so you have two options:
- Hack FileWriter and replace GetLargestPossibleRegion ->
GetRequestedRegion.
- Use PasteImageFilter:
http://www . itk . org/Doxygen/html/classitk_1_1PasteImageFilter . html
Good luck
mathieu
Iordanescu, Gheorghe (NIH/CC/DRD) wrote:
> Hello everybody,
>
>
>
> Here is my problem: I have a 3D data set (512x512x200) and I want to
> process only a very small part of it (lets say 100x100x30) and save the
> results as an image of the same dimensions (in pixels) as the input data
> (i.e 512x512x200). Since I am not concerned with the rest of the image,
> it could have any value (either the values of the input image or some
> constant value)
>
>
>
> What is the simplest way to process only a part of an image, but be able
> to save the whole image?
>
>
>
> Is there a way to fill the largest possible region of an image (of the
> output of a filter) with some default value?
>
> Should I use a blank image (filled with 0) of dimension 512x512x200 and
> add to it somehow only the small output of the filter? Should I use an
> iterator and fill only the non-filtered area of the image?
>
>
>
> Thank you,
>
>
>
> George
>
--
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www . creatis . insa-lyon . fr/~malaterre/