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

Method copyLuts

ij/src/main/java/ij/CompositeImage.java:605–624  ·  view source on GitHub ↗

Copies the LUTs and display mode of 'imp' to this image. Does nothing if 'imp' is not a CompositeImage or 'imp' and this image do not have the same number of channels.

(ImagePlus imp)

Source from the content-addressed store, hash-verified

603 nothing if 'imp' is not a CompositeImage or 'imp' and this
604 image do not have the same number of channels. */
605 public synchronized void copyLuts(ImagePlus imp) {
606 int channels = getNChannels();
607 if (!imp.isComposite() || imp.getNChannels()!=channels)
608 return;
609 CompositeImage ci = (CompositeImage)imp;
610 LUT[] luts = ci.getLuts();
611 if (luts!=null && luts.length==channels) {
612 lut = luts;
613 cip = null;
614 }
615 int mode2 = ci.getMode();
616 setMode(mode2);
617 if (mode2==COMPOSITE) {
618 boolean[] active2 = ci.getActiveChannels();
619 for (int i=0; i<MAX_CHANNELS; i++)
620 active[i] = active2[i];
621 }
622 if (ci.hasCustomLuts())
623 customLuts = true;
624 }
625
626 int getChannelIndex() {
627 int channels = getNChannels();

Callers 10

runMethod · 0.80
duplicateStackMethod · 0.80
zScaleMethod · 0.80
runMethod · 0.80
resliceHyperstackMethod · 0.80
createNewStackMethod · 0.80

Calls 7

getLutsMethod · 0.95
getModeMethod · 0.95
setModeMethod · 0.95
getActiveChannelsMethod · 0.95
hasCustomLutsMethod · 0.95
isCompositeMethod · 0.80
getNChannelsMethod · 0.45

Tested by

no test coverage detected