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

Method resetStack

ij/src/main/java/ij/ImagePlus.java:2037–2049  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2035
2036 /* Hack needed to make the HyperStackReducer work. */
2037 public void resetStack() {
2038 if (currentSlice==1 && stack!=null && stack.size()>0) {
2039 ColorModel cm = ip.getColorModel();
2040 double min = ip.getMin();
2041 double max = ip.getMax();
2042 ImageProcessor ip2 = stack.getProcessor(1);
2043 if (ip2!=null) {
2044 ip = ip2;
2045 ip.setColorModel(cm);
2046 ip.setMinAndMax(min, max);
2047 }
2048 }
2049 }
2050
2051 /** Set the current hyperstack position based on the stack index 'n' (one-based). */
2052 public void setPosition(int n) {

Callers 2

reduceMethod · 0.80
convertHyperstackMethod · 0.80

Calls 7

sizeMethod · 0.45
getColorModelMethod · 0.45
getMinMethod · 0.45
getMaxMethod · 0.45
getProcessorMethod · 0.45
setColorModelMethod · 0.45
setMinAndMaxMethod · 0.45

Tested by

no test coverage detected