Skip to content

Commit 67d56b7

Browse files
author
karenacollins
committed
Fix common image area loop upper bound.
1 parent 71fae95 commit 67d56b7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Astronomy_/src/main/java/Astronomy/shapes/WcsShape.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public static WcsShape createCommonRegion(ImagePlus imp) {
100100
}
101101

102102
public static WcsShape createCommonRegion(ImagePlus imp, Component ref) {
103-
return createCommonRegion(imp, 1, imp.getStackSize()+1, ref);
103+
return createCommonRegion(imp, 1, imp.getStackSize(), ref);
104104
}
105105

106106
public static WcsShape createCommonRegion(ImagePlus imp, int start, int end) {
@@ -112,7 +112,7 @@ public static WcsShape createCommonRegion(ImagePlus imp, int start, int end, Com
112112
WCS initial = null;
113113

114114
var monitor = new ProgressMonitor(ref, "Calculating WCS Common Region", "", 0, end-start);
115-
for (int i = start; i < end; i++) {
115+
for (int i = start; i < end+1; i++) {
116116
if (monitor.isCanceled()) {
117117
return null;
118118
}

0 commit comments

Comments
 (0)