[Insight-users] Convert a set of 2D images to 3D

Luis Roberto P. Paula luisrpp at gmail.com
Mon Apr 20 23:18:39 EDT 2009


Hi Luis,

I'm a little confused on how to use the itkPasteImageFilter.

At first, I created the typedef:

typedef itk::PasteImageFilter< ImageType2D > PasteFilter2D;


Then:

   PasteFilter2D::Pointer paste2D = PasteFilter2D::New();

   // I'm lost in this part

   for (int i; i < VECTOR_SIZE; i++) {
      paste2D->SetInput( IMAGE2D_VECTOR[i] );
   }

How do I make the output of the paste2D be a 3D image?

Do I need to set to the destination image a 3D blank image?

The destination index affects the output?

I thought it would work like the add method of the std:vector class with an
output as a 3D image, but it seems that it can return an image with the same
dimension.

Thanks,
Luis

On Fri, Apr 17, 2009 at 3:36 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

>
> Hi Luis,
>
> Yes,
> the same should work for pasting 3D images into to 4D images.
>
>
>   Regards,
>
>
>      Luis
>
>
> ---------------------------
> Luis Roberto P. Paula wrote:
>
>> Thanks Luis!! This is a much better approach (itkPasteImageFilter).
>>
>> I guess it works the same way from 3D to 4D, right?
>>
>> Regards,
>> Luis
>>
>> On Thu, Apr 16, 2009 at 1:59 PM, Luis Ibanez <luis.ibanez at kitware.com<mailto:
>> luis.ibanez at kitware.com>> wrote:
>>
>>
>>    Hi Luis,
>>
>>    If your images are in individual 2D files, then
>>    you could simply use the ImageSeriesReader.
>>
>>    If your images are in an array of 2D images in
>>    memory, then you may want to use the Paste
>>    filter:
>>
>>       http://itk.org/Doxygen/html/itkPasteImageFilter_8h.html
>>
>>    You will have to call it multiple times...
>>    once per input slice.
>>
>>
>>       Regards,
>>
>>
>>           Luis
>>
>>
>>    ---------------------------
>>
>>    Luis Roberto P. Paula wrote:
>>
>>        Hi All,
>>
>>        I have a set of 2D images in axial orientation and I want to
>>        create a 3D volume with this images.
>>
>>        It would be de reverse operation of the class ExtractImageFilter.
>>
>>        Does anybody knows how to do it?
>>
>>        Thanks in advance,
>>        Luis
>>
>>
>>
>>  ------------------------------------------------------------------------
>>
>>        _____________________________________
>>        Powered by www.kitware.com <http://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
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090421/7bbc7b40/attachment.htm>


More information about the Insight-users mailing list