[ITK-users] [ITK] region of interest size problem
Dženan Zukić
dzenanz at gmail.com
Mon Jul 18 15:15:19 EDT 2016
Hi Oscar,
if you want to copy part of the image, and have the rest be filled with
zeroes, you should:
1. create a new image
2. copy information from the source image
3. set regions using source's region
4. allocate(true)
5. use PasteImageFilter
<https://itk.org/Doxygen/html/classitk_1_1PasteImageFilter.html> to copy
a portion of source to the new image
Does this answer your question?
Regards,
Dženan
On Mon, Jul 18, 2016 at 3:01 PM, Oscar Cuadros Linares <ocuadrosl at gmail.com>
wrote:
> Hi Dženan Zukić
>
> Thank you for your reply.
> I know that a 3D input produces a 3D output. I will try to explain better
> my issue.
> I have a 3D image and I want to get to a ROI (200x200x100 size) from that
> image.
> But the output image has to keep the original information, especially the
> region size.
> (400x400x550 in my case). The problem is that the output image is
> 200x200x100 size
> and not 400x400x550 like the input image.
>
> Thank you so much.
> Oscar
>
>
>
> On Sat, Jul 16, 2016 at 10:52 AM, Dženan Zukić <dzenanz at gmail.com> wrote:
>
>> Hi Oscar,
>>
>> the output dimension is the same: 3D input produces 3D output, 2D input
>> produces 2D output etc. But the point of RoI filter is to get an image
>> which is only a part of the input image, and in that respect the filter is
>> working correctly. What did you expect to happen? If you want only part of
>> the image be processed, set its RequestedRegion to something smaller than
>> LargestPossibleRegion.
>>
>> Regards,
>> Dženan
>>
>> On Fri, Jul 15, 2016 at 6:04 PM, Oscar Cuadros Linares <
>> ocuadrosl at gmail.com> wrote:
>>
>>> Hi Guys
>>>
>>> I am trying to extract a region of interest (ROI) from a 3D tomography
>>> I am using the filter "itkRegionOfInterestImageFilter.h". The issue is
>>> that the filter changes the original size of the input image.
>>> According the documentation, the output image has the same
>>> dimension of the input image. But size of the output image
>>> is the size of the selected region (ROI).
>>> My code is based on this example:
>>>
>>> https://itk.org/Wiki/ITK/Examples/ImageProcessing/RegionOfInterestImageFilter
>>>
>>> Thank you for your suggestions
>>> Oscar
>>>
>>> _____________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.php
>>>
>>> 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://public.kitware.com/mailman/listinfo/insight-users
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/mailman/listinfo/community
>>>
>>
>>
>
>
> --
> Oscar Cuadros Linares
> Computer Science
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160718/49a43b5f/attachment.html>
More information about the Insight-users
mailing list