[ITK] [ITK-users] Convert Matrix to itk::Image

Jim Miller millerjv at gmail.com
Sat Aug 30 08:23:20 EDT 2014


You pass the pointer to the pixels you want to ITK image to wrap. There is a Boolean in the methods to control whether ITK should manage the memory from that point forward (deleting the pixels when the ITK Image is destroyed) or whether you want your program to maintain control of that memory block and you will be carefule to ensure the buffer is freed at the appropriate time. 

Jim

> On Aug 30, 2014, at 6:16 AM, Marco Ulge <marco.ulge at gmail.com> wrote:
> 
> Hello,
> 
> I used the vnl_matrix_ref class to extract the matrix from the itk::Image
> and then perform some calculations. What i need to do now, is convert the
> matrix back to an itk::Image and i read that i should use the
> itkImportImageFilter class to achieve this. I am having difficulties
> understanding what should be my input to SetImportPointer method. Can anyone
> help me with this?
> 
> Regards,
> 
> Marco
> 
> 
> 
> --
> View this message in context: http://itk-users.7.n7.nabble.com/ITK-users-Convert-Matrix-to-itk-Image-tp34497.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> 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
_____________________________________
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



More information about the Community mailing list