[Insight-users] pointer to image data
barbababa
tonimuusimaki at gmail.com
Mon Jul 18 16:44:40 EDT 2011
Hello all,
i can assign a pointer to my image data as follows:
float *img_data = reinterpret_cast<float *>(
img.get_image_data().get_data() );
Now how could i define an ITK image, which points to this same data?
This works at build time but not on runtime:
typedef itk::Image<float, 2> ImageType;
ImageType *image = reinterpret_cast<ImageType*>(
img.get_image_data().get_data() );
ImageType::Pointer myImage = image;
I think the problem is in the <ImageType*> but i don't know how to get
past it!
Any Ideas?
Thanks!
--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/pointer-to-image-data-tp6596336p6596336.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list