[vtkusers] Retrieving Data from vtkImageData class for matlab/tcl

Koning, P.J.H. de (LKEB) P.J.H.de_Koning at lumc.nl
Thu Aug 8 09:14:17 EDT 2002


08-08-02 15:09:04, Surajit Nundy <nundys at neuro.duke.edu> wrote:

>This is probably a naive question, my apologies.
>
>I have a vtkImageData object from which I'd like to retrieve the Data in
>double/float form and operate on it in Matlab (I think my question also applies
>to tcl).  How can I do this?  I have tried the GetPoint, GetCell,
>GetScalarComponentAsFloat methods to no avail.
>

Try using vtkImageData::GetScalarPointer(x, y, z). This should give you the pointer to the data at point (x,y,z). Just cast 
to double/float or whatever type your imagedata is.

>Thanks,
>Surajit Nundy
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list