MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / hasPointPosition

Method hasPointPosition

ij/src/main/java/ij/gui/PointRoi.java:780–785  ·  view source on GitHub ↗

Returns whether this Roi contains a point associated to the given stack slice. Returns true for (non-existant) slice 0. Does not care whether points would be shown irrespective of the slice number (as given by the Point Tool options "Show on all slices", Prefs.showAllPoints).

(int slice)

Source from the content-addressed store, hash-verified

778 * (as given by the Point Tool options "Show on all slices", Prefs.showAllPoints).
779 */
780 public boolean hasPointPosition(int slice) {
781 if (slice < 0) return false;
782 if (slice == 0) return true;
783 if (positions == null) return true;
784 return Tools.indexOf(positions, slice) >= 0;
785 }
786
787 public void displayCounts() {
788 ImagePlus imp = getImage();

Callers 1

restoreMethod · 0.80

Calls 1

indexOfMethod · 0.95

Tested by

no test coverage detected