[vtkusers] GetCenter of vtkImageData - a possible bug?

ghy ghy at tellyes.com
Wed Mar 19 08:07:11 EDT 2014


    double origin[3], spacing[3], center[3]; 
     int dimensions[3]; 

     imageData->GetOrigin(origin); 
     imageData->GetSpacing(spacing); 
     imageData->GetDimensions(dimensions); 

     for(int i = 0; i < 3; i++) 
     { 
  *       center[i] = origin[i] + (dimensions[i]-1.0) / 2.0 * spacing[i]; 
*    } 






--
View this message in context: http://vtk.1045678.n5.nabble.com/GetCenter-of-vtkImageData-a-possible-bug-tp5726392p5726396.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list