[vtkusers] vtkImageData to C array
Michael Jackson
mike.jackson at bluequartz.net
Tue Oct 12 08:21:33 EDT 2010
You can use getscalarpointer(0) which will return a pointer to the
first element of the array. You can then use regular pointer semantics
to process the data.
-----
Mike Jackson www.bluequartz.net
Principal Software Engineer mike.jackson at bluequartz.net
BlueQuartz Software Dayton, Ohio
On Oct 12, 2010, at 7:21, Jothy <jothybasu at gmail.com> wrote:
> Hi all,
>
> I want to convert a vtkImageData to a C array.
>
> I don't like to use imgData->hgetScalarPointer(i,j,k), because it will be too slow for my purpose.
>
> How to do this?
>
> Any hints?
>
> --
> Research Scholar
> Dept. of Medical Physics
> Clatterbridge Centre for Oncology
> UK
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list