| java.lang.Object javax.media.jai.ImageMIPMap
All known Subclasses: javax.media.jai.ImagePyramid,
ImageMIPMap | public class ImageMIPMap implements ImageJAI(Code) | | A class implementing the "MIP map" operation on a
RenderedImage . Given a RenderedImage ,
which represents the image at the highest resolution level, the
image at each lower resolution level may be derived by performing a
specific chain of operations to down sample the image at the next
higher resolution level repeatedly. The highest resolution level is
defined as level 0.
The downSampler is a chain of operations that is
used to derive the image at the next lower resolution level from
the image at the current resolution level. That is, given an image
at resolution level i , the downSampler is
used to obtain the image at resolution level i+1 .
The chain may contain one or more operation nodes; however, each
node must be a RenderedOp . The parameter points to the
last node in the chain. The very first node in the chain must be
a RenderedOp that takes one RenderedImage
as its source. All other nodes may have multiple sources. When
traversing back up the chain, if a node has more than one source,
the first source, source0 , is used to move up the
chain. This parameter is saved by reference.
See Also: ImagePyramid |
currentImage | protected RenderedImage currentImage(Code) | | The image at the current resolution level.
|
currentLevel | protected int currentLevel(Code) | | The current resolution level.
|
downSampler | protected RenderedOp downSampler(Code) | | The operation chain used to derive the lower resolution images.
|
highestImage | protected RenderedImage highestImage(Code) | | The image with the highest resolution.
|
ImageMIPMap | protected ImageMIPMap()(Code) | | The default constructor.
|
ImageMIPMap | public ImageMIPMap(RenderedImage image, AffineTransform transform, Interpolation interpolation)(Code) | | Constructor. The down sampler is an "affine" operation that
uses the supplied AffineTransform and
Interpolation objects.
All input parameters are saved by reference.
Parameters: image - The image with the highest resolution. Parameters: transform - An affine matrix used with an "affine" operationto derive the lower resolution images. Parameters: interpolation - The interpolation method for the "affine"operation. It may be null , in which case thedefault "nearest neighbor" interpolation method is used. throws: IllegalArgumentException - if image isnull . throws: IllegalArgumentException - if transform isnull . |
ImageMIPMap | public ImageMIPMap(RenderedImage image, RenderedOp downSampler)(Code) | | Constructor. The downSampler points to the last
operation node in the RenderedOp chain. The very
first operation in the chain must not have any source images
specified; that is, its number of sources must be 0. All input
parameters are saved by reference.
Parameters: image - The image with the highest resolution. Parameters: downSampler - The operation chain used to derive the lowerresolution images. No validation is done on the firstoperation in the chain. throws: IllegalArgumentException - if image is null . throws: IllegalArgumentException - if downSampler isnull . |
ImageMIPMap | public ImageMIPMap(RenderedOp downSampler)(Code) | | Constructs a new ImageMIPMap from a
RenderedOp chain. The downSampler
points to the last operation node in the
RenderedOp chain. The source image is determined
by traversing up the chain: starting at the bottom node, given by
the downSample parameter, we move to the first
source of the node and repeat until we find either a sourceless
RenderedOp or any other type of
RenderedImage .
The downSampler parameter is saved by reference
and should not be modified during the lifetime of any
ImageMIPMap referring to it.
Parameters: downSampler - The operation chain used to derive the lowerresolution images. The source of the first node in thischain is taken as the image with the highest resolution. throws: IllegalArgumentException - if downSampler isnull . throws: IllegalArgumentException - if downSampler has no sources. throws: IllegalArgumentException - if an object other than aRenderedImage is found in thedownSampler chain. |
addPropertyChangeListener | public void addPropertyChangeListener(PropertyChangeListener listener)(Code) | | Add a PropertyChangeListener to the listener list. The
listener is registered for all properties.
since: JAI 1.1 |
addPropertyChangeListener | public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code) | | Add a PropertyChangeListener for a specific property. The
listener will be invoked only when a call on
firePropertyChange names that specific property. The case of
the name is ignored.
since: JAI 1.1 |
duplicate | protected RenderedOp duplicate(RenderedOp op, Vector images)(Code) | | Duplicates a RenderedOp chain. Each node in the
chain must be a RenderedOp . The op
parameter points to the last RenderedOp in the chain.
The very first op in the chain must have no sources and its source
will be set to the supplied image vector. When traversing up the
chain, if any node has more than one source, the first source will
be used. The first source of each node is duplicated; all other
sources are copied by reference.
Parameters: op - RenderedOp chain Parameters: vector - of source images throws: IllegalArgumentException - if op is null . throws: IllegalArgumentException - if images is null . |
getAsRenderable | public RenderableImage getAsRenderable(int numImages, float minX, float minY, float height)(Code) | | Returns the current image as a RenderableImage .
This method returns a MultiResolutionRenderableImage .
The numImages parameter indicates the number of
RenderedImage s used to construct the
MultiResolutionRenderableImage . Starting with the
current image, the images are obtained by finding the necessary
number of lower resolution images using the downSampler .
The current level and current image will not be changed.
If the width or height reaches 1, the downsampling will stop
and return the renderable image.
The numImages should be greater than or equal to 1.
If a value of less than 1 is specified, this method uses 1 image,
which is the current image.
Parameters: numImages - The number of lower resolution images. Parameters: minX - The minimum X coordinate of the Renderable, as a float. Parameters: minY - The minimum Y coordinate of the Renderable, as a float. Parameters: height - The height of the Renderable, as a float. throws: IllegalArgumentException - if height is less than 0. See Also: MultiResolutionRenderableImage |
getAsRenderable | public RenderableImage getAsRenderable()(Code) | | Returns the current image as a RenderableImage .
This method returns a MultiResolutionRenderableImage
with the current image as the only source image, minX and minY
set to 0.0, and height set to 1.0.
See Also: MultiResolutionRenderableImage |
getCurrentImage | public RenderedImage getCurrentImage()(Code) | | Returns the image at the current resolution level.
|
getCurrentLevel | public int getCurrentLevel()(Code) | | Returns the current resolution level. The highest resolution
level is defined as level 0.
|
getDownImage | public RenderedImage getDownImage()(Code) | | Returns the image at the next lower resolution level,
obtained by applying the downSampler on the
image at the current resolution level.
|
getImage | public RenderedImage getImage(int level)(Code) | | Returns the image at the specified resolution level. The
requested level must be greater than or equal to 0 or
null will be returned.
Parameters: level - The specified level of resolution |
getProperty | public Object getProperty(String name)(Code) | | Returns the specified property. The default implementation
returns java.awt.Image.UndefinedProperty .
Parameters: name - The name of the property. The value of the property, as an Object. exception: IllegalArgumentException - if name is null . |
getPropertyClass | public Class getPropertyClass(String name)(Code) | | Returns the class expected to be returned by a request for
the property with the specified name. If this information
is unavailable, null will be returned.
The Class expected to be return by arequest for the value of this property or null . exception: IllegalArgumentException - if name is null . since: JAI 1.1 |
getPropertyNames | public String[] getPropertyNames()(Code) | | Returns an array of String s recognized as names by
this property source. If no property names match,
null will be returned.
The default implementation returns null , i.e.,
no property names are recognized.
An array of String s giving the validproperty names. |
getPropertyNames | public String[] getPropertyNames(String prefix)(Code) | | Returns an array of String s recognized as names by
this property source that begin with the supplied prefix. If
no property names are recognized, or no property names match,
null will be returned.
The comparison is done in a case-independent manner.
An array of String s giving the validproperty names. Parameters: prefix - the supplied prefix for the property source. throws: IllegalArgumentException - if prefix isnull . |
removePropertyChangeListener | public void removePropertyChangeListener(PropertyChangeListener listener)(Code) | | Remove a PropertyChangeListener from the listener list. This
removes a PropertyChangeListener that was registered for all
properties.
since: JAI 1.1 |
removePropertyChangeListener | public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)(Code) | | Remove a PropertyChangeListener for a specific property. The case
of the name is ignored.
since: JAI 1.1 |
setProperty | public void setProperty(String name, Object value)(Code) | | Sets a property on a ImageMIPMap .
Parameters: name - a String containing the property's name. Parameters: value - the property, as a general Object . throws: IllegalArgumentException - If name or value is null . since: JAI 1.1 |
vectorize | final protected Vector vectorize(RenderedImage image)(Code) | | Creates and returns a Vector containing a single
element equal to the supplied RenderedImage .
since: JAI 1.1 |
vectorize | final protected Vector vectorize(RenderedImage im1, RenderedImage im2)(Code) | | Creates and returns a Vector containing two
elements equal to the supplied RenderedImage s
in the order given.
since: JAI 1.1 |
|
|