Class TLcdContourFinder
ILcdMatrixView. The contour lines
are not returned, but instead a user-given ILcdFunction is applied on each generated
ILcdValuedPolygon.
The generated contours are closed simple polygons. To support open and closed isolines,
use TLcdPolylineContourFinder. To support areas with holes,
use TLcdComplexPolygonContourFinder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatusListener(ILcdStatusListener aStatusListener) Deprecated.Starts notifying a listener about the progress of the contour computation.intapplyOnAllContours(ILcdFunction aFunction, ILcdMatrixView aMatrixView, double[] aContourLevels) Deprecated.Computes all contour lines for the specifiedaMatrixViewat the levels indicated byaContourLevels.intapplyOnAllContours(ILcdFunction aFunction, ILcdMatrixView aMatrixView, int aNumberOfLevels, boolean aLogInterval, double aMaxLevel, double aMinLevel) Deprecated.Computes all contour lines for the specifiedaMatrixViewat a number of different levels defined byaNumberOfLevels.doubleDeprecated.Returns the progress value of the calculation.booleanDeprecated.Returns whether the working memory is cleared after each call of applyOnAllContours.booleanDeprecated.Returns whether contour lines that run from edge to edge are closed around the lower side of the contour or the higher side.booleanDeprecated.Returns whether edges are optimized.booleanDeprecated.Returns whether timing is on for this instance ofTLcdContourFinder.booleanDeprecated.This method has been deprecated.protected booleanisUseInterpolation(double aLowerValue, double aHigherValue) Deprecated.Returns whether a contour between the specified values should be interpolated or not.voidremoveStatusListener(ILcdStatusListener aStatusListener) Deprecated.Terminates notifying a listener of the progress of the contour computation.voidsetAutoClearOn(boolean aAutoClearOn) Deprecated.Set autoClearing to aAutoClearOn for this instance ofTLcdContourFinder.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.voidsetCloseEdgesAroundLower(boolean aCloseEdgesAroundLower) Deprecated.Set whether contour lines that run from edge to edge are closed around the lower side of the contour or the higher side.voidsetContourFactory(ILcdContourFactory aContourFactory) Deprecated.Set theILcdContourFactorythat needs to be used when generating anILcdValuedPolygon.voidsetOptimizedEdges(boolean aOptimizedEdges) Deprecated.Set the behavior for the algorithm when traversing the edges.voidsetTimingOn(boolean aTimingOn) Deprecated.Set timing to aTimingOn for this instance ofTLcdContourFinder.voidsetTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
TLcdContourFinder
public TLcdContourFinder()Deprecated.
-
-
Method Details
-
isTraceOn
public boolean isTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istruethen all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
setTraceOn
public void setTraceOn(boolean aTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for this class instance. Calling this method with eithertrueorfalseas argument automatically turns off tracing for all other class instances for whichsetTraceOnhas not been called. If the argument isfalsethen only the informative, warning and error log messages are recorded.- Parameters:
aTraceOn- if true then all log messages are recorded for this instance. If false, then only the informative, warning and error log messages are recorded.
-
isTimingOn
public boolean isTimingOn()Deprecated.Returns whether timing is on for this instance ofTLcdContourFinder.- Returns:
- whether timing is on for this instance of
TLcdContourFinder.
-
setTimingOn
public void setTimingOn(boolean aTimingOn) Deprecated.Set timing to aTimingOn for this instance ofTLcdContourFinder.- Parameters:
aTimingOn- whether to set timing on for this instance ofTLcdContourFinder.
-
removeStatusListener
Deprecated.Terminates notifying a listener of the progress of the contour computation.- Parameters:
aStatusListener- will no longer be notified of progress when running a contour computation.- See Also:
-
addStatusListener
Deprecated.Starts notifying a listener about the progress of the contour computation.- Parameters:
aStatusListener- will be notified of progress when running a contour computation.- See Also:
-
isAutoClearOn
public boolean isAutoClearOn()Deprecated.Returns whether the working memory is cleared after each call of applyOnAllContours.- Returns:
- whether the working memory is cleared after each call of applyOnAllContours. When doing multiple consecutive calls of applyOnAllContours, it might be better to set this property to false.
-
setAutoClearOn
public void setAutoClearOn(boolean aAutoClearOn) Deprecated.Set autoClearing to aAutoClearOn for this instance ofTLcdContourFinder.- Parameters:
aAutoClearOn- whether to set auto clearing on for this instance ofTLcdContourFinder.- See Also:
-
setOptimizedEdges
public void setOptimizedEdges(boolean aOptimizedEdges) Deprecated.Set the behavior for the algorithm when traversing the edges.- Parameters:
aOptimizedEdges- when false, all edge points traversed will be included in the contour. When true, only the traversed corner points will be included. Default is true
-
isOptimizedEdges
public boolean isOptimizedEdges()Deprecated.Returns whether edges are optimized.- Returns:
- whether edges are optimized.
- See Also:
-
setCloseEdgesAroundLower
public void setCloseEdgesAroundLower(boolean aCloseEdgesAroundLower) Deprecated.Set whether contour lines that run from edge to edge are closed around the lower side of the contour or the higher side. Default is false. Note that the current implementation does not use this setting.- Parameters:
aCloseEdgesAroundLower- The value to be set.- See Also:
-
isCloseEdgesAroundLower
public boolean isCloseEdgesAroundLower()Deprecated.Returns whether contour lines that run from edge to edge are closed around the lower side of the contour or the higher side.- Returns:
- whether contour lines that run from edge to edge are closed around the lower side of the contour or the higher side.
- See Also:
-
getProgress
public double getProgress()Deprecated.Returns the progress value of the calculation.- Returns:
- the progress value of the calculation.
-
isUseInterpolation
protected boolean isUseInterpolation(double aLowerValue, double aHigherValue) Deprecated.Returns whether a contour between the specified values should be interpolated or not. The default implementation returns
true, meaning that all contours will be interpolated between the specified values.If this method returns
false, the contour is not interpolated and will be placed in the middle of the 2 points corresponding to the specified values.- Parameters:
aLowerValue- The matrix value on the lower side of the contour.aHigherValue- The matrix value on the higher side of the contour.- Returns:
- whether a contour between the specified values should be interpolated or not.
-
setContourFactory
Deprecated.Set theILcdContourFactorythat needs to be used when generating anILcdValuedPolygon.- Parameters:
aContourFactory- TheILcdContourFactoryto be set.
-
applyOnAllContours
public int applyOnAllContours(ILcdFunction aFunction, ILcdMatrixView aMatrixView, int aNumberOfLevels, boolean aLogInterval, double aMaxLevel, double aMinLevel) Deprecated.Computes all contour lines for the specified
aMatrixViewat a number of different levels defined byaNumberOfLevels. The specifiedaFunctionis applied to each generated contour line (ILcdValuedPolygon). The method returns the number of computed contour lines.The edge of a polygon indicates a contour line of equal height. The orientation of the returned polygons should be interpreted as follows:
- CLOCKWISE: The area on just on the exterior of the polygon has a higher value than the interior.
- COUNTER-CLOCKWISE: The area just on the exterior of the polygon has a lower value than the interior.
- Parameters:
aFunction- The function to apply on each generated contour line.aMatrixView- The input matrix which should contain more than one column and more than one row.aNumberOfLevels- The number of levels to be computed.aLogInterval- Indicates whether a logarithmic or a linear subdivision is used. If it istrue, a logarithmic subdivision is used.aMaxLevel- The maximum level, only values below this level will be considered when computing the subdivision.aMinLevel- The minimum level, only values above this level will be considered when computing the subdivision.- Returns:
- the number of computed contour lines.
- Throws:
NullPointerException- when noILcdContourFactorywas set.
-
applyOnAllContours
public int applyOnAllContours(ILcdFunction aFunction, ILcdMatrixView aMatrixView, double[] aContourLevels) Deprecated.Computes all contour lines for the specified
aMatrixViewat the levels indicated byaContourLevels. The specified function (aFunction) is applied to each generated contour line (ILcdValuedPolygon). The method returns the number of computed contour lines.The orientation of the polygons gives you information about which side has a higher value. If the polygon is oriented clockwise then the exterior has a higher value than the interior. If the polygon is oriented counter-clockwise, then the exterior of the polygon has a lower value than the interior.
Note that, when the current thread is interrupted, the method will return the intermediate result. This is the number of already computed contour lines.
- Parameters:
aFunction- The function to apply on each generated contour line.aMatrixView- The input data, it should have more than one column and more than one row.aContourLevels- The different levels to compute the contours on.- Returns:
- the number of computed contour lines.
- Throws:
NullPointerException- when noILcdContourFactorywas set.
-
TLcdPolylineContourFinderorTLcdComplexPolygonContourFinder. This class relies on deprecated contour finding algorithms. The output of the new contour finding algorithms are much more practical to work as they split up contours into two separate, disambiguous, concepts that can be retrieved individually.TLcdPolylineContourFinderfinds contour lines of equal height, much like this class, except that it doesn't close the shapes to represent an area.TLcdComplexPolygonContourFinderfinds complex polygons instead of the simple polygons of this class. This allows them to model interval areas with holes.