Module ij
Package ij

# Class CompositeImage

java.lang.Object
ij.ImagePlus
ij.CompositeImage

All Implemented Interfaces:
  `Measurements`, `ImageObserver`, `Cloneable`

public class CompositeImage extends ImagePlus

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`COLOR`
Display modes (note: TRANSPARENT mode has not yet been implemented)
`static final Color[]`
`colors`
`static final int`
`COMPOSITE`
Display modes (note: TRANSPARENT mode has not yet been implemented)
`static final int`
`GRAYSCALE`
Display modes (note: TRANSPARENT mode has not yet been implemented)
`static final int`
`MAX_CHANNELS`
`static final int`
`TRANSPARENT`
Display modes (note: TRANSPARENT mode has not yet been implemented)

### Fields inherited from class ij.ImagePlus

`changes, CLOSED, COLOR_256, COLOR_RGB, compositeImage, dimensionsSet, flattenTitle, GRAY16, GRAY32, GRAY8, height, img, ip, locked, nChannels, nFrames, nSlices, OPENED, roi, SAVED, setIJMenuBar, UPDATED, width, win`

### Fields inherited from interface java.awt.image.ImageObserver

`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

### Fields inherited from interface ij.measure.Measurements

`ADD_TO_OVERLAY, ALL_STATS, AREA, AREA_FRACTION, CENTER_OF_MASS, CENTROID, CIRCULARITY, ELLIPSE, FERET, INTEGRATED_DENSITY, INVERT_Y, KURTOSIS, LABELS, LIMIT, MAX_STANDARDS, MEAN, MEDIAN, MIN_MAX, MODE, NaN_EMPTY_CELLS, PERIMETER, RECT, SCIENTIFIC_NOTATION, SHAPE_DESCRIPTORS, SKEWNESS, SLICE, STACK_POSITION, STD_DEV`

## Constructor Summary

Constructors
Constructor
Description
`CompositeImage(ImagePlus imp)`
`CompositeImage(ImagePlus imp, int mode)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Closes this image and sets the ImageProcessor to null.
`void`
`completeReset()`
`void`
`copyLuts(ImagePlus imp)`
Copies the LUTs and display mode of 'imp' to this image.
`LUT`
`createLutFromColor(Color color)`
`boolean[]`
`getActiveChannels()`
`Color`
`getChannelColor()`
Returns the color used to display the image subtitle and "Binvalid input: '&C'" histogram.
`LUT`
`getChannelLut()`
`LUT`
`getChannelLut(int channel)`
`ImageProcessor`
`getChannelProcessor()`
Returns a reference to the current ImageProcessor.
`double`
`getDisplayRangeMax()`
Returns the display range maximum of the current channel.
`double`
`getDisplayRangeMin()`
Returns the display range minimum of the current channel.
`Image`
`getImage()`
Returns this image as a AWT image.
`LUT[]`
`getLuts()`
Returns an array containing the lookup tables used by this image, one per channel, or an empty array if this is an RGB image.
`int`
`getMode()`
`String`
`getModeAsString()`
`ImageProcessor`
`getProcessor(int channel)`
`boolean`
`hasCustomLuts()`
`void`
`reset()`
`void`
`resetDisplayRange()`
`void`
`resetDisplayRanges()`
`void`
`setChannelColorModel(IndexColorModel cm)`
`void`
`setChannelLut(LUT table)`
`void`
`setChannelLut(LUT table, int channel)`
`void`
`setChannelsUpdated()`
Deprecated
`void`
`setDisplayRange(double min, double max)`
Sets the display range of the current channel.
`void`
`setLuts(LUT[] luts)`
`void`
`setMode(int mode)`
`void`
`updateAllChannelsAndDraw()`
`void`
`updateAndDraw()`
Updates this image from the pixel data in its associated ImageProcessor, then displays it.
`void`
`updateChannelAndDraw()`
Updates this image from the pixel data in its associated ImageProcessor, then displays it.
`void`
`updateImage()`
ImageCanvas.paint() calls this method when the ImageProcessor has generated a new image.

### Methods inherited from class ij.ImagePlus

