Rescaling 3D MR angiography image to a desirable size

Hi guys ,I have 3d angio MRA images of size 512512100 i want to scale it to 256256256,how can i do it without much loss of data ,(all data is in nifti format)?

Have you tried the zoom method? More details at the link below.

thank you for sharing ,I will try that

1 Like

@imageClarity but it seems to have a data loss ,like the image seems to be zoomed in quite a bit,is there no option like combining 2 voxels ?to make it smaller?

Have you tried interpolation using opencv? cv2.resize function may work. You may need to use it per 2D slice rather than as a volume which would be coded something like below. You’ll need to download the cv2 library and import it first.

img = cv2.imread(’ 512 x 512 x 100 volume’)
res = cv2.resize(img, dsize=(256, 256, 256), interpolation=cv2.INTER_CUBIC)

no actually i tried nibabel.processing.conform

nibabel.processing has many functions like resampling etc
cv interpolation techniques i guess are not designed for 3d images as they dont really keep spatial relations in mind

1 Like
Category icons made by Freepik from