Class DefaultPlanePyramidSource
java.lang.Object
net.algart.matrices.maps.pyramids.io.api.AbstractPlanePyramidSource
net.algart.matrices.maps.pyramids.io.api.sources.DefaultPlanePyramidSource
- All Implemented Interfaces:
PlanePyramidSource
public final class DefaultPlanePyramidSource
extends AbstractPlanePyramidSource
implements PlanePyramidSource
-
Nested Class Summary
Nested classes/interfaces inherited from class net.algart.matrices.maps.pyramids.io.api.AbstractPlanePyramidSource
AbstractPlanePyramidSource.LabelPosition, AbstractPlanePyramidSource.TileDirection, AbstractPlanePyramidSource.WholeSlideScalerNested classes/interfaces inherited from interface net.algart.matrices.maps.pyramids.io.api.PlanePyramidSource
PlanePyramidSource.AveragingMode, PlanePyramidSource.FlushMode, PlanePyramidSource.SpecialImageKind -
Field Summary
Fields inherited from interface net.algart.matrices.maps.pyramids.io.api.PlanePyramidSource
DEFAULT_COMPRESSION, DEFAULT_MINIMAL_PYRAMID_SIZE, DEFAULT_TILE_DIM, DIM_BAND, DIM_HEIGHT, DIM_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPlanePyramidSource(List<? extends net.algart.arrays.Matrix<? extends net.algart.arrays.PArray>> packedImagePyramid) -
Method Summary
Modifier and TypeMethodDescriptionintlongdim(int resolutionLevel, int index) Returns the dimension #index of the given pyramid level.long[]dimensions(int resolutionLevel) Returns dimensions of any pyramid level.Class<?>voidfreeResources(PlanePyramidSource.FlushMode flushMode) This implementation frees the tile cache.booleanbooleanReturns true ifPlanePyramidSource.elementType()method works properly.booleanbooleanisResolutionLevelAvailable(int resolutionLevel) intnet.algart.arrays.Matrix<? extends net.algart.arrays.PArray>readFullMatrix(int resolutionLevel) protected net.algart.arrays.Matrix<? extends net.algart.arrays.PArray>readLittleSubMatrix(int resolutionLevel, long fromX, long fromY, long toX, long toY) net.algart.arrays.Matrix<? extends net.algart.arrays.PArray>readSubMatrix(int resolutionLevel, long fromX, long fromY, long toX, long toY) setContinuationEnabled(boolean continuationEnabled) Methods inherited from class net.algart.matrices.maps.pyramids.io.api.AbstractPlanePyramidSource
checkSubMatrixRanges, checkSubMatrixRanges, compression, constantMatrixSkippingFiller, defaultZeroLevelActualRectangles, disableTileCaching, enableTileCaching, fillBySkippingFiller, getLabelRotation, getLabelRotationBackground, getMemoryModel, getResolutionLevelsAvailability, getSkippingFiller, getTileCacheDirection, getTileCachingMemory, isDataReady, isSkipCoarseData, isSpecialMatrixSupported, isTileCachingEnabled, loadResources, makeWholeSlideFromLabelAndMap, newFilledResultMatrix, newResultMatrix, readingTileDim, readSpecialMatrix, setLabelRotation, setLabelRotationBackground, setMemoryModel, setSkipCoarseData, setSkippingFiller, setTileCachingMemory, wholeSlideDimX, zeroLevelActualAreaBoundariesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.algart.matrices.maps.pyramids.io.api.PlanePyramidSource
compression, getResolutionLevelsAvailability, height, isDataReady, isSpecialMatrixSupported, loadResources, magnification, metadata, pixelSizeInMicrons, readSpecialMatrix, width, zeroLevelActualAreaBoundaries, zeroLevelActualRectangles
-
Constructor Details
-
DefaultPlanePyramidSource
public DefaultPlanePyramidSource(List<? extends net.algart.arrays.Matrix<? extends net.algart.arrays.PArray>> packedImagePyramid)
-
-
Method Details
-
isContinuationEnabled
public boolean isContinuationEnabled() -
setContinuationEnabled
-
numberOfResolutions
public int numberOfResolutions()- Specified by:
numberOfResolutionsin interfacePlanePyramidSource- Specified by:
numberOfResolutionsin classAbstractPlanePyramidSource
-
bandCount
public int bandCount()- Specified by:
bandCountin interfacePlanePyramidSource- Specified by:
bandCountin classAbstractPlanePyramidSource
-
isResolutionLevelAvailable
public boolean isResolutionLevelAvailable(int resolutionLevel) - Specified by:
isResolutionLevelAvailablein interfacePlanePyramidSource- Overrides:
isResolutionLevelAvailablein classAbstractPlanePyramidSource
-
dimensions
Description copied from interface:PlanePyramidSourceReturns dimensions of any pyramid level. Number of elements in the result arrays is always 3:
- first element result[0] is always equal to
PlanePyramidSource.bandCount(); - the element result[
PlanePyramidSource.DIM_WIDTH] is the x-dimension of the level in pixels; - the element result[
PlanePyramidSource.DIM_HEIGHT] is the y-dimension of the level in pixels.
This method always returns a new Java array and never returns a reference to an internal field.
- Specified by:
dimensionsin interfacePlanePyramidSource- Specified by:
dimensionsin classAbstractPlanePyramidSource- Parameters:
resolutionLevel- the level of pyramid; zero level (resolutionLevel=0) corresponds to the best resolution.- Returns:
- dimensions of the specified pyramid level.
- Throws:
NoSuchElementException- if !isResolutionLevelAvailable(resolutionLevel)
- first element result[0] is always equal to
-
dim
public long dim(int resolutionLevel, int index) Description copied from interface:PlanePyramidSourceReturns the dimension #index of the given pyramid level. Equivalent todimensions(resolutionLevel)[index], but works faster.- Specified by:
dimin interfacePlanePyramidSource- Specified by:
dimin classAbstractPlanePyramidSourceindex- the index of dimension.- Returns:
- the dimension #index of this level.
-
isElementTypeSupported
public boolean isElementTypeSupported()Description copied from interface:PlanePyramidSourceReturns true ifPlanePyramidSource.elementType()method works properly. In other case, that method throws UnsupportedOperationException. In particular, returns true inDefaultPlanePyramidSource.- Specified by:
isElementTypeSupportedin interfacePlanePyramidSource- Overrides:
isElementTypeSupportedin classAbstractPlanePyramidSource- Returns:
- whether
PlanePyramidSource.elementType()is supported.
-
elementType
- Specified by:
elementTypein interfacePlanePyramidSource- Overrides:
elementTypein classAbstractPlanePyramidSource
-
isFullMatrixSupported
public boolean isFullMatrixSupported()- Specified by:
isFullMatrixSupportedin interfacePlanePyramidSource
-
readSubMatrix
public net.algart.arrays.Matrix<? extends net.algart.arrays.PArray> readSubMatrix(int resolutionLevel, long fromX, long fromY, long toX, long toY) throws NoSuchElementException - Specified by:
readSubMatrixin interfacePlanePyramidSource- Overrides:
readSubMatrixin classAbstractPlanePyramidSource- Throws:
NoSuchElementException
-
readFullMatrix
public net.algart.arrays.Matrix<? extends net.algart.arrays.PArray> readFullMatrix(int resolutionLevel) throws NoSuchElementException - Specified by:
readFullMatrixin interfacePlanePyramidSource- Overrides:
readFullMatrixin classAbstractPlanePyramidSource- Throws:
NoSuchElementException
-
freeResources
Description copied from class:AbstractPlanePyramidSourceThis implementation frees the tile cache.- Specified by:
freeResourcesin interfacePlanePyramidSource- Overrides:
freeResourcesin classAbstractPlanePyramidSource- Parameters:
flushMode- possible strategy of freeing resources (ignored by this implementation).
-
readLittleSubMatrix
protected net.algart.arrays.Matrix<? extends net.algart.arrays.PArray> readLittleSubMatrix(int resolutionLevel, long fromX, long fromY, long toX, long toY) - Specified by:
readLittleSubMatrixin classAbstractPlanePyramidSource
-