[ITK] Using a nifticlib nifti_image object from within ITK

Ben Champion benjamin.champion.13 at ucl.ac.uk
Wed Jun 10 06:08:06 EDT 2015


Hi all,

Is there a way to use some existing code to handle nifticlib nifti_image 
objects in memory from within ITK, essentially treating them as 
instances of ITK::Image?

I've been given the task of interfacing some ITK(-based) code with some 
non-ITK(-based) code. The non-ITK code uses nifticlib nifti_image 
objects to represent image data. We would like the ITK code to 
manipulate this image data (in memory, without writing the images to 
disk each time - otherwise we could just use ITK's reader for NIFTI images).

I found the /Getting Started V: Integrating ITK in your Application/ 
<http://www.itk.org/CourseWare/Training/GettingStarted-V.pdf> slides 
very helpful: they seem to describe quite well how to pass image data 
between ITK and non-ITK code. However, the image orientation and other 
meta-data will need to be handled more or less manually, in general.

However, it looks like much of this same work is done by the 
itk::NiftiImageIO object, using nifticlib to read NIFTI images from 
disk, then turning the resulting nifti_image into an ITK::Image. 
However, I don't know how easy it would be to re-use this code in a 
sustainable way.

Thanks in advance,
Ben

-- 
EngD Doctoral Student
Centre for Medical Image Computing
University College London
Room 3.01 Engineering Front Building
Malet Place
London WC1E 7JE
United Kingdom

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150610/ea067820/attachment.html>


More information about the Community mailing list