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 Mar 10, 2026
Merged
Conversation
…els can be created.
There was a problem hiding this comment.
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
increaseMaxResolutionLevelviaMAX_RESOLUTION_LEVELto 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.
java/src/main/java/org/micromanager/ndtiffstorage/NDTiffStorage.java
Outdated
Show resolved
Hide resolved
java/src/main/java/org/micromanager/ndtiffstorage/NDTiffStorage.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
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.
java/src/main/java/org/micromanager/ndtiffstorage/NDTiffStorage.java
Outdated
Show resolved
Hide resolved
java/src/main/java/org/micromanager/ndtiffstorage/NDTiffStorage.java
Outdated
Show resolved
Hide resolved
java/src/main/java/org/micromanager/ndtiffstorage/NDTiffStorage.java
Outdated
Show resolved
Hide resolved
java/src/main/java/org/micromanager/ndtiffstorage/NDTiffStorage.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.