I have a 3D grey-level image (256, 256, 192);
I have a 3D label-image binary (1 and 0) to define a segmentation (256, 256, 192);
I use LabelShapeStatisticsImageFilter to get a bounding box or region for my label image;
The region/boundingbox output is something like this: [115, 58, 122,32, 18, 8]
I then use that region info to crop this bounding box region from grey-level image;
The crop filter takes an image, lowerBoundaryCropSize and upperBoundaryCropSize.
Question: How to find out those boundary indexes from region info?
I tried many combinations, like three first numbers for lower boundary, and the rest for upper boundary. Also subtracting the last three numbers from initial ones and set is as either lower or upper boundary. No success.
Error:The input image’s size [256, 256, 192] is less than the total of the crop size!
Hi, how could I use the bounding box of one image to crop another? Say I have two images: imgA and imgB. I first get a bounding box from imgA via the following:
which returns a bounding box of (154, 314, 210, 284, 8, 44). I then want to crop imgB using this bounding box. How could I achieve this using RegionOfInterest?