-
Hi, I want to crop an image to get the roi. Firstly I get the center of my segmentation, and I want to use the CenterSpatialCropd function to center crop both my image and segmentation based on the center and roi_size, but I found that this function didn't have the roi_size parameters. Can you give me some suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @vectorzwt, Hope it helps, thanks. |
Beta Was this translation helpful? Give feedback.
Hi @vectorzwt,
The transform CenterSpatialCrop does indeed include a roi_size parameter as documentated here.
If you are aiming to crop around a specific center point, you might want to consider the SpatialCrop transform, as it provides greater flexibility in specifying the center point for cropping. You can find its documentation here.
Hope it helps, thanks.