I’m trying to figure out a way to crop 3d Nifti images.
They are loaded using the @MONAI data loaders, and currently, my objective is to crop an area of the image.
Say, the img/volume is 320x320*12 and I would like to remove the ‘border’ outside of the x- [100,220] and y-[90,220] of each slice of the volume.
I could do that manually using
numpy or even torch if the image/volume is transformed into a tensor, but is there any built-in cropping tool either in @MONAI or maybe
torchvision that given a
[xmin,ymin,xmax,ymax] set of coordinates, like a bounding box, it would crop the image?