Image Plus Lite



This is an extended image class that supports 8-bit, 16-bit,32-bit (real) and RGB images. It also provides support for3D image stacks.

Image Plus Lite is an image manipulation tool that lets you edit, fine-tune, watermark, resize, rotate, convert and apply artistic effects to your photos. The UpWalker Lite Plus is the best investment I have made for my health and body. No more shuffling, no more walking hunched over, no more walking slowly. It glides effortlessly. The seat is like having a couple of more hands; all sorts of objects can be placed on it and rolled from room to room. Download ZEN Lite, your free copy of the powerful ZEN software. Use this free software as a viewer for your CZI files or other standard file types, or even to perform image acquisition or fundamental image analysis and processing tasks.

See Also:
ImageProcessor, ImageStack, ImageWindow, ImageCanvas
Field Summary
booleanchanges
True if any changes have been made to this image.
static intCOLOR_256
8-bit indexed color
static intCOLOR_RGB
32-bit RGB color
static intGRAY16
16-bit grayscale (unsigned)
static intGRAY32
32-bit floating-point grayscale
static intGRAY8
8-bit grayscale (unsigned)
protected intheight
protected java.awt.Imageimg
protected ImageProcessorip
protected booleanlocked
doublepixelDepth
Obsolete.
doublepixelHeight
Obsolete.
doublepixelWidth
Obsolete.
booleansCalibrated
Obsolete.
java.lang.Stringunit
Obsolete.
java.lang.Stringunits
Obsolete.
protected intwidth
protected ImageWindowwin
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Fields inherited from interface ij.measure.Measurements
AREA, AREA_FRACTION, CENTER_OF_MASS, CENTROID, CIRCULARITY, ELLIPSE, FERET, INTEGRATED_DENSITY, INVERT_Y, KURTOSIS, LABELS, LIMIT, MAX_STANDARDS, MEAN, MEDIAN, MIN_MAX, MODE, PERIMETER, RECT, SKEWNESS, SLICE, STD_DEV
Constructor Summary
ImagePlus()
Constructs an uninitialized ImagePlus.
ImagePlus(java.lang.String pathOrURL)
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.
ImagePlus(java.lang.String title, java.awt.Image img)
Constructs an ImagePlus from an AWT Image.
ImagePlus(java.lang.String title, ImageProcessor ip)
Constructs an ImagePlus from an ImageProcessor.
ImagePlus(java.lang.String title, ImageStack stack)
Constructs an ImagePlus from a stack.
Method Summary
static voidaddImageListener(ImageListener listener)
voidclose()
Closes this image and sets the pixel arrays to null.
voidcopy(boolean cut)
Copies the contents of the current selection to the internal clipboard.
voidcopyScale(ImagePlus imp)
Copies the calibration of the specified image to this image.
ImageStackcreateEmptyStack()
Returns an empty image stack that has the same width, height and color table as this image.
ImagePluscreateImagePlus()
Returns a new ImagePlus with this ImagePlus' attributes (e.g.
LookUpTablecreateLut()
Creates a LookUpTable object corresponding to this image.
voidcreateNewRoi(int sx, int sy)
Starts the process of creating a new selection, where sx and sy are the starting screen coordinates.
voiddraw()
Draws the image.
voiddraw(int x, int y, int width, int height)
Draws image and roi outline using a clip rect.
voidflush()
Sets the image arrays to null to help the garbage collector do its job.
intgetBitDepth()
Returns the bit depth, 8, 16, 24 (RGB) or 32.
CalibrationgetCalibration()
Returns this image's calibration.
static ImagePlusgetClipboard()
Returns the internal clipboard or null if the internal clipboard is empty.
intgetCurrentSlice()
Returns the current stack slice number or 1 if this is a single image.
int[]getDimensions()
Returns the dimensions of this image (width, height, nChannels, nSlices, nFrames) as a 5 element int array.
FileInfogetFileInfo()
Returns a FileInfo object containing information, including the pixel array, needed to save this image.
CalibrationgetGlobalCalibration()
Returns the system-wide calibration, or null.
intgetHeight()
intgetID()
Returns this image's unique numeric ID.
java.awt.ImagegetImage()
Returns the current AWT image.
ImageStackgetImageStack()
Returns the base image stack.
intgetImageStackSize()
If this is a stack, return the number of slices, else return 1.
CalibrationgetLocalCalibration()
Returns this image's local calibration, ignoring the 'Global' calibration flag.
java.lang.StringgetLocationAsString(int x, int y)
Converts the current cursor location to a string.
ImageProcessorgetMask()
For images with irregular ROIs, returns a byte mask, otherwise, returns null.
intgetNChannels()
Returns the number of channels.
intgetNFrames()
Returns the number of frames (time-points).
intgetNSlices()
Returns the image depth (number of z-slices).
FileInfogetOriginalFileInfo()
Returns the FileInfo object that was used to open this image.
int[]getPixel(int x, int y)
Returns the pixel value at (x,y) as a 4 element array.
ImageProcessorgetProcessor()
Returns a reference to the current ImageProcessor.
java.util.PropertiesgetProperties()
Returns this image's Properties.
java.lang.ObjectgetProperty(java.lang.String key)
Returns the property associated with 'key'.
RoigetRoi()
java.lang.StringgetShortTitle()
Returns a shortened version of image name that does not include spaces or a file name extension.
ImageStackgetStack()
Returns the image stack.
intgetStackSize()
If this is a stack, return the number of slices, else return 1.
longgetStartTime()
Returns the time in milliseconds when startTiming() was last called.
ImageStatisticsgetStatistics()
Returns an ImageStatistics object generated using the standard measurement options (area, mean, mode, min and max).
ImageStatisticsgetStatistics(int mOptions)
Returns an ImageStatistics object generated using the specified measurement options.
ImageStatisticsgetStatistics(int mOptions, int nBins)
Returns an ImageStatistics object generated using the specified measurement options and histogram bin count.
ImageStatisticsgetStatistics(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.StringgetTitle()
Returns the image name.
intgetType()
Returns the current image type (ImagePlus.GRAY8, ImagePlus.GRAY16, ImagePlus.GRAY32, ImagePlus.COLOR_256 or ImagePlus.COLOR_RGB).
intgetWidth()
ImageWindowgetWindow()
Returns the ImageWindow that is being used to display this image.
voidhide()
Closes the window, if any, that is displaying this image.
booleanimageUpdate(java.awt.Image img, int flags, int x, int y, int w, int h)
Used by ImagePlus to monitor loading of images.
booleanisInvertedLut()
Returns true is this image uses an inverting LUT that displays zero as white and 255 as black.
booleanisProcessor()
voidkillProcessor()
Obsolete.
voidkillRoi()
Deletes the current region of interest.
voidkillStack()
booleanlock()
Locks the image so other threads can test to see if it is in use.
booleanlockSilently()
Similar to lock, but doesn't beep and display an error message if the attempt to lock the image fails.
voidmouseMoved(int x, int y)
Displays the cursor coordinates and pixel value in the status bar.
voidpaste()
Inserts the contents of the internal clipboard into the active image.
static voidremoveImageListener(ImageListener listener)
voidrepaintWindow()
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.
voidrestoreRoi()
voidsaveRoi()
voidsetActivated()
Called by ImageWindow.windowActivated().
voidsetCalibration(Calibration cal)
Sets this image's calibration.
voidsetColor(java.awt.Color c)
Sets current foreground color.
voidsetDimensions(int nChannels, int nSlices, int nFrames)
Sets the 3rd, 4th and 5th dimensions, where nChannels*nSlices*nFrames must be the same as the stack size.
voidsetFileInfo(FileInfo fi)
Saves this image's FileInfo so it can be later retieved using getOriginalFileInfo().
voidsetGlobalCalibration(Calibration global)
Sets the system-wide calibration.
voidsetIgnoreFlush(boolean ignoreFlush)
Set ignoreFlush true to not have the pixel data set to null when the window is closed.
voidsetImage(java.awt.Image img)
Replaces the AWT image, if any, with the one specified.
voidsetProcessor(java.lang.String title, ImageProcessor ip)
Replaces the ImageProcessor, if any, with the one specified.
voidsetProperty(java.lang.String key, java.lang.Object value)
Adds a key-value pair to this image's properties.
voidsetRoi(int x, int y, int width, int height)
Creates a rectangular selection.
voidsetRoi(java.awt.Rectangle r)
Creates a rectangular selection.
voidsetRoi(Roi roi)
Assigns the specified ROI to this image and displays it.
voidsetSlice(int index)
Activates the specified slice.
voidsetStack(java.lang.String title, ImageStack stack)
Replaces the stack, if any, with the one specified.
voidsetTitle(java.lang.String title)
Sets the image name.
protected voidsetType(int type)
voidsetWindow(ImageWindow win)
This method should only be called from an ImageWindow.
voidshow()
Opens a window to display this image and clears the status bar.
voidshow(java.lang.String statusMessage)
Opens a window to display this image and displays 'statusMessage' in the status bar.
voidstartTiming()
Calls System.currentTimeMillis() to save the current time so it can be retrieved later using getStartTime() to calculate the elapsed time of an operation.
java.lang.StringtoString()
voidtrimProcessor()
Frees RAM by setting the snapshot (undo) buffer in the current ImageProcessor to null.
voidunlock()
Unlocks the image.
voidupdateAndDraw()
Updates this image from the pixel data in its associated ImageProcessor, then displays it.
voidupdateAndRepaintWindow()
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.
voidupdateImage()
ImageCanvas.paint() calls this method when the ImageProcessor has generated new image.
voidupdateStatusbarValue()
Redisplays the (x,y) coordinates and pixel value (which may have changed) in the status bar.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail

GRAY8

8-bit grayscale (unsigned)
See Also:
Constant Field Values

GRAY16

16-bit grayscale (unsigned)
See Also:
Constant Field Values

GRAY32

32-bit floating-point grayscale
See Also:
Constant Field Values

COLOR_256

8-bit indexed color
See Also:
Constant Field Values

COLOR_RGB

32-bit RGB color
See Also:
Constant Field Values

changes

True if any changes have been made to this image.

pixelWidth

Obsolete. Use GetCalibration().

Image Plus Lite Free

pixelHeight

Obsolete. Use GetCalibration().

pixelDepth

Obsolete. Use GetCalibration().

unit

Obsolete. Use GetCalibration().

units

Image Plus Lite
Obsolete. Use GetCalibration().

sCalibrated

Obsolete. Use GetCalibration().

img

ip

win

width

height

locked

Constructor Detail

ImagePlus

Constructs an uninitialized ImagePlus.

ImagePlus

Constructs an ImagePlus from an AWT Image. The first argument will be used as the title of the window that displays the image. Throws an IllegalStateException if an error occurs while loading the image.

ImagePlus

Constructs an ImagePlus from an ImageProcessor.

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.

ImagePlus

Constructs an ImagePlus from a stack.
Method Detail

lock

Locks the image so other threads can test to see if it is in use. Returns true if the image was successfully locked. Beeps, displays a message in the status bar, and returns false if the image is already locked.

lockSilently

Similar to lock, but doesn't beep and display an error message if the attempt to lock the image fails.

unlock

Unlocks the image.

draw

Draws the image. If there is an ROI, its outline is also displayed. Does nothing if there is no window associated with this image (i.e. show() has not been called).

draw

Draws image and roi outline using a clip rect.

updateAndDraw

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).

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.

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.

