Skip to content

Commit

Permalink
Update importImageJRois.groovy
Browse files Browse the repository at this point in the history
- added error if file not found
- do not resolve hierarchy
  • Loading branch information
GuillaumeLeGoc committed Jan 15, 2025
1 parent 09a8c71 commit 417c15d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/qupath-utils/tools/importImageJRois.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ if (!file.exists()) {
fileName = buildFilePath(roiDirPath, imageName + ".roi.zip")
file = new File(fileName)
}
if (!file.exists()) {
throw new Exception("File ${fileName} does not exist.")
}

// Get annotations that are already there
def annotationsBeforeImport = getAnnotationObjects()
Expand All @@ -42,5 +45,4 @@ newAnnotations.forEach{
}

// Update hierarchy
resolveHierarchy()
fireHierarchyUpdate()
insertObjects(getDetectionObjects())

0 comments on commit 417c15d

Please sign in to comment.