public class DefaultMultiLevelSource extends AbstractMultiLevelSource
MultiLevelSource interface.| Modifier and Type | Field and Description |
|---|---|
static javax.media.jai.Interpolation |
DEFAULT_INTERPOLATION
Default interpolation is "Nearest Neighbour".
|
static MultiLevelSource |
NULL |
| Constructor and Description |
|---|
DefaultMultiLevelSource(RenderedImage sourceImage,
int levelCount)
Constructs a new instance with
DEFAULT_INTERPOLATION. |
DefaultMultiLevelSource(RenderedImage sourceImage,
int levelCount,
javax.media.jai.Interpolation interpolation)
Constructs a new instance.
|
DefaultMultiLevelSource(RenderedImage sourceImage,
MultiLevelModel multiLevelModel)
Constructs a new instance with
DEFAULT_INTERPOLATION. |
DefaultMultiLevelSource(RenderedImage sourceImage,
MultiLevelModel multiLevelModel,
javax.media.jai.Interpolation interpolation)
Constructs a new instance with
DEFAULT_INTERPOLATION. |
| Modifier and Type | Method and Description |
|---|---|
static MultiLevelModel |
createDefaultMultiLevelModel(RenderedImage sourceImage,
int levelCount) |
protected RenderedImage |
createImage(int level)
Creates a scaled version of the level-0 image for the given level.
|
RenderedImage |
getImage(int level)
Returns the level-0 image if
level equals zero, otherwise calls super.getLevelImage(level). |
javax.media.jai.Interpolation |
getInterpolation() |
static Rectangle |
getLevelImageBounds(Rectangle sourceBounds,
double scale)
Computes the boundaries of an image at a given resolution scaling from the given source image boundaries (at level zero).
|
RenderedImage |
getSourceImage() |
void |
reset()
Removes all cached level images and also disposes
any
PlanarImages among them. |
checkLevel, getImageDimension, getImageRectangle, getImageShape, getModelpublic static final javax.media.jai.Interpolation DEFAULT_INTERPOLATION
public static final MultiLevelSource NULL
public DefaultMultiLevelSource(RenderedImage sourceImage, int levelCount)
DEFAULT_INTERPOLATION.sourceImage - The source image.levelCount - The level count.public DefaultMultiLevelSource(RenderedImage sourceImage, int levelCount, javax.media.jai.Interpolation interpolation)
sourceImage - The source image.levelCount - The level count.interpolation - The interpolation.public DefaultMultiLevelSource(RenderedImage sourceImage, MultiLevelModel multiLevelModel)
DEFAULT_INTERPOLATION.sourceImage - The source image.multiLevelModel - The multi level model.public DefaultMultiLevelSource(RenderedImage sourceImage, MultiLevelModel multiLevelModel, javax.media.jai.Interpolation interpolation)
DEFAULT_INTERPOLATION.sourceImage - The source image.multiLevelModel - The multi level model.interpolation - The interpolation.public RenderedImage getSourceImage()
public javax.media.jai.Interpolation getInterpolation()
public RenderedImage getImage(int level)
level equals zero, otherwise calls super.getLevelImage(level).
This override prevents the base class from storing a reference to the source image (the level-0 image).
See AbstractMultiLevelSource.createImage(int).getImage in interface MultiLevelSourcegetImage in class AbstractMultiLevelSourcelevel - The level.protected RenderedImage createImage(int level)
getImage(int) and super.createImage(int).createImage in class AbstractMultiLevelSourcelevel - The level.public void reset()
AbstractMultiLevelSourcePlanarImages among them.
Overrides should always call super.reset().
reset in interface MultiLevelSourcereset in class AbstractMultiLevelSourcepublic static MultiLevelModel createDefaultMultiLevelModel(RenderedImage sourceImage, int levelCount)
public static Rectangle getLevelImageBounds(Rectangle sourceBounds, double scale)
sourceBounds - The image boundaries of the level zero image.scale - The scale at a given level as returned by MultiLevelModel.getScale(int).Copyright © 2014–2022 European Space Agency (ESA). All rights reserved.