# Resampling a volume and Image Spacing

Hi All,
I have got a volume with the following dimensions 1702 x1678 x 251.

I want to reduce the resolution in xy direction and leave z unaltered. May I know which module can be used to do the above?
I’ve checked the crop volume module, the `Spacing scale` option allows us to scale in all 3 dimensions.
I don’t want to scale in z dimension. May I know if it is a good idea to use `Resample Scalar Volume` module’s `Scaling` (2,2,0) if I want to use a `Spacing Scale` of 2 in x,y dimensions and leave it unaltered in z?

I get the following output :

Could someone explain how the image spacing is computed here?
To be honest, I don’t clearly understand what the x,y,z (If I am not wrong, z is the slice thickness) coordinates in the `Imaging Spacing ` tab refer to.

For instance, “the voxel size in this study (pixel size of 0.81 mm)” is mentioned in the documentation of dataset from which I have used the 2D slices to reconstruct 3D volume. If my understanding is right, 0.81mm has to be set for Image Spacing in x,y,z dimensions. May I know if this is correct?

I think the esayest way is covert the volume to numpy data，and then you can do what you want.

Thank you. Could you please let me know if such examples are available?

`ResampleScalarVolume` takes physical values. So if you want to reduce xy by 50% and your voxel spacing is 0.81, you should enter 1.62, 1.62, 0 (not 2,2,0)

Thank you very much for the clarification. Could you please suggest which interpolation method will be apt for resampling? I tried spline interpolation that was mentioned in Luca Antiga’s paper. But, in my opinion, that didn’t work fine. I could find disconnected fragments in 3D volume. Would it be a good idea to use Nearest neighbors?

If your data is a labelmap you should use nearest neighbor so that you have exactly the same number of classes that you begin with, otherwise linear is fairly safe.

1 Like

Thanks a lot. I would like to confirm if labelmap refers to the volume generated from segment.