Hello!
I can't figure out how to simply resample my images with 50% in each dimension!
I have a huge set of T1 images that I want to use in deep learning. To reduce the disk-usage we want to try and resample/shirk the matrix dims.
Example image:
R-to-L extent: -108.364 [R] -to- 98.636 [L] -step- 1.000 mm [208 voxels]
A-to-P extent: -123.597 [A] -to- 131.403 [P] -step- 1.000 mm [256 voxels]
I-to-S extent: -91.698 -to- 163.302 [S] -step- 1.000 mm [256 voxels]
Using zero-padding all the images have 208x256x256 voxels. The voxelsize is almost always 1.000 but some of them vary a little (e.g. 0.997 mm).
3dresample takes it's options in mm format and this is no good since the mm might vary as I said. Is there a way to just resample the image from 208x256x256 to 104x128x128?
I tireid making a master dataset via:
3dcalc -a jRandomDataset:104,128,128 -expr a -prefix template_resam
Followed by:
3dresample -master template_resam+orig. -inset MNI152_2009_template_SSW.nii.gz -prefix test
To create a master 104,128,128 dataset to use in 3dresample. But while the matrix dims are correct the brain is way out of the frame.
Thanks!
Edited 2 time(s). Last edit at 02/02/2022 05:06AM by Robin.