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

Method invertLut

ij/src/main/java/ij/plugin/LutLoader.java:166–186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164 }
165
166 void invertLut() {
167 ImagePlus imp = WindowManager.getCurrentImage();
168 if (imp==null)
169 {IJ.noImage(); return;}
170 if (imp.getProcessor().getNChannels()==3) {
171 IJ.error("RGB images do not use LUTs");
172 return;
173 }
174 if (imp.isComposite()) {
175 CompositeImage ci = (CompositeImage)imp;
176 LUT lut = ci.getChannelLut();
177 if (lut!=null)
178 ci.setChannelLut(lut.createInvertedLut());
179 } else {
180 ImageProcessor ip = imp.getProcessor();
181 ip.invertLut();
182 if (imp.getStackSize()>1)
183 imp.getStack().setColorModel(ip.getColorModel());
184 }
185 imp.updateAndRepaintWindow();
186 }
187
188 int fire(byte[] reds, byte[] greens, byte[] blues) {
189 int[] r = {0,0,1,25,49,73,98,122,146,162,173,184,195,207,217,229,240,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255};

Callers 6

runMethod · 0.95
createMaskMethod · 0.45
makeSurfacePlotMethod · 0.45
runMethod · 0.45
analyzeMethod · 0.45

Calls 15

getCurrentImageMethod · 0.95
noImageMethod · 0.95
getProcessorMethod · 0.95
errorMethod · 0.95
isCompositeMethod · 0.95
getChannelLutMethod · 0.95
setChannelLutMethod · 0.95
createInvertedLutMethod · 0.95
invertLutMethod · 0.95
getStackSizeMethod · 0.95
getStackMethod · 0.95
getColorModelMethod · 0.95

Tested by

no test coverage detected