updateImage

ImageCanvas.paint() calls this method when the ImageProcessor has generated new image.

hide

Closes the window, if any, that is displaying this image.

close

Closes this image and sets the pixel arrays to null.

show

Opens a window to display this image and clears the status bar.

show

Opens a window to display this image and displays 'statusMessage' in the status bar.

setActivated

Called by ImageWindow.windowActivated().

getImage

Returns the current AWT image.

getID

Returns this image's unique numeric ID.

setImage

Replaces the AWT image, if any, with the one specified. Throws an IllegalStateException if an error occurs while loading the image.

setProcessor

Replaces the ImageProcessor, if any, with the one specified. Set 'title' to null to leave the image title unchanged.

Image Plus Dental Design

setStack

Replaces the stack, if any, with the one specified. Set 'title' to null to leave the title unchanged.

setFileInfo

Saves this image's FileInfo so it can be later retieved using getOriginalFileInfo().

getWindow

Returns the ImageWindow that is being used to display this image. Returns null if show() has not be called or the ImageWindow has been closed.

setWindow

This method should only be called from an ImageWindow.

setColor

Sets current foreground color.

isProcessor

getProcessor

Returns a reference to the current ImageProcessor. If there is no ImageProcessor, it creates one. Returns null if this ImagePlus contains no ImageProcessor and no AWT Image.