`addImageListener, clone, convertIndexToPosition, convertToImageProcessor, copy, copy, copyAttributes, copyScale, copyToSystem, createEmptyStack, createHyperStack, createImagePlus, createLut, createNewRoi, createRoiMask, createThresholdMask, crop, crop, crop, crop, cropAndSave, cut, deleteRoi, draw, draw, duplicate, flatten, flattenStack, flush, getAllStatistics, getBitDepth, getBufferedImage, getBytesPerPixel, getC, getCalibration, getCanvas, getChannel, getClipboard, getCompositeMode, getCurrentSlice, getDefault16bitRange, getDimensions, getDimensions, getDisplayMode, getFileInfo, getFrame, getGlobalCalibration, getHeight, getHideOverlay, getID, getImageProperties, getImageStack, getImageStackSize, getInfoProperty, getListeners, getLocalCalibration, getLocationAsString, getMask, getNChannels, getNDimensions, getNFrames, getNSlices, getNumericProp, getNumericProperty, getOpenAsHyperStack, getOriginalFileInfo, getOverlay, getPixel, getPlot, getProcessor, getProp, getProperties, getPropertiesAsArray, getProperty, getPropsInfo, getRawStatistics, getRoi, getShortTitle, getSizeInBytes, getSlice, getStack, getStackIndex, getStackSize, getStartTime, getStaticGlobalCalibration, getStatistics, getStatistics, getStatistics, getStatistics, getStringProperty, getT, getTitle, getType, getWidth, getWindow, getZ, hasImageStack, hide, imageUpdate, isComposite, isDisplayedHyperStack, isHyperStack, isInvertedLut, isLocked, isLockedByAnotherThread, isProcessor, isRGB, isStack, isThreshold, isVisible, killRoi, killStack, lock, lockSilently, logImageListeners, mouseMoved, notifyListeners, okToDeleteRoi, paste, paste, paste, plotHistogram, plotHistogram, removeImageListener, removeScale, repaintWindow, resetClipboard, resetRoi, resetStack, resize, resize, restoreRoi, revert, saveRoi, setActivated, setActiveChannels, setAntialiasRendering, setAutoThreshold, setBorderColor, setC, setCalibration, setColor, setDeactivated, setDefault16bitRange, setDefaultDisplayRange, setDimensions, setDisplayMode, setDisplayRange, setFileInfo, setGlobalCalibration, setHideOverlay, setIgnoreFlush, setIgnoreGlobalCalibration, setIJMenuBar, setIJMenuBar, setImage, setImage, setLut, setOpenAsHyperStack, setOverlay, setOverlay, setOverlay, setPlot, setPosition, setPosition, setPositionWithoutUpdate, setProcessor, setProcessor, setProp, setProp, setProperties, setProperty, setRoi, setRoi, setRoi, setRoi, setSlice, setSliceWithoutUpdate, setStack, setStack, setStack, setT, setTemporary, setTitle, setType, setTypeToColor256, setWindow, setZ, show, show, startTiming, tempOverlay, toggleOverlay, toString, trimProcessor, unlock, updateAndRepaintWindow, updatePosition, updateStatusbarValue, updateVirtualSlice, waitTillActivated, windowActivated`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### COMPOSITE

public static final int COMPOSITE
Display modes (note: TRANSPARENT mode has not yet been implemented)

See Also:
  - Constant Field Values

### COLOR

public static final int COLOR
Display modes (note: TRANSPARENT mode has not yet been implemented)

See Also:
  - Constant Field Values

### GRAYSCALE

public static final int GRAYSCALE
Display modes (note: TRANSPARENT mode has not yet been implemented)

See Also:
  - Constant Field Values

### TRANSPARENT

public static final int TRANSPARENT
Display modes (note: TRANSPARENT mode has not yet been implemented)

See Also:
  - Constant Field Values

### MAX_CHANNELS

public static final int MAX_CHANNELS

See Also:
  - Constant Field Values

### colors

public static final Color[] colors

## Constructor Details

### CompositeImage

public CompositeImage(ImagePlus imp)

### CompositeImage

public CompositeImage(ImagePlus imp, int mode)

## Method Details

### getImage

public Image getImage()
Description copied from class: `ImagePlus`
Returns this image as a AWT image.

Overrides:
  `getImage` in class `ImagePlus`

