[vtkusers] vtkPolyData mesh ?

David Gobbi dgobbi at imaging.robarts.ca
Tue Aug 10 14:10:55 EDT 2004


Hi Pallavi,

The mesh is in VTK's "data" coords.  An just to make sure there is no
misunderstanding what this means:

VTK's "structured" coords are the i,j,k indices into the image data.

VTK's "data" coords are the x,y,z coordinates of the vtkPoints in a
vtkPolyData (such as that generated by vtkMarchingCubes), or equivalently
the x,y,z coords of the voxels in vtkImageData given by the formulas
x = Origin[0] + Spacing[0]*i, y = Origin[1] + Spacing[1]*j, etc.

Finally, "world" coords are the result of applying an actor's Matrix
(i.e. the one you get by doing actor->GetMatrix()) to the "data" coords.
If the matrix is the identity matrix (the default) then "data" and "world"
coords are the same thing.

Cheers,

 - David


On Tue, 10 Aug 2004, Pallavi Joshi wrote:

>   Hi,
>   Can somebody tell me whether the mesh (created from vtkMarchingCubes) has its coordiantes in image or world cood system ?
>   Thanks,
>   Pallavi
>
>





More information about the vtkusers mailing list