New origin after resampling

@sebquetin I agree with your premise that if you treat the “edge” of the volume as being a 1/2 pixel spacing box around the origin then you would want to pick an origin that takes into account the new pixel spacing so that edge remains in the same physical location. There are several resampling options in Slicer, and Resample Scalar Volume is the simplest and comes from an old ITK example that apparently didn’t offer that behavior. As @lassoan points out, the sampling grid is kind of arbitrary so as long as the pixel intensity values don’t shift in physical space this won’t matter for most purposes. But it’s weird and maybe should be fixed if someone has time to investigate.

If you want to account for the spacing in the resampling, you can define your own sampling grid (i.e. a volume with specified origin, dimensions, directions, and spacings) and give it as the reference for one of the other more sophisticated resampling modules, such as Resample Image (BRAINS) or Resample Scalar/Vector/DWI. Also I believe the Crop Volume module correctly offsets the origin when you specify the ROI and spacing, as opposed to the others where you provide the sampling grid explicitly.

1 Like