[Insight-users] pointer to image data

Julien Lamy lamy at unistra.fr
Wed Jul 20 03:12:39 EDT 2011


Le 19/07/2011 23:24, barbababa a écrit :
> HI!
> 
> I managed to get this work by just putting the pointer to my image data as
> the first
> argument of the SetImportPointer. Great.
> But now i am stuck with the opposite: how to attach the pointer of my image
> to the pointer
> of the output of some ITK filter.
> 
> This produces just empty images:
> 
> //this is the pointer to my image
> float *image_data  = reinterpret_cast< float*>
> (image.get_image_data().get_data());
> 
> // input is the output of some ITK filter
> image_data  = reinterpret_cast<float *> (input->GetBufferPointer()) ;
> 
> Any ideas??!
> I tried a whole lot of similar approaches but in vain...

You will need to show a bit more code : can you create a minimal example
producing this behavior (for example with just an itk::ImageFileReader) ?


More information about the Insight-users mailing list