imagej / imagej/ImageJ

Macro expression Overlay.size returns wrong results when using Synchronize Windows

Open
#147 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
786
Forks
267
PR merge metrics
No merged PRs in 30d

Description

**Configuration:**
Java 1.8.0_311 (x64)
ImageJ 1.53k
Windows 10.0.19042.1466

**Steps for Reproduction**

1. Open at least 2 multi-slice DICOM series
2. Run _Synchronize Windows_ and click on _Synchronize All_ with default settings
3. Without creating any overlays, use `Overlay.size` in a macro script on any of the open images. The return value is greater `0`.

**Expected bahavior**
The return value of `Overlay.size` should be `0` when used on a synchronized DICOM stack without any previously created overlays.

Update:

I found that this behavior is caused by the _Sync cursor_ setting, i.e. the red cross that is displayed with this setting in all synchronized windows is itself considered an overlay.

@rasband Is this the indented bevavior, this issue can be closed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with two multi-slice DICOM series, Synchronize Windows, Synchronize All, and the Sync cursor setting, then run a macro using Overlay.size. Start by tracing how the synchronized red cross is represented as an overlay. Done requires determining whether that cursor should count and resolving the discrepancy between the observed and expected return value.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.