You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, mincGetWorldVoxel() sometimes returns the value of a neighbouring voxel, as compared to what Display renders. Given world coordinates that lie between image sampling points, the output of mincGetWorldVoxel() is also sometimes inconsistent with the output of mincConvertWorldToVoxel() %>% mincGetVoxel(...).
It appears that mincGetWorldVoxel() follows the convention where voxels fall between sampling points. For example, consider an image that contains three voxels, starting at the origin and with 1 mm separations, with values: 21, 10, and 28. mincGetWorldVoxel() sees this as:
Issue
Basically,
mincGetWorldVoxel()
sometimes returns the value of a neighbouring voxel, as compared to whatDisplay
renders. Given world coordinates that lie between image sampling points, the output ofmincGetWorldVoxel()
is also sometimes inconsistent with the output ofmincConvertWorldToVoxel() %>% mincGetVoxel(...)
.It appears that
mincGetWorldVoxel()
follows the convention where voxels fall between sampling points. For example, consider an image that contains three voxels, starting at the origin and with 1 mm separations, with values: 21, 10, and 28.mincGetWorldVoxel()
sees this as:On the other hand,
mincConvertWorldToVoxel()
andDisplay
follow the convention where voxels are centered at sampling points:Test data
Below is an R script to reproduce the issue, and a Python script to generate a test minc file for this:
Generate test minc file (python)
R code that demonstrates the issue
The text was updated successfully, but these errors were encountered: