imagej / imagej/imagej2

getValue() not returning intensity measures of line selections?

Open
#265 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.4k
Forks
350
PR merge metrics
No merged PRs in 30d

Description

Hi,

For further use in a macro I wanted to store the mean-intensity in a variable. I noticed an unexpected behaviour of getValue() when reading intensity values from a line selection:
`intens = getValue("Mean");`
`len = getValue("Length");`
`print(intens);`
`print(len);
`

While the length is correctly read from the line, the mean intensity is read from the full image. The same happens for the other intensity measures (Median, Mode, Min, Max).

When I select an area instead of a line, the intensity measures are returned from the selection.

Is this intentional or just not yet implemented in my ImageJ-Version? (ImageJ-Version 1.53c, Fiji updater does not want to update anything)

Thanks,
Joachim

PS: [A workaround for this issue has already been described by Christopher Schmied here](https://forum.image.sc/t/imagej-getvalue-mean-not-returning-intensity-of-lines/43911) via measuring and accessing the Results-Table but I thought, I'd mention it as a potential enhancement here.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the getValue("Mean") and getValue("Length") entry points for line selections; the issue does not name a source file or test. Done means the intensity measures for a line selection are returned from that line, while Length continues to work and area-selection behavior remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
computer-vision
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.