| boolean | changes
True if any changes have been made to this image.
|
| protected static int | CLOSED|
| static int | COLOR_256
8-bit indexed color
|
| static int | COLOR_RGB
32-bit RGB color
|
| protected boolean | compositeImage|
| protected int | currentSlice|
| protected boolean | dimensionsSet|
| static java.lang.String | flattenTitle
Title of image used by Flatten command
|
| static int | GRAY16
16-bit grayscale (unsigned)
|
| static int | GRAY32
32-bit floating-point grayscale
|
| static int | GRAY8
8-bit grayscale (unsigned)
|
| protected int | height|
| protected java.awt.Image | img|
| protected ImageProcessor | ip|
| protected boolean | locked|
| protected int | nChannels|
| protected int | nFrames|
| protected int | nSlices|
| protected static int | OPENED|
| protected Roi | roi|
| protected static int | SAVED|
| boolean | setIJMenuBar|
| protected static int | UPDATED|
| protected int | width|
| protected ImageWindow | win
|
Constructs an uninitialized ImagePlus.
|
|
Constructs an ImagePlus from a TIFF, BMP, DICOM, FITS,
PGM, GIF or JPRG specified by a path or from a TIFF, DICOM,
GIF or JPEG specified by a URL.
|
|
Constructs an ImagePlus from a stack.
|
|
Constructs an ImagePlus from an ImageProcessor.
|
|
Constructs an ImagePlus from an Image or BufferedImage.
|
| static void | addImageListener(ImageListener listener)|
| java.lang.Object | clone()
Returns a shallow copy of this ImagePlus.
|
| void | close()
Closes this image and sets the ImageProcessor to null.
|
| int[] | convertIndexToPosition(int n)
Converts the stack index 'n' (one-based) into a hyperstack position (channel, slice, frame).
|
| static ImageProcessor | convertToImageProcessor(java.awt.image.BufferedImage img, int band)
Extract pixels as an ImageProcessor from a single band of a BufferedImage.
|
| void | copy()
Copies the contents of the current selection, or the entire
image if there is no selection, to the internal clipboard.
|
| void | copy(boolean cut)
Copies the contents of the current selection to the internal clipboard.
|
| void | copyAttributes(ImagePlus imp)
Used internally.
|
| void | copyScale(ImagePlus imp)
Copies the calibration of the specified image to this image.
|
| void | copyToSystem()
Copies the contents of the current selection, or the entire
image if there is no selection, to the system clipboard.
|
| ImageStack | createEmptyStack()
Returns an empty image stack that has the same
width, height and color table as this image.
|
| ImagePlus | createHyperStack(java.lang.String title, int channels, int slices, int frames, int bitDepth)
This method has been replaced by IJ.createHyperStack().
|
| ImagePlus | createImagePlus()
Returns a new ImagePlus with this image's attributes
(e.g.
|
| LookUpTable | createLut()
Creates a LookUpTable object that corresponds to this image.
|
| void | createNewRoi(int sx, int sy)
Starts the process of creating a new selection, where sx and sy are the
starting screen coordinates.
|
| ByteProcessor | createRoiMask()
Returns an 8-bit binary (foreground=255, background=0)
ROI or overlay mask that has the same dimensions
as this image.
|
| ByteProcessor | createThresholdMask()
Returns an 8-bit binary threshold mask
(foreground=255, background=0)
that has the same dimensions as this image.
|
| ImagePlus | crop()
Returns a copy this image or stack slice, cropped if there is an ROI.
|
| ImagePlus[] | crop(Roi[] rois)
Multi-roi cropping with default "slice" option.
|
| ImagePlus[] | crop(Roi[] rois, java.lang.String options)
Returns an array of cropped images based on the provided
list of rois.
|
| ImagePlus | crop(java.lang.String options)
Returns a cropped copy this image or stack, where 'options'
can be "stack", "slice", "whole-slice" or a range (e.g., "20-30").
|
| void | cropAndSave(Roi[] rois, java.lang.String directory, java.lang.String format)
Saves the contents of the ROIs in this overlay as separate images,
where 'directory' is the directory path and 'format' is "tif", "png" or "jpg".
|
| void | cut()
Copies the contents of the current selection to the internal
clipboard and then clears the selection.
|
| void | deleteRoi()
Deletes the current region of interest.
|
| void | draw()
Draws the image.
|
| void | draw(int x, int y, int width, int height)
Draws image and roi outline using a clip rect.
|
| ImagePlus | duplicate()
Returns a copy of this image or stack.
|
| ImagePlus | flatten()
Returns a "flattened" version of this image, or stack slice, in RGB format.
|
| void | flattenStack()
Flattens all slices of this stack or HyperStack.
|
| void | flush()
Sets the ImageProcessor, Roi, AWT Image and stack image
arrays to null.
|
| ImageStatistics | getAllStatistics()
This method returns complete calibrated statistics for this
image or ROI (with "Limit to threshold"), but it is up to 70 times
slower than getStatistics().
|
| int | getBitDepth()
Returns the bit depth, 8, 16, 24 (RGB) or 32, or 0 if the bit depth
is unknown.
|
| java.awt.image.BufferedImage | getBufferedImage()
Returns a copy of this image as an 8-bit or RGB BufferedImage.
|
| int | getBytesPerPixel()
Returns the number of bytes per pixel.
|
| int | getC()
Returns the current hyperstack channel position.
|
| Calibration | getCalibration()
Returns this image's calibration.
|
| ImageCanvas | getCanvas()
Returns the ImageCanvas being used to
display this image, or null.
|
| int | getChannel()|
| ImageProcessor | getChannelProcessor()
Returns a reference to the current ImageProcessor.
|
| static ImagePlus | getClipboard()
Returns the internal clipboard or null if the internal clipboard is empty.
|
| int | getCompositeMode()
Returns the display mode (IJ.COMPOSITE, IJ.COLOR
or IJ.GRAYSCALE) if this is a CompositeImage, otherwise returns -1.
|
| int | getCurrentSlice()
Returns the current stack index (one-based) or 1 if this is a single image.
|
| static int | getDefault16bitRange()
Returns the default 16-bit display range, 0 (auto-scaling), 8, 10, 12, 14, 15 or 16.
|
| int[] | getDimensions()
Returns the dimensions of this image (width, height, nChannels,
nSlices, nFrames) as a 5 element int array.
|
| int[] | getDimensions(boolean varify)|
| int | getDisplayMode()
Returns the display mode (IJ.COMPOSITE, IJ.COLOR
or IJ.GRAYSCALE) if this is a composite color
image, or 0 if it not.
|
| double | getDisplayRangeMax()
Returns the display range maximum of the current channel.
|
| double | getDisplayRangeMin()
Returns the display range minimum of the current channel.
|
| FileInfo | getFileInfo()
Returns a FileInfo object containing information, including the
pixel array, needed to save this image.
|
| int | getFrame()|
| Calibration | getGlobalCalibration()
Returns the system-wide calibration, or null.
|
| int | getHeight()
Returns the height of this image in pixels.
|
| boolean | getHideOverlay()|
| int | getID()
Returns this image's unique numeric ID.
|
| java.awt.Image | getImage()
Returns this image as a AWT image.
|
| java.util.Properties | getImageProperties()|
| ImageStack | getImageStack()
Returns the base image stack.
|
| int | getImageStackSize()
If this is a stack, returns the actual number of images in the stack, else returns 1.
|
| java.lang.String | getInfoProperty()
Returns the "Info" property string, or null if it is not found.
|
| static java.util.Vector | getListeners()|
| Calibration | getLocalCalibration()
Returns this image's local calibration, ignoring
the "Global" calibration flag.
|
| java.lang.String | getLocationAsString(int x, int y)
Converts the current cursor location to a string.
|
| 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.
|
| ImageProcessor | getMask()
For images with irregular ROIs, returns a byte mask, otherwise, returns
null.
|
| int | getNChannels()
Returns the number of channels.
|
| int | getNDimensions()
Returns the number of dimensions (2, 3, 4 or 5).
|
| int | getNFrames()
Returns the number of frames (time-points).
|
| int | getNSlices()
Returns the image depth (number of z-slices).
|
| double | getNumericProp(java.lang.String key)
Returns the numeric property associated with the specified key
or NaN if the property is not found.
|
| double | getNumericProperty(java.lang.String key)
Returns the numeric value from the "Info" property string
associated with 'key', or NaN if the key is not found or the
value associated with the key is not numeric.
|
| boolean | getOpenAsHyperStack()|
| FileInfo | getOriginalFileInfo()
Returns the FileInfo object that was used to open this image.
|
| Overlay | getOverlay()
Returns the current overly, or null if this image does not have an overlay.
|
| int[] | getPixel(int x, int y)
Returns the pixel value at (x,y) as a 4 element array.
|
| Plot | getPlot()|
| ImageProcessor | getProcessor()
Returns a reference to the current ImageProcessor.
|
| java.lang.String | getProp(java.lang.String key)
Returns as a string the image property associated with the
specified key or null if the property is not found.
|
| java.util.Properties | getProperties()
Returns this image's Properties.
|
| java.lang.String[] | getPropertiesAsArray()
Used for saving string properties in TIFF header.
|
| java.lang.Object | getProperty(java.lang.String key)
Returns the property associated with 'key', or null if it is not found.
|
| java.lang.String | getPropsInfo()
Returns information displayed by Image/Show Info command.
|
| ImageStatistics | getRawStatistics()|
| Roi | getRoi()
Returns the current selection, or null if there is no selection.
|
| java.lang.String | getShortTitle()
If the image title is a file name, returns the name
without the extension and with spaces removed,
otherwise returns the title shortened to the first space.
|
| double | getSizeInBytes()
Returns the size of this image in bytes.
|
| int | getSlice()|
| ImageStack | getStack()
Returns the image stack.
|
| int | getStackIndex(int channel, int slice, int frame)
Returns that stack index (one-based) corresponding to the specified position.
|
| int | getStackSize()
Returns the number of stack images.
|
| long | getStartTime()
Returns the time in milliseconds when
startTiming() was last called.
|
| static Calibration | getStaticGlobalCalibration()
This is a version of getGlobalCalibration() that can be called from a static context.
|
| ImageStatistics | getStatistics()
Get calibrated statistics for this image or ROI, including
histogram, area, mean, min and max, standard
deviation and mode.
|
| ImageStatistics | getStatistics(int mOptions)
Returns an ImageStatistics object generated using the
specified measurement options.
|
| ImageStatistics | getStatistics(int mOptions, int nBins)
Returns an ImageStatistics object generated using the
specified measurement options and histogram bin count.
|
| ImageStatistics | getStatistics(int mOptions, int nBins, double histMin, double histMax)
Returns an ImageStatistics object generated using the
specified measurement options, histogram bin count
and histogram range.
|
| java.lang.String | getStringProperty(java.lang.String key)
Returns the string value from the "Info" property string
associated with 'key', or null if the key is not found.
|
| int | getT()
Returns the current hyperstack frame position.
|
| java.lang.String | getTitle()
Returns the image name.
|
| int | getType()
Returns the current image type (ImagePlus.GRAY8, ImagePlus.GRAY16,
ImagePlus.GRAY32, ImagePlus.COLOR_256 or ImagePlus.COLOR_RGB).
|
| int | getWidth()
Returns the width of this image in pixels.
|
| ImageWindow | getWindow()
Returns the ImageWindow that is being used to display
this image.
|
| int | getZ()
Returns the current hyperstack slice position.
|
| boolean | hasImageStack()
Returns 'true' if this ImagePlus contains an ImageStack.
|
| void | hide()
Closes the window, if any, that is displaying this image.
|
| boolean | imageUpdate(java.awt.Image img, int flags, int x, int y, int w, int h)
Used by ImagePlus to monitor loading of images.
|
| boolean | isComposite()
Returns true if this is a CompositeImage.
|
| boolean | isDisplayedHyperStack()
Returns 'true' if this is a hyperstack currently being displayed in a StackWindow.
|
| boolean | isHyperStack()
Returns 'true' if this image has more
than three dimensions.
|
| boolean | isInvertedLut()
Returns true is this image uses an inverting LUT that
displays zero as white and 255 as black.
|
| boolean | isLocked()
Returns 'true' if the image is locked.
|
| boolean | isLockedByAnotherThread()
Returns 'true' if the image was locked on another thread.
|
| boolean | isProcessor()|
| boolean | isRGB()|
| boolean | isStack()
Deprecated.
Replaced by ImagePlus.hasImageStack()
|
| boolean | isThreshold()
Returns 'true' if this image is thresholded.
|
| boolean | isVisible()
Returns true if this image is currently being displayed in a window.
|
| void | killRoi()
Deletes the current region of interest.
|
| void | killStack()|
| boolean | lock()
Locks the image so other threads can test to see if it is in use.
|
| boolean | lockSilently()
Similar to lock, but doesn't beep and display an error
message if the attempt to lock the image fails.
|
| static void | logImageListeners()
For debug purposes, writes all registered (and possibly,
forgotten) ImageListeners to the log window
|
| void | mouseMoved(int x, int y)
Displays the cursor coordinates and pixel value in the status bar.
|
| protected void | notifyListeners(int id)|
| boolean | okToDeleteRoi()|
| void | paste()
Inserts the contents of the internal clipboard into this image.
|
| void | paste(int x, int y)
Inserts the contents of the internal clipboard at the
specified location, without updating the display.
|
| void | paste(int x, int y, java.lang.String mode)
Copies the contents of the internal clipboard to the
specified location using the specified transfer mode
("Copy", "Blend", "Average", "Difference", "Transparent",
"Transparent2", "AND", "OR", "XOR", "Add", "Subtract",
"Multiply", or "Divide").
|
| PlotWindow | plotHistogram()
Plots a 256 bin histogram of this image and returns the PlotWindow.
|
| PlotWindow | plotHistogram(int bins)
Plots a histogram of this image using the specified
number of bins and returns the PlotWindow.
|
| static void | removeImageListener(ImageListener listener)|
| void | removeScale()
Removes the spatial scaling of this image.
|
| void | repaintWindow()
Calls draw to draw the image and also repaints the
image window to force the information displayed above
the image (dimension, type, size) to be updated.
|
| static void | resetClipboard()
Clears the internal clipboard.
|
| void | resetDisplayRange()|
| void | resetRoi()
Deletes the current region of interest.
|
| void | resetStack()|
| ImagePlus | resize(int dstWidth, int dstHeight, int dstDepth, java.lang.String options)
Returns a scaled copy of this image or ROI, where the
'options' string can contain 'none', 'bilinear'.
|
| ImagePlus | resize(int dstWidth, int dstHeight, java.lang.String options)
Returns a scaled copy of this image or ROI, where the
'options' string can contain 'none', 'bilinear'.
|
| void | restoreRoi()|
| void | revert()
Implements the File/Revert command.
|
| void | saveRoi()|
| void | setActivated()
Called by ImageWindow.windowActivated(); to end waiting in waitTillActivated.
|
| void | setActiveChannels(java.lang.String channels)
Controls which channels in a composite color image are displayed,
where 'channels' is a list of ones and zeros that specify the channels to
display.
|
| void | setAntialiasRendering(boolean antialiasRendering)
Enable/disable use of antialiasing by the flatten() method.
|
| void | setAutoThreshold(java.lang.String method)
Uses the specified method to set the threshold levels
of this image.
|
| void | setBorderColor(java.awt.Color borderColor)|
| void | setC(int channel)
Sets the hyperstack channel position (one based).
|
| void | setCalibration(Calibration cal)
Sets this image's calibration.
|
| void | setColor(java.awt.Color c)
Sets current foreground color.
|
| void | setDeactivated()
Called by new StackWindow(ImagePlus)
before showing the StackWindow, to prepare for
waitTillActivated().
|
| static void | setDefault16bitRange(int bitDepth)
Set the default 16-bit display range, where 'bitDepth' must be 0 (auto-scaling),
8 (0-255), 10 (0-1023), 12 (0-4095, 14 (0-16383), 15 (0-32767) or 16 (0-65535).
|
| void | setDefaultDisplayRange(double min, double max)|
| void | setDimensions(int nChannels, int nSlices, int nFrames)
Sets the 3rd, 4th and 5th dimensions, where
nChannels*nSlices*nFrames
must be equal to the stack size.
|
| void | setDisplayMode(int mode)
Sets the display mode of composite color images, where 'mode'
should be IJ.COMPOSITE, IJ.COLOR or IJ.GRAYSCALE.
|
| void | setDisplayRange(double min, double max)
Sets the display range of the current channel.
|
| void | setDisplayRange(double min, double max, int channels)
Sets the display range of specified channels in an RGB image, where 4=red,
2=green, 1=blue, 6=red+green, etc.
|
| void | setFileInfo(FileInfo fi)
Saves this image's FileInfo so it can be later
retieved using getOriginalFileInfo().
|
| void | setGlobalCalibration(Calibration global)
Sets the system-wide calibration.
|
| void | setHideOverlay(boolean hide)|
| void | setIgnoreFlush(boolean ignoreFlush)|
| void | setIgnoreGlobalCalibration(boolean ignoreGlobalCalibration)|
| boolean | setIJMenuBar()|
| void | setIJMenuBar(boolean b)|
| void | setImage(ImagePlus imp)
Replaces this image with the specified ImagePlus.
|
| void | setImage(java.awt.Image image)
Replaces the image, if any, with the one specified.
|
| void | setLut(LUT lut)
Assigns a LUT (lookup table) to this image.
|
| void | setOpenAsHyperStack(boolean openAsHyperStack)|
| void | setOverlay(Overlay overlay)
Installs a list of ROIs that will be drawn on this image as a non-destructive overlay.
|
| void | setOverlay(Roi roi, java.awt.Color strokeColor, int strokeWidth, java.awt.Color fillColor)
Creates an Overlay from the specified ROI, and assigns it to this image.
|
| void | setOverlay(java.awt.Shape shape, java.awt.Color color, java.awt.BasicStroke stroke)
Creates an Overlay from the specified Shape, Color
and BasicStroke, and assigns it to this image.
|
| void | setPlot(Plot plot)|
| void | setPosition(int n)
Set the current hyperstack position based on the stack index 'n' (one-based).
|
| void | setPosition(int channel, int slice, int frame)
Sets the current hyperstack position and updates the display,
where 'channel', 'slice' and 'frame' are one-based indexes.
|
| void | setPositionWithoutUpdate(int channel, int slice, int frame)
Sets the current hyperstack position without updating the display,
where 'channel', 'slice' and 'frame' are one-based indexes.
|
| void | setProcessor(ImageProcessor ip)
Replaces the ImageProcessor with the one specified and updates the
display.
|
| void | setProcessor(java.lang.String title, ImageProcessor ip)
Replaces the ImageProcessor with the one specified and updates the display.
|
| void | setProp(java.lang.String key, double value)
Saves a persistent numeric propery.
|
| void | setProp(java.lang.String key, java.lang.String value)
Adds a key-value pair to this image's string properties.
|
| void | setProperties(java.lang.String[] props)
Creates a set of image properties from an array of strings.
|
| void | setProperty(java.lang.String key, java.lang.Object value)
Adds a key-value pair to this image's properties.
|
| void | setRoi(int x, int y, int width, int height)
Creates a rectangular selection.
|
| void | setRoi(Roi newRoi)
Assigns the specified ROI to this image and displays it.
|
| void | setRoi(Roi newRoi, boolean updateDisplay)
Assigns 'newRoi' to this image and displays it if 'updateDisplay' is true.
|
| void | setRoi(java.awt.Rectangle r)
Creates a rectangular selection.
|
| void | setSlice(int n)
Displays the specified stack image, where 1<=n<=stackSize.
|
| void | setSliceWithoutUpdate(int n)
Displays the specified stack image (1<=n<=stackSize)
without updating the display.
|
| void | setStack(ImageStack stack)
Replaces the image with the specified stack and updates the display.
|
| void | setStack(ImageStack newStack, int channels, int slices, int frames)|
| void | setStack(java.lang.String title, ImageStack newStack)
Replaces the image with the specified stack and updates
the display.
|
| void | setT(int frame)
Sets the hyperstack frame position (one based).
|
| void | setTemporary()|
| void | setTitle(java.lang.String title)
Sets the image name.
|
| protected void | setType(int type)|
| void | setTypeToColor256()|
| void | setWindow(ImageWindow win)
This method should only be called from an ImageWindow.
|
| void | setZ(int slice)
Sets the hyperstack slice position (one based).
|
| void | show()
Opens a window to display this image and clears the status bar.
|
| void | show(java.lang.String statusMessage)
Opens a window to display this image and displays
'statusMessage' in the status bar.
|
| void | startTiming()
Calls System.currentTimeMillis() to save the current
time so it can be retrieved later using getStartTime()
to calculate the elapsed time of an operation.
|
| boolean | tempOverlay()|
| boolean | toggleOverlay()|
| java.lang.String | toString()|
| void | trimProcessor()
Frees RAM by setting the snapshot (undo) buffer in
the current ImageProcessor to null.
|
| void | unlock()
Unlocks the image.
|
| void | updateAndDraw()
Updates this image from the pixel data in its
associated ImageProcessor, then displays it.
|
| void | updateAndRepaintWindow()
Calls updateAndDraw to update from the pixel data
and draw the image, and also repaints the image
window to force the information displayed above
the image (dimension, type, size) to be updated.
|
| 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.
|
| void | updatePosition(int c, int z, int t)|
| void | updateStatusbarValue()
Redisplays the (x,y) coordinates and pixel value (which may
have changed) in the status bar.
|
| void | updateVirtualSlice()
Use to update the image when the underlying virtual stack changes.
|
| void | waitTillActivated()
Waits until the image window becomes activated.
|
| boolean | windowActivated()