Closed WGierke closed 6 years ago
You should set the option, an_box = an.bbox(image_coords=True)
. Actually, image_coords=True
should probably be the default for this function so it is consistent with the returned bbox of get_boolean_mask(return_bbox=True)
.
Try out this code. If you have non-issue questions about using the software, feel free to email me.
Your snippet works like a charm, thanks a lot! Sorry for the inconvenience.
glad it worked out!
Hey, I'd like to continue my post from #9 here since it appears to me to be a real issue. I'd expect bbox() to enclose an annotation in a cuboid. However, from my POV this appears to be not the case:
... produces the correct expected result when the binary mask is applied to the data (here using
uniform_cubic_resample
): but one can see that the binary mask positioned using the bbox() coordinates is not at the exact same position as the annotation which becomes even clearer when the mask is applied to the data and the annotation is not included in the masked imageAm I doing something wrong? All I want is a binary image whose pixels are 1 if there is a cancerous annotation and otherwise 0 while the image shape is the same as the one of
scan.to_volume()
.