itkwidgets icon indicating copy to clipboard operation
itkwidgets copied to clipboard

Position in z-axis is weirdly off

Open brad-t-moore opened this issue 4 years ago • 1 comments

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 image

Example is here: https://github.com/brad-t-moore/PublicExamples/blob/b5f4a4ff401c3ea1f919b82edae547744cb59bb3/ITKWidgetsBug.ipynb

brad-t-moore avatar Apr 07 '21 17:04 brad-t-moore

@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

thewtex avatar May 14 '21 14:05 thewtex