Detection annotation similiar to labelme

Hi, I’m looking for an annotation tool like label for medical images. Is there something similar to labelme? I would like to draw a bounding box to annotate the detected tumor or structure. It would be even greater if I could make it a 3D bounding box (aka. a cube).

There are many options.

If you really just want a 3D box, then you can use Annotation ROI node (select it on the toolbar and initialize it with two clicks in an axial slice):


It is often enough to just mark points. You can use Markups Fiducial points (you can select it from the same toolbar as ROI).

If you prefer a custom shape (for example, sphere) then you can follow this example:

If you want some more flexibility then you can use Segment Editor module. For example, you can paint strokes corresponding to “definitely tumor” and “definitely not tumor”. Or, you can quickly create arbitrary shapes using Surface Cut effect (in SegmentEditorExtraEffects extension).

You can customize and automate everything using Python scripts. So, if you need to annotate thousands of images then you don’t need to make a single unnecessary click.

1 Like

Thanks for your quick answer. I think the Annotation ROI node is good for me. However, it seems each annotation node is exported to one file. Markups Fiducial points is also great, it’s visualized as a point, not a rectangle. It might not be intuitional.

You can write a short Python script that exports the ROI in any format you prefer.

1 Like

@lassoan Hi, I also check the legacy Editor module (, and there is a RectangleEffect which is not available in the new SegmentEditor anymore. I think it helps me with 2D bbox annotation. It would be even great if I could see a bbox when I left click and drag. I can’t modity the rectangle after it’s done.

Another option, I could use SegmentEditor to draw a rough rectangle.

An improved version of the “Rectangle” effect is available in Segment Editor module as “Scissors” effect. Scissors effect has the following advantages:

  • supports not just rectangle but circle or free-form shape
  • can fill or erase, inside or outside the selected region
  • can be restricted to a single slice, thick slice, one side of the slice plane, or both sides
  • also works in 3D views, oblique slices
  • works with masking (you can mask cutting with an additional set of segments or intensity range)

Oh, that is what “Scissors” effect do. I thought it’s for eraring.

It seems it’s not a filled rectangle. I found there is waring: Irregular volume geometry detected, but maximum error non-zero but is within tolerance (maximum error of 0.000576862 mm, tolerance threshold is 0.001 mm).
I check this post. And set apply regualarization transform in the application setting, but still get this warning.

as you could see, the image is rotated a little. Any issue with the DICOM data?
PixelSpacing: 0.9375, 0.9375
SliceThickness: 1
ImagePositionPatient: -112.38102987944, -116.43096361169, 83.608241714
ImageOrientationPatient: 0.99926579596646, 0.00441271653949, 0.03805781055539, -0.0017440497062, 0.99755447631478, -0.0698714897148

There is no issue at all, this is all normal when view axes (that are initialized by default to be aligned with right-anterior-superior anatomical directions) are not parallel with image axes directions (they are often aligned with anatomical directions, but not always). See explanation and solutions here. Probably you want to specify the rectangles in the image coordinate system and so you just need to click the warning icon next to the segmentation node selector in Segment Editor module.

1 Like