public interface BasicImageDisplay extends BasicImageReadableProcessor
This interface also assumes that the ImageProcessor class is used to process the source image to produce the actual image to be displayed.
Any JAI PlanarImage can be displayed. Grayscale images may be displayed with false colors, depending on the ImageProcessor options specified.
Modifier and Type | Method and Description |
---|---|
void |
addImageGraphicsHandler(ImageGraphicsHandler igh)
Register as an image graphics handler.
|
JComponent |
getCanvas()
Return the image canvas component.
|
CoordinateConverter |
getCoordinateConverter()
Return the object used to convert coordinates.
|
javax.media.jai.PlanarImage |
getDisplayImage()
Return the image being displayed (after image processing).
|
javax.media.jai.PlanarImage |
getImage()
Return the source image (before processing).
|
int |
getImageHeight()
Return the height of the source image in pixels
|
ImageProcessor |
getImageProcessor()
Return the image processor object.
|
int |
getImageWidth()
Return the width of the source image in pixels
|
javax.media.jai.Interpolation |
getInterpolation()
Return the interpolation object used to scale the image
|
Point2D.Double |
getOrigin()
Return the origin of the displayed image in canvas coordinates.
|
double |
getPixelValue(Point2D.Double p,
int band)
Return the value of the pixel in the given band at the given user coordinates
|
float |
getScale()
Return the current scale (zoom factor) for the image.
|
RenderingHints |
getScaleHints()
Return the optional rendering hints used for the image scale operation
|
Rectangle2D.Double |
getVisibleArea()
Return a rectangle describing the visible area of the image
(in user coordinates).
|
WorldCoordinateConverter |
getWCS()
Return the object used to convert between image and world coordinates,
or null if none is available.
|
boolean |
isAutoCenterImage()
Return true if the image is automatically centered when it is smaller than the window.
|
boolean |
isImmediateMode()
Return true if immediate mode is turned on.
|
boolean |
isInitialized()
Return true if this widget has been initialized and is displaying an image.
|
boolean |
isPrescaled()
Return true if the image has been prescaled
|
boolean |
isWCS()
Return true if the current image supports world coordinates
(has the necessary keywords in the header).
|
void |
removeImageGraphicsHandler(ImageGraphicsHandler igh)
Unregister as an image graphics handler.
|
void |
scaleToFit()
Set the scaling factor so that the image will fit in the current window.
|
void |
setAutoCenterImage(boolean b)
Set to true (default) to automatically center the image, if it is smaller than the window.
|
void |
setImage(javax.media.jai.PlanarImage im)
Set the source image to display.
|
void |
setImageProcessor(ImageProcessor imageProcessor)
Set the image processor to use to get the image to display.
|
void |
setImmediateMode(boolean b)
Set to true if scrolling and other operations should update the image immediately,
otherwise only on button release.
|
void |
setInterpolation(javax.media.jai.Interpolation i)
Set the interpolation object used to scale the image (a subclass
of Interpolation, such as InterpolationNearest (default), or
InterpolationBilinear (better, but slower)).
|
void |
setOrigin(Point2D.Double origin)
Set the origin of the image to display in canvas coordinates.
|
void |
setPrescaled(boolean b)
Set to true if the image being displayed has been prescaled (such as
for a pan window or thumbnail image).
|
void |
setScale(float scale)
Set the scale (zoom factor) for the image.
|
void |
setScaleHints(RenderingHints hints)
Set the optional rendering hints for the image scale operation
|
void |
setWCS(WorldCoordinateConverter wcs)
Set the object used to convert between image and world coordinates.
|
void |
updateImage()
Update the image display after a change has been made.
|
void setImage(javax.media.jai.PlanarImage im)
javax.media.jai.PlanarImage getImage()
javax.media.jai.PlanarImage getDisplayImage()
boolean isInitialized()
void updateImage()
void setImageProcessor(ImageProcessor imageProcessor)
ImageProcessor getImageProcessor()
getImageProcessor
in interface BasicImageReadableProcessor
PlanarImage
int getImageWidth()
int getImageHeight()
Point2D.Double getOrigin()
void setScale(float scale)
float getScale()
void scaleToFit()
Note that only integer scaling factors are used, for example 2, 1, 1/2, 1/3, etc., for performance reasons.
void setPrescaled(boolean b)
boolean isPrescaled()
void setScaleHints(RenderingHints hints)
RenderingHints getScaleHints()
void setAutoCenterImage(boolean b)
boolean isAutoCenterImage()
void setInterpolation(javax.media.jai.Interpolation i)
javax.media.jai.Interpolation getInterpolation()
double getPixelValue(Point2D.Double p, int band)
Rectangle2D.Double getVisibleArea()
getVisibleArea
in interface BasicImageReadableProcessor
void setOrigin(Point2D.Double origin)
JComponent getCanvas()
void setImmediateMode(boolean b)
boolean isImmediateMode()
boolean isWCS()
WorldCoordinateConverter getWCS()
void setWCS(WorldCoordinateConverter wcs)
CoordinateConverter getCoordinateConverter()
void addImageGraphicsHandler(ImageGraphicsHandler igh)
void removeImageGraphicsHandler(ImageGraphicsHandler igh)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.