Package com.bc.ceres.glevel.support
Class DefaultMultiLevelModel
java.lang.Object
com.bc.ceres.glevel.support.DefaultMultiLevelModel
- All Implemented Interfaces:
MultiLevelModel
Deprecated.
A default implementation for a the
MultiLevelModel interface.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultMultiLevelModel(int levelCount, AffineTransform imageToModelTransform, int width, int height) Deprecated.Constructs a a new model for a multi level source.DefaultMultiLevelModel(int levelCount, AffineTransform imageToModelTransform, Rectangle2D modelBounds) Deprecated.Constructs a a new model for a multi level source.DefaultMultiLevelModel(AffineTransform imageToModelTransform, int width, int height) Deprecated.Constructs a a new model for a multi level source. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckLevel(int level) Deprecated.final AffineTransformgetImageToModelTransform(int level) Deprecated.Gets a copy (non-life object) of the affine transformation from image to model coordinates for the given level.intgetLevel(double scale) Deprecated.Gets the resolution level for a given scaling factor, e.g.intDeprecated.Gets the number of resolution levels, which is always greater than zero.static intgetLevelCount(int width, int height) Deprecated.Computes the number of levels using theDEFAULT_MAX_LEVEL_PIXEL_COUNTconstant.Deprecated.Gets the bounding box in model coordinates.static Rectangle2DgetModelBounds(AffineTransform i2mTransform, int width, int height) Deprecated.Computes the image bounding box in model coordinates.static Rectangle2DgetModelBounds(AffineTransform i2mTransform, RenderedImage levelZeroImage) Deprecated.Computes the image bounding box in model coordinates.final AffineTransformgetModelToImageTransform(int level) Deprecated.Gets a copy (non-life object) of the affine transformation from model to image coordinates for the given level.doublegetScale(int level) Deprecated.Gets the scale for a given resolution level, e.g.protected static doublelog2(double v) Deprecated.protected static doublepow2(double v) Deprecated.voidsetModelBounds(Rectangle2D modelBounds) Deprecated.
-
Field Details
-
DEFAULT_MAX_LEVEL_PIXEL_COUNT
public static final int DEFAULT_MAX_LEVEL_PIXEL_COUNTDeprecated.- See Also:
-
-
Constructor Details
-
DefaultMultiLevelModel
Deprecated.Constructs a a new model for a multi level source. The number of levels is computed bygetLevelCount(int, int). The image bounds are computed bygetModelBounds(java.awt.geom.AffineTransform, int, int).- Parameters:
imageToModelTransform- The affine transformation from image to model coordinates.width- The width of the image in pixels at level zero.height- The height of the image in pixels at level zero.
-
DefaultMultiLevelModel
public DefaultMultiLevelModel(int levelCount, AffineTransform imageToModelTransform, int width, int height) Deprecated.Constructs a a new model for a multi level source. The image bounds are computed bygetModelBounds(java.awt.geom.AffineTransform, int, int).- Parameters:
levelCount- The number of levels.imageToModelTransform- The affine transformation from image to model coordinates.width- The width of the image in pixels at level zero.height- The height of the image in pixels at level zero.
-
DefaultMultiLevelModel
public DefaultMultiLevelModel(int levelCount, AffineTransform imageToModelTransform, Rectangle2D modelBounds) Deprecated.Constructs a a new model for a multi level source.- Parameters:
levelCount- The number of levels.imageToModelTransform- The affine transformation from image to model coordinates.modelBounds- The image bounds in model coordinates.
-
-
Method Details
-
getLevelCount
public int getLevelCount()Deprecated.Description copied from interface:MultiLevelModelGets the number of resolution levels, which is always greater than zero.- Specified by:
getLevelCountin interfaceMultiLevelModel- Returns:
- The number of resolution levels.
-
getLevel
public int getLevel(double scale) Deprecated.Description copied from interface:MultiLevelModelGets the resolution level for a given scaling factor, e.g.level=log(scale)/log(2).- Specified by:
getLevelin interfaceMultiLevelModel- Parameters:
scale- The scaling factor, will always be a greater than or equal to 1.- Returns:
- The resolution level, must be in the range 0 to
levelCount-1. - See Also:
-
getScale
public double getScale(int level) Deprecated.Description copied from interface:MultiLevelModelGets the scale for a given resolution level, e.g.scale=pow(2,level).- Specified by:
getScalein interfaceMultiLevelModel- Parameters:
level- The resolution level, must be in the range 0 tolevelCount-1.- Returns:
- The scaling factor, must be greater than or equal to 1.
getLevel(scale)shall returnlevel. - See Also:
-
getImageToModelTransform
Deprecated.Description copied from interface:MultiLevelModelGets a copy (non-life object) of the affine transformation from image to model coordinates for the given level.- Specified by:
getImageToModelTransformin interfaceMultiLevelModel- Parameters:
level- The resolution level, must be in the range 0 tolevelCount-1.- Returns:
- The affine transformation from image to model coordinates.
-
getModelToImageTransform
Deprecated.Description copied from interface:MultiLevelModelGets a copy (non-life object) of the affine transformation from model to image coordinates for the given level.- Specified by:
getModelToImageTransformin interfaceMultiLevelModel- Parameters:
level- The resolution level, must be in the range 0 tolevelCount-1.- Returns:
- The affine transformation from model to image coordinates.
-
pow2
protected static double pow2(double v) Deprecated. -
log2
protected static double log2(double v) Deprecated. -
checkLevel
protected void checkLevel(int level) Deprecated. -
getModelBounds
Deprecated.Description copied from interface:MultiLevelModelGets the bounding box in model coordinates.- Specified by:
getModelBoundsin interfaceMultiLevelModel- Returns:
- The bounding box, may be
nullif unspecified.
-
setModelBounds
Deprecated. -
getModelBounds
public static Rectangle2D getModelBounds(AffineTransform i2mTransform, RenderedImage levelZeroImage) Deprecated.Computes the image bounding box in model coordinates.- Parameters:
i2mTransform- The affine transformation from image to model coordinates.levelZeroImage- The image at level zero.- Returns:
- The number of levels.
-
getModelBounds
Deprecated.Computes the image bounding box in model coordinates.- Parameters:
i2mTransform- The affine transformation from image to model coordinates.width- The width of the image in pixels at level zero.height- The height of the image in pixels at level zero.- Returns:
- The number of levels.
-
getLevelCount
public static int getLevelCount(int width, int height) Deprecated.Computes the number of levels using theDEFAULT_MAX_LEVEL_PIXEL_COUNTconstant.- Parameters:
width- The width of the image in pixels at level zero.height- The height of the image in pixels at level zero.- Returns:
- The number of levels.
-