@@ -115,7 +115,6 @@ public class Roi extends Object implements Cloneable, java.io.Serializable, Iter
115115 private String name ;
116116 private int position ;
117117 private int channel , slice , frame ;
118- protected boolean hyperstackPosition ;
119118 private Overlay prototypeOverlay ;
120119 private boolean subPixel ;
121120 private boolean activeOverlayRoi ;
@@ -1848,7 +1847,6 @@ public static synchronized void setGroupName(int groupNumber, String name) {
18481847 temp [i ] = groupNames [i ];
18491848 groupNames = temp ;
18501849 }
1851- //IJ.log("setGroupName: "+groupNumber+" "+name+" "+groupNames.length);
18521850 groupNames [groupNumber -1 ] = name ;
18531851 groupNamesChanged = true ;
18541852 }
@@ -2201,7 +2199,6 @@ public void setPosition(int n) {
22012199 if (n <0 ) n =0 ;
22022200 position = n ;
22032201 channel = slice = frame = 0 ;
2204- hyperstackPosition = false ;
22052202 }
22062203
22072204 /** Returns the stack position (image number) for displaying this ROI,
@@ -2237,12 +2234,14 @@ public void setPosition(int channel, int slice, int frame) {
22372234 if (frame <0 ) frame =0 ;
22382235 this .frame = frame ;
22392236 position = 0 ;
2240- hyperstackPosition = true ;
22412237 }
22422238
22432239 /** Returns 'true' if setPosition(C,Z,T) has been called. */
22442240 public boolean hasHyperStackPosition () {
2245- return hyperstackPosition ;
2241+ if (getPosition ()==PointRoi .POINTWISE_POSITION )
2242+ return false ;
2243+ else
2244+ return channel >0 || slice >0 || frame >0 ;
22462245 }
22472246
22482247 /** Sets the position of this ROI based on the stack position of the specified image. */
@@ -2269,7 +2268,7 @@ public final int getCPosition() {
22692268 * if this ROI is not associated with a particular slice.
22702269 */
22712270 public final int getZPosition () {
2272- return slice ==0 &&!hyperstackPosition ? getPosition () : slice ;
2271+ return slice ==0 &&!hasHyperStackPosition () ? getPosition () : slice ;
22732272 }
22742273
22752274 /** Returns the frame position of this ROI, or zero
0 commit comments