[ITK-users] Conversion of itk::Image to other formats

Lambert Zijp ljzijp at gmail.com
Thu Mar 10 09:56:36 EST 2016


Dear itk users,
I'm new to itk and also not very proficient in C++...
I want to try some deformable registration methods implemented in itk, and
need to convert my own format of images and volumes to itk, and back.
For conversion to itk, I use 'ImportImageFilter', because I do not want to
make a copy of the pixels/voxels.
Converting itk images and volumes back to my own format, is giving me a
headache; I'm confused about 'Image', SmartPointer and ConstPointer and
template stuff.
Could you get me started by suggesting me a function prototype?

Something like:
int ItkToMyFormat(MyFormat** ppMyFormat, itk::Image* pItkImage);

The ItkImage can be any pixeltype, any dimension, and vector images should
also be accepted by the conversion routine. In that conversion function,
and need to be able to put a switch on pixeltype and number of dimensions.

Greetings,
Lambert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20160310/0c237d52/attachment.html>


More information about the Insight-users mailing list