[vtkusers] Locating a 3D position in 3D scheme from a XYZ	coordinates
    Dean Inglis 
    dean.inglis at sympatico.ca
       
    Mon Sep  1 20:57:36 EDT 2008
    
    
  
Hi Wagner,
 
how are m_XPosition, m_YPosition, m_ZPosition defined?
 
Given a 3D double precision 3D spatial point:
 
vktIdType id = m_CurrentImageData->FindPoint(xyzCoords)
if(id > -1)
{
//do what you need to do with the point: it's valid!
}
 
if you have integer ijk indices:
 
double queryPoint[3];
double dummyPcoords[3];
if(m_CurrentImageData->ComputeStructuredCoordinates(queryPoint,myijkindices,
dummyPcoords) == 1)
{
//the ijk indices refer to a point in the 3D image volume and you have a
valid 3D point
//otherwise, try with different ijk indices
}
 
HTH
Dean
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080901/8e427c5c/attachment.htm>
    
    
More information about the vtkusers
mailing list