trimProcessor

Frees RAM by setting the snapshot (undo) buffer in the current ImageProcessor to null.

killProcessor

Obsolete.

getMask

For images with irregular ROIs, returns a byte mask, otherwise, returns null. Mask pixels have a non-zero value.

getStatistics

Returns an ImageStatistics object generated using the standard measurement options (area, mean, mode, min and max).

getStatistics

Returns an ImageStatistics object generated using the specified measurement options.

getStatistics

Returns an ImageStatistics object generated using the specified measurement options and histogram bin count. Note: except for float images, the number of bins is currently fixed at 256.

getStatistics

Returns an ImageStatistics object generated using the specified measurement options, histogram bin count and histogram range. Note: for 8-bit and RGB images, the number of bins is fixed at 256 and the histogram range is always 0-255.

getTitle

Returns the image name.

getShortTitle

Returns a shortened version of image name that does not include spaces or a file name extension.

setTitle

Sets the image name.

getWidth

getHeight

getStackSize

If this is a stack, return the number of slices, else return 1.

getImageStackSize

If this is a stack, return the number of slices, else return 1.

setDimensions

Sets the 3rd, 4th and 5th dimensions, where nChannels*nSlices*nFrames must be the same as the stack size.

getNChannels

Returns the number of channels.

getNSlices