### updateChannelAndDraw

public void updateChannelAndDraw()
Description copied from class: `ImagePlus`
Updates this image from the pixel data in its associated ImageProcessor, then displays it. The CompositeImage class overrides this method to only update the current channel.

Overrides:
  `updateChannelAndDraw` in class `ImagePlus`

### updateAllChannelsAndDraw

public void updateAllChannelsAndDraw()

### getChannelProcessor

public ImageProcessor getChannelProcessor()
Description copied from class: `ImagePlus`
Returns a reference to the current ImageProcessor. The CompositeImage class overrides this method to return the processor associated with the current channel.

Overrides:
  `getChannelProcessor` in class `ImagePlus`

### resetDisplayRanges

public void resetDisplayRanges()

### updateAndDraw

public void updateAndDraw()
Description copied from class: `ImagePlus`
Updates this image from the pixel data in its associated ImageProcessor, then displays it. Does nothing if there is no window associated with this image (i.e. show() has not been called).

Overrides:
  `updateAndDraw` in class `ImagePlus`

### updateImage

public void updateImage()
Description copied from class: `ImagePlus`
ImageCanvas.paint() calls this method when the ImageProcessor has generated a new image.

Overrides:
  `updateImage` in class `ImagePlus`

### createLutFromColor

public LUT createLutFromColor(Color color)

### getChannelColor

public Color getChannelColor()
Returns the color used to display the image subtitle and "Binvalid input: '&C'" histogram.

### getProcessor

public ImageProcessor getProcessor(int channel)

### getActiveChannels

public boolean[] getActiveChannels()

### setMode

public void setMode(int mode)

### getMode

public int getMode()

### getModeAsString

public String getModeAsString()

### getChannelLut

public LUT getChannelLut(int channel)

### getChannelLut

public LUT getChannelLut()

### getLuts

public LUT[] getLuts()
Description copied from class: `ImagePlus`
Returns an array containing the lookup tables used by this image, one per channel, or an empty array if this is an RGB image.

Overrides:
  `getLuts` in class `ImagePlus`
See Also:
  - `ImagePlus.getNChannels()`
  - `ImagePlus.isComposite()`
  - `

    Javascript example:

         luts = imp.getLuts();

         for (i=0; iinvalid input: '<'luts.length; i++)

            IJ.log((i+1)+“: “+luts[i].min+”-”+luts[i].max);

    `

### setLuts

public void setLuts(LUT[] luts)

### copyLuts

public void copyLuts(ImagePlus imp)
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.

### reset

public void reset()

### completeReset

public void completeReset()

### setChannelLut

public void setChannelLut(LUT table)

### setChannelLut

public void setChannelLut(LUT table, int channel)

### setChannelColorModel

public void setChannelColorModel(IndexColorModel cm)

### setDisplayRange

public void setDisplayRange(double min, double max)
Description copied from class: `ImagePlus`
Sets the display range of the current channel. With non-composite images it is identical to ip.setMinAndMax(min, max). Call updateAndDraw() to update the display.

Overrides:
  `setDisplayRange` in class `ImagePlus`

### getDisplayRangeMin

public double getDisplayRangeMin()
Description copied from class: `ImagePlus`
Returns the display range minimum of the current channel.

Overrides:
  `getDisplayRangeMin` in class `ImagePlus`
See Also:
  - `ImageProcessor.getMin()`
  - `ImagePlus.getLuts()`

### getDisplayRangeMax

public double getDisplayRangeMax()
Description copied from class: `ImagePlus`
Returns the display range maximum of the current channel.

Overrides:
  `getDisplayRangeMax` in class `ImagePlus`
See Also:
  - `ImageProcessor.getMax()`
  - `ImagePlus.getLuts()`

### resetDisplayRange

public void resetDisplayRange()

Overrides:
  `resetDisplayRange` in class `ImagePlus`

### hasCustomLuts

public boolean hasCustomLuts()

### close

public void close()
Description copied from class: `ImagePlus`
Closes this image and sets the ImageProcessor to null. To avoid the "Save changes?" dialog, first set the public 'changes' variable to false.

Overrides:
  `close` in class `ImagePlus`

### setChannelsUpdated

public void setChannelsUpdated()
Deprecated