[vtkusers] GetCenter of vtkImageData - a possible bug?

chasank chasank at gmail.com
Wed Mar 19 07:46:59 EDT 2014


center[i] = origin[i] + ((dimensions[i] / 2) * spacing[i]);
In above calculation, dimensions[i]/2 is equal to center slice number. So
instead of using std::floor(dimensions[i]/2.0f) to get center slice number,
I chose to use dimensions[i]/2 which gives the same result.



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


More information about the vtkusers mailing list