[vtkusers] Mapping vtkImageData coordinates to vtkDataArray and back?

Bill Lorensen bill.lorensen at gmail.com
Sat Aug 24 13:19:58 EDT 2013


This example may help:
http://vtk.org/Wiki/VTK/Examples/Cxx/ImageData/CellIdFromGridCoordinates



On Thu, Aug 22, 2013 at 12:49 PM, Manuel Corrales
<manuelcorrales at gmail.com>wrote:

> Hello,
>
> does VTK provides a way of mapping a vtkImageData 3d coordinate to an
> vtkArray 1d coordinate and back? I.e: can I get the relation between the 3
> indices that I have to pass to GetScalarPointer and the 1 index I have to
> pass to GetTuple()?
>
> vtkImageData->GetScalarPointer(indices[0], indices[1], indices[2])
>
>
> vtkImageData->GetPointData()->GetScalars()->GetTuple(0);
>
>
> Thanks in advance.
>
> Regards,
> Manuel
>
>
> _______________________________________________
> 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
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130824/fc3672bf/attachment.htm>


More information about the vtkusers mailing list