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 | |
---|---|
boolean | changes True if any changes have been made to this image. |
static int | COLOR_256 8-bit indexed color |
static int | COLOR_RGB 32-bit RGB color |
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 |
double | pixelDepth Obsolete. |
double | pixelHeight Obsolete. |
double | pixelWidth Obsolete. |
boolean | sCalibrated Obsolete. |
java.lang.String | unit Obsolete. |
java.lang.String | units Obsolete. |
protected int | width |
protected ImageWindow | win |
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 void | addImageListener(ImageListener listener) |
void | close() Closes this image and sets the pixel arrays to null. |
void | copy(boolean cut) Copies the contents of the current selection to the internal clipboard. |
void | copyScale(ImagePlus imp) Copies the calibration of the specified image to this image. |
ImageStack | createEmptyStack() Returns an empty image stack that has the same width, height and color table as this image. |
ImagePlus | createImagePlus() Returns a new ImagePlus with this ImagePlus' attributes (e.g. |
LookUpTable | createLut() Creates a LookUpTable object corresponding 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. |
void | draw() Draws the image. |
void | draw(int x, int y, int width, int height) Draws image and roi outline using a clip rect. |
void | flush() Sets the image arrays to null to help the garbage collector do its job. |
int | getBitDepth() Returns the bit depth, 8, 16, 24 (RGB) or 32. |
Calibration | getCalibration() Returns this image's calibration. |
static ImagePlus | getClipboard() Returns the internal clipboard or null if the internal clipboard is empty. |
int | getCurrentSlice() 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. |
FileInfo | getFileInfo() Returns a FileInfo object containing information, including the pixel array, needed to save this image. |
Calibration | getGlobalCalibration() Returns the system-wide calibration, or null. |
int | getHeight() |
int | getID() Returns this image's unique numeric ID. |
java.awt.Image | getImage() Returns the current AWT image. |
ImageStack | getImageStack() Returns the base image stack. |
int | getImageStackSize() If this is a stack, return the number of slices, else return 1. |
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. |
ImageProcessor | getMask() For images with irregular ROIs, returns a byte mask, otherwise, returns null. |
int | getNChannels() Returns the number of channels. |
int | getNFrames() Returns the number of frames (time-points). |
int | getNSlices() Returns the image depth (number of z-slices). |
FileInfo | getOriginalFileInfo() 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. |
ImageProcessor | getProcessor() Returns a reference to the current ImageProcessor. |
java.util.Properties | getProperties() Returns this image's Properties. |
java.lang.Object | getProperty(java.lang.String key) Returns the property associated with 'key'. |
Roi | getRoi() |
java.lang.String | getShortTitle() Returns a shortened version of image name that does not include spaces or a file name extension. |
ImageStack | getStack() Returns the image stack. |
int | getStackSize() If this is a stack, return the number of slices, else return 1. |
long | getStartTime() Returns the time in milliseconds when startTiming() was last called. |
ImageStatistics | getStatistics() Returns an ImageStatistics object generated using the standard measurement options (area, mean, mode, min and max). |
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 | 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() |
ImageWindow | getWindow() Returns the ImageWindow that is being used to display this image. |
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 | isInvertedLut() Returns true is this image uses an inverting LUT that displays zero as white and 255 as black. |
boolean | isProcessor() |
void | killProcessor() Obsolete. |
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. |
void | mouseMoved(int x, int y) Displays the cursor coordinates and pixel value in the status bar. |
void | paste() Inserts the contents of the internal clipboard into the active image. |
static void | removeImageListener(ImageListener listener) |
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. |
void | restoreRoi() |
void | saveRoi() |
void | setActivated() Called by ImageWindow.windowActivated(). |
void | setCalibration(Calibration cal) Sets this image's calibration. |
void | setColor(java.awt.Color c) Sets current foreground color. |
void | setDimensions(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. |
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 | setIgnoreFlush(boolean ignoreFlush) Set ignoreFlush true to not have the pixel data set to null when the window is closed. |
void | setImage(java.awt.Image img) Replaces the AWT image, if any, with the one specified. |
void | setProcessor(java.lang.String title, ImageProcessor ip) Replaces the ImageProcessor, if any, with the one specified. |
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(java.awt.Rectangle r) Creates a rectangular selection. |
void | setRoi(Roi roi) Assigns the specified ROI to this image and displays it. |
void | setSlice(int index) Activates the specified slice. |
void | setStack(java.lang.String title, ImageStack stack) Replaces the stack, if any, with the one specified. |
void | setTitle(java.lang.String title) Sets the image name. |
protected void | setType(int type) |
void | setWindow(ImageWindow win) This method should only be called from an ImageWindow. |
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. |
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 | updateImage() ImageCanvas.paint() calls this method when the ImageProcessor has generated new image. |
void | updateStatusbarValue() 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
- 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 interfacejava.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 classjava.lang.Object
Overview | Package | Class | Tree | Deprecated | Index | Help |