Returns the image depth (number of z-slices).

getNFrames

Returns the number of frames (time-points).

getDimensions

Returns the dimensions of this image (width, height, nChannels, nSlices, nFrames) as a 5 element int array.

getType

Returns the current image type (ImagePlus.GRAY8, ImagePlus.GRAY16, ImagePlus.GRAY32, ImagePlus.COLOR_256 or ImagePlus.COLOR_RGB).
See Also:
getBitDepth()

getBitDepth

Returns the bit depth, 8, 16, 24 (RGB) or 32. RGB images actually use 32 bits per pixel.

setType

setProperty

Adds a key-value pair to this image's properties.

getProperty

Returns the property associated with 'key'. May return null.

getProperties

Returns this image's Properties. May return null.

createLut

Creates a LookUpTable object corresponding to this image.

isInvertedLut

Returns true is this image uses an inverting LUT that displays zero as white and 255 as black.

getPixel

Returns the pixel value at (x,y) as a 4 element array. Grayscale values are retuned in the first element. RGB values are returned in the first 3 elements. For indexed color images, the RGB values are returned in the first 3 three elements and the index (0-255) is returned in the last.

createEmptyStack

Returns an empty image stack that has the same width, height and color table as this image.

getStack

Returns the image stack. The stack may have only one slice. After adding or removing slices, call setStack() to update the image and the window that is displaying it.
See Also:
setStack(java.lang.String, ij.ImageStack)

getImageStack

Returns the base image stack.

getCurrentSlice

Returns the current stack slice number or 1 if this is a single image.

killStack

Image Plus Epinal

setSlice

Activates the specified slice. The index must be >= 1 and <= N, where N in the number of slices in the stack. Does nothing if this ImagePlus does not use a stack.

getRoi

setRoi

Assigns the specified ROI to this image and displays it. Any existing ROI is deleted if roi is null or its width or height is zero.

setRoi

Creates a rectangular selection.

setRoi

Creates a rectangular selection.

createNewRoi

Starts the process of creating a new selection, where sx and sy are the starting screen coordinates. The selection type is determined by which tool in the tool bar is active. The user interactively sets the selection size and shape.

killRoi

Deletes the current region of interest. Makes a copy of the current ROI so it can be recovered by the Edit/Restore Selection command.

saveRoi

restoreRoi

getFileInfo

Returns a FileInfo object containing information, including the pixel array, needed to save this image. Use getOriginalFileInfo() to get a copy of the FileInfo object used to open the image.
See Also:
FileInfo, getOriginalFileInfo(), setFileInfo(ij.io.FileInfo)

getOriginalFileInfo

Returns the FileInfo object that was used to open this image. Returns null for images created using the File/New command.
See Also:
FileInfo, getFileInfo()

imageUpdate

Used by ImagePlus to monitor loading of images.
Specified by:
imageUpdate in interface java.awt.image.ImageObserver

flush

Sets the image arrays to null to help the garbage collector do its job. Does nothing if the image is locked or a setIgnoreFlush(true) call has been made.

setIgnoreFlush

Set ignoreFlush true to not have the pixel data set to null when the window is closed.

createImagePlus

Returns a new ImagePlus with this ImagePlus' attributes (e.g. spatial scale), but no image.

copyScale

Copies the calibration of the specified image to this image.

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.

getStartTime

Returns the time in milliseconds when startTiming() was last called.

getCalibration

Returns this image's calibration.

setCalibration

Sets this image's calibration.

setGlobalCalibration

Sets the system-wide calibration.

getGlobalCalibration

Returns the system-wide calibration, or null.

getLocalCalibration

Returns this image's local calibration, ignoring the 'Global' calibration flag.

mouseMoved

Image Plus Literary

Displays the cursor coordinates and pixel value in the status bar. Called by ImageCanvas when the mouse moves. Can be overridden by ImagePlus subclasses.

updateStatusbarValue

Redisplays the (x,y) coordinates and pixel value (which may have changed) in the status bar. Called by the Next Slice and Previous Slice commands to update the z-coordinate and pixel value.

getLocationAsString

Converts the current cursor location to a string.

copy

Copies the contents of the current selection to the internal clipboard. Copies the entire image if there is no selection. Also clears the selection if cut is true.

paste

Inserts the contents of the internal clipboard into the active image. If there is a selection the same size as the image on the clipboard, the image is inserted into that selection, otherwise the selection is inserted into the center of the image.

getClipboard

Returns the internal clipboard or null if the internal clipboard is empty.

addImageListener

removeImageListener

toString

Image Plus Lite Download

Overrides:
toString in class java.lang.Object
OverviewPackageClassTreeDeprecatedIndexHelp
FRAMESNO FRAMESAll Classes SUMMARY: NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD