[Insight-users] Enlarge the image

Arturo Caissut arturo_caissut at tiscali.it
Wed Mar 11 20:15:18 EDT 2009


Hi,

I'm working on a VTK/ITK pipeline, and I just need to embed a itk 3D 
image inside of a larger one. I hope my question to be not as silly as I 
thought, but I'd appreciate very much some hint on the 
ImageRegionIterator approach you were suggesting some days ago: I'm 
quite new on ITK programming, and I cannot figure out how to set the 
needed offset.
Could you please send me a "raw" example of such an embedding process?

Thank you in advance,
Arturo Caissut



> kent williams wrote:
>> What you said, as it stands, makes no sense.  First of all, the
>> default behavior is to not to modify the input image at all. A new
>> image is generated. There are some special cases of 'in place' filters
>> that are supposed to change the input, because the input and output
>> are the same image.
>>
>> Second of all, if you resize an image, you're going to be resampling.
>>
>> What I think you mean is you either want to go from 2D to 3D (for
>> example), or embed an image unmodified inside a larger image.
>>
>> In the former case, you can use itk::CastImageFilter.  In the latter
>> case, it's more complicated.
>>
>> 1. Create and Allocate the larger output image.
>> 2. Use itk::ImageRegionIterators to copy from the original image into
>> the larger image at a particular offset.
>>
>> If you can clarify what you're trying to do we can provide a better 
>> answer.
>>
>> On Mon, Mar 9, 2009 at 1:13 PM, David Pastor 
>> <david.pastor at die.upm.es> wrote:
>>  
>>> Hello,
>>>
>>> I need to enlarge an image, change its size type to a bigger one 
>>> without
>>> modifying the content of the original one, so there is no rescaling. 
>>> Any
>>> direct filter for this?
>>>
>>> cheers
>>> david
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ITK FAQ at:
>>> http://www.itk.org/Wiki/ITK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>>     
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ITK FAQ at: 
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>   
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: 
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>



More information about the Insight-users mailing list