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

Method deleteSlice

ij/src/main/java/ij/ImageStack.java:170–182  ·  view source on GitHub ↗

Deletes the specified slice, where {@literal 1<=n<=nslices}.

(int n)

Source from the content-addressed store, hash-verified

168
169 /** Deletes the specified slice, where {@literal 1<=n<=nslices}. */
170 public void deleteSlice(int n) {
171 if (n<1 || n>nSlices)
172 throw new IllegalArgumentException(outOfRange+n);
173 if (nSlices<1)
174 return;
175 for (int i=n; i<nSlices; i++) {
176 stack[i-1] = stack[i];
177 label[i-1] = label[i];
178 }
179 stack[nSlices-1] = null;
180 label[nSlices-1] = null;
181 nSlices--;
182 }
183
184 /** Deletes the last slice in the stack. */
185 public void deleteLastSlice() {

Callers 15

deleteLastSliceMethod · 0.95
deleteSliceMethod · 0.95
convertRGBToCompositeMethod · 0.95
stackListMethod · 0.95
stackRangeMethod · 0.95
runMethod · 0.95
convertStackMethod · 0.95
convertToGray8Method · 0.95
convertRGBToGray8Method · 0.95
convertToGray16Method · 0.95
convertToGray32Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected