Skip to content

ImageJ selection tools are not intuitive #357

Open
@hinerm

Description

image

Looking at the basic selection (Rectangle, Oval, Polygon, Freehand, Straight) and point tools, there are significant inconsistencies in behavior. I know these are in imagej/imagej so we don't have exact control over them. Honestly I'm not sure how this isn't incredibly confusing for people - maybe selection tools aren't used much? If so then this work may not be necessary. In any case, I at least wanted to document the current state (as of 1.54f) and make a wishlist of changes.

Double-clicking to configure

All tools should be double-clickable to configure, and their hover text should indicate they can be double-clicked. Basically, all of the entries in this table should be Yes:

Tool Double-click works? Double-click documented?
Rectangle Yes No
Oval Yes No
Polygon No No
Freehand No No
Straight Yes No
Point Yes Yes

Multi-tool labels

Each tool icon actually represents multiple tools and can be changed by alt-clicking. Apparently the description changes to put *..* around the selected tool. It is slightly inconsistent (Point/Multi-Point actually re-order the list to have the active selection first) and very subtle to the point that I did not notice at first.

image

Areas and Paths are intermixed

Each tool can be changed to a variety of sub-tools. However, sometimes a tool is an area selection and sometimes it is a path selection. These behave fundamentally differently - modifier keys work differently, they do not add/subtract from the same entity, and they use different line widths.

For example, if I change the Rectangle to Rotated Rectangle, double-clicking it still gives the Rectangle configuration but the Stroke width setting there just changes how big the shape handles are. If I want to change the actual "stroke width" I have to double click the Straight tool and change the width there, then go back to the rectangle tool.

Here is a summary of the tool state, which configuration is opened when double-clicking, and which shape type the selection is. Note that if the configuration opened doesn't match the shape type then you must access the configuration via a different tool to modify the parameters of that particular tool. I would propose that for each tool, the configuration opened when double-clicking that tool should control the parameters of that tool.

Tool Configuration opened? Shape type?
Rectangle ROI ROI
Rounded Rectangle Rounded Rectangle (affects ROI globally) ROI
Rotated Rectangle ROI Both*
Oval Selection Brush** ROI
Elliptical Selection Brush** ROI
Selection Brush Selection Brush** ROI
Polygon n/a ROI
Freehand n/a ROI
Straight Line Both*
Segmented Line Both*
Freehand Line Both*
Arrow Arrow Arrow***

*ROI Stroke Width always affects size of grab anchors. If Line Width is 1, ROI Stroke Width also affects rendered stroke width. Otherwise, Line Width is used as the line stroke width.

**Note that the selection brush configuration has an Enable Selection Brush flag that might make you think you can use other shapes for the selection brush (which paints selections) but in fact is simply a different way to turn on the Selection Brush, which is actually confusing because switching tool modes should just be through right clicking. Changing the radius only applies to the Selection Brush and is pointless for the other tool modes.

***Arrows use their own configuration for everything except that the ROI Stroke Width is still used for grab anchor size. Note also that there is no indication that arrows will simply disappear when clicking off them and that the user must alt-click the arrow and select Add to Overlay to persist. I would argue this is not really a ROI/selection tool but an annotation tool and would fit better with Pencil, etc...

Modifier keys lack documentation

There are several modifier keys when creating ROIs including shift, ctrl, and alt (maybe others I didn't try). These modifiers can be combined. Ideally this functionality would be clearly advertised (e.g. in the status message when dragging to create the ROI). Also, ideally it would be consistent across tools, and each key would have a single function.

The following table documents the current behavior of each key:

Tool ctrl alt shift
Rectangle Mirrors around origin Subtracts area Fixes aspect ratio & Adds area
Rounded Rectangle Mirrors around origin Subtracts area Fixes aspect ratio & Adds area
Rotated Rectangle No effect Allows 2 shapes at once (why?) Allows 2 shapes at once (why?)
Oval Mirrors around origin Subtracts area Fixes aspect ratio & Adds area
Elliptical No effect Subtracts area Adds area
Selection Brush* No effect Subtract area Adds area
Polygon No effect Subtracts area Lock to right angles & Adds area**
Freehand No effect Subtracts area Adds area
Straight No effect No effect Locks to 45 degree angles from origin
Segmented No effect Removes moused-over points Locks to right angles***
Freehand No effect No effect No effect
Arrow No effect No effect Locks to right angles

*Selection Brush behavior is odd and changes depending on circumstances: if no ROIs exist, defaults to "Add" mode. Otherwise, defaults to "Add" mode if inside an existing ROI, and Subtract mode if outside an existing ROI.

**Couldn't find a way to add area without also locking to right angles, which was infuriating.

***When clicking to place a point the mouse can be held down and rotated to non-right angles and these will be respected.

NB: When using modifiers to make a ROI at one width, then changing ROI width and adding to the existing selection with another ROI, will change the width of the prior ROI selection, so that the whole ROI has a single width.

Point/Multi-point

Point

Just noting that shift in Point mode creates multiple points but doesn't go into the Multi-point tool. alt or ctrl can be used to remove existing points. Trying to click after adding multiple points brings up a big dialog message telling you how to remove all the points. Clicking OK on this pop-up eventually brings up... a context menu?

Multi-point

Seems essentially identical to Point when shift is held, except that holding shift in this mode seems to lock your points to a particular X and Y axis around point 1. This was very unclear and I had to experiment a few times to understand what was happening.

Also, when using shift + a to remove all points, we get a warning, but only if we have 10+ points:
image

We never seem to get this same warning with the Point tool. Also, clicking on the X (which I would assume to cancel, and thus keep my points) instead removes all of them.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions