Cropping a CT volume

Hello. I want to crop(28x28x50) all the dcm (CT) volumes(150x150x50) in a folder, any python script for that?

Hello @blizzardboi_2020,

Not sure if you are using ITK or SimpleITK. If SimpleITK, then please take a look at this example script which reads-modifies-writes a DICOM volume.

To extract a sub-volume from a volumetric image, just use the slicing operator. Please see this Jupyter notebook for further details on slicing and general image operations in SimpleITK.

2 Likes

Actually I want to get this done for all the patients data in a folder, and in each patients folder there are Dixon files. I just a script for that in ITK/SITK!