[vtkusers] Pointer to pixels.
Patrick de Koning
patrick at lkeb.azl.nl
Wed Dec 13 02:51:13 EST 2000
Jordi Inglada wrote:
>
> Hello all.
>
> I am taking my first steps with Vtk. Since I have a considerable
> amount of code written by myself for image processing stuff, I would
> like to reuse it together with vtk. In order to do this I need to put
> the output of some image filters into, let's say, an array of
> floats. If aFilter->GetOutput() returns a pointer of type
> vtkImageData, how can I individually access the pixels?
>
> Thanks.
>
Use aFilter->GetOutput()->GetScalarPointer() to get a void pointer to
the first element of the array, then just cast to float if the imagedata
is float.
> --
> Jordi Inglada
> CNES - Centre Spatial de Toulouse
> DSO/OT/QTIS/SR - BPI 811
> 18, avenue Edouard Belin
> 31401 Toulouse Cedex 04 - France
> Tel. +33.(0)5.61.27.33.97 - Fax. +33.(0)5.61.28.31.09
>
> _______________________________________________
> 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
--
--------------------------------------------------------------------
Ir. P.J.H. de Koning Leiden University Medical Center
Department of Radiology, C2S Division of Image Processing
P.O. Box 9600 2300 RC LEIDEN
the Netherlands Tel. +31-71-5266206
Fax +31-71-5266801 Email patrick at lkeb.azl.nl
More information about the vtkusers
mailing list