Skip to content

Adds a constructor to open data in write mode, so that extra zoom levels can be created.#184

Merged
nicost merged 3 commits intomicro-manager:mainfrom
nicost:openDataInWriteMode
Mar 10, 2026
Merged

Adds a constructor to open data in write mode, so that extra zoom levels can be created.#184
nicost merged 3 commits intomicro-manager:mainfrom
nicost:openDataInWriteMode

Conversation

@nicost
Copy link
Member

@nicost nicost commented Mar 9, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for opening an existing NDTiff dataset in a write/append mode so additional pyramid (downsample) levels can be generated on demand, and introduces a cap on maximum pyramid depth.

Changes:

  • Added a new NDTiffStorage(String dir, int savingQueueSize, Consumer<String> debugLogger) constructor to open existing datasets with an active writing executor.
  • Capped increaseMaxResolutionLevel via MAX_RESOLUTION_LEVEL to limit pyramid depth.
  • Updated shutdown/close behavior and bumped Maven artifact version to 2.19.0.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
java/src/main/java/org/micromanager/ndtiffstorage/NDTiffStorage.java Adds write-append constructor; caps pyramid depth; adjusts finished/close behavior for write executor scenarios.
java/pom.xml Bumps library version to 2.19.0.
Comments suppressed due to low confidence (1)

java/src/main/java/org/micromanager/ndtiffstorage/NDTiffStorage.java:1227

  • doClose() now waits on writingExecutor_.awaitTermination() whenever writingExecutor_ != null, but it never initiates shutdown here. If close()/closeAndWait() is called before finishedWriting() (or any other shutdown), this loop can spin forever. Consider calling finishedWriting()/shutdown() (or at least checking isShutdown()/isTerminated() before waiting) to avoid a potential hang in the new write-append mode.
      if (!loaded_ || writingExecutor_ != null) {
         while (true) {
            try {
               if (writingExecutor_.awaitTermination(10, TimeUnit.MILLISECONDS)) {
                  break;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nicost nicost merged commit 032fd5e into micro-manager:main Mar 10, 2026
3 of 6 checks passed
@nicost nicost deleted the openDataInWriteMode branch March 10, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants