[Insight-users] Casting or accesing data from typedef float to just float

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 25 17:03:08 EDT 2009


Hi Bios5,


Please read the Tutorials

       http://www.itk.org/ITK/help/tutorials.html

in particular

   "Getting Started V: Integrating ITK in your Application."

http://www.itk.org/CourseWare/Training/GettingStarted-V.pdf


Your will find that you have multiple options for passing output
data from ITK into your application (Osirix plugin in this case).


You can:


   A) pre-allocate the output buffer and give it to the last
      ITK filter in the pipeline.


or


   B) Disconnect the output image of the last filter and
      Mummify its buffer, and then pass it to your application
      (in which case you become responsible for releasing the
       memory at some later time).



You will find descriptions of both methods in the tutorial above.


    Regards,


        Luis



------------------------
Bios5 wrote:
> Hello dear friends..
> 
> I came with a question to all of you, because I'm not really experienced
> with ITK, so let me explain my issue:
> 
> I'm working to do an OsiriX plugin, I hope somebody knows it, it uses
> Objective C, and my problem is that I used and ImageImporFilter from ITK to
> process the image data, the data is held in a variable float *fImage (is a
> buffer); so I used the ImportImageFilter using a typedef float as an
> outputImage, to use the OsiriX image buffer and later I used a
> DiscreteGaussianImageFilter but now I need to write the result of the
> GaussianFilter back to the fImage variable (Image buffer) to be able to
> refresh the result on the OsiriX viewer, so I guess that if I need to use an
> Importfilter to process the data using ITK functions, now that I finished I
> need to cast? export? the result to use it again with the Objective C code
> of OsiriX?
> 
> For you time... Thank you very much!
> 
> Regards... Bios5


More information about the Insight-users mailing list