itkwidgets
itkwidgets copied to clipboard
Position in z-axis is weirdly off
I have a .nii image I created from an itk.Image, with identity coordinate tranformations (i.e. identity direction, 0 origin, 1 spacing). When itkwidgets is set to z-plane view, it reports the wrong physical coordinate for the z dimension. See below. The -9.4 should be 0. Also, it doesn't seem to be isotropic spacing, if I move the axis slider it has different values and eventually gets it almost right on the last slices.
https://github.com/brad-t-moore/PublicExamples/blob/b5f4a4ff401c3ea1f919b82edae547744cb59bb3/ITKWidgetsBug.ipynb

Example is here: https://github.com/brad-t-moore/PublicExamples/blob/b5f4a4ff401c3ea1f919b82edae547744cb59bb3/ITKWidgetsBug.ipynb
@brad-t-moore thanks for the awesome, reproducible report! :dancers: :man_dancing:
It turns out there are precision issues when obtaining this position in vtk.js. And, we were not truncating it correctly. This will be addressed after integrating:
https://github.com/Kitware/itk-vtk-viewer/pull/403