Class TLcdContourFinder

java.lang.Object
com.luciad.geometry.cartesian.TLcdContourFinder

public class TLcdContourFinder extends Object
Deprecated.
Use TLcdPolylineContourFinder or TLcdComplexPolygonContourFinder. 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. TLcdPolylineContourFinder finds contour lines of equal height, much like this class, except that it doesn't close the shapes to represent an area. TLcdComplexPolygonContourFinder finds complex polygons instead of the simple polygons of this class. This allows them to model interval areas with holes.
This is a class to generate contour lines of an 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
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Starts notifying a listener about the progress of the contour computation.
    int
    applyOnAllContours(ILcdFunction aFunction, ILcdMatrixView aMatrixView, double[] aContourLevels)
    Deprecated.
    Computes all contour lines for the specified aMatrixView at the levels indicated by aContourLevels.
    int
    applyOnAllContours(ILcdFunction aFunction, ILcdMatrixView aMatrixView, int aNumberOfLevels, boolean aLogInterval, double aMaxLevel, double aMinLevel)
    Deprecated.
    Computes all contour lines for the specified aMatrixView at a number of different levels defined by aNumberOfLevels.
    double
    Deprecated.
    Returns the progress value of the calculation.
    boolean
    Deprecated.
    Returns whether the working memory is cleared after each call of applyOnAllContours.
    boolean
    Deprecated.
    Returns whether contour lines that run from edge to edge are closed around the lower side of the contour or the higher side.
    boolean
    Deprecated.
    Returns whether edges are optimized.
    boolean
    Deprecated.
    Returns whether timing is on for this instance of TLcdContourFinder.
    boolean
    Deprecated.
    This method has been deprecated.
    protected boolean
    isUseInterpolation(double aLowerValue, double aHigherValue)
    Deprecated.
    Returns whether a contour between the specified values should be interpolated or not.
    void
    Deprecated.
    Terminates notifying a listener of the progress of the contour computation.
    void
    setAutoClearOn(boolean aAutoClearOn)
    Deprecated.
    Set autoClearing to aAutoClearOn for this instance of TLcdContourFinder.
    static void
    setClassTraceOn(boolean aClassTraceOn)
    Deprecated.
    This method has been deprecated.
    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.
    void
    Deprecated.
    Set the ILcdContourFactory that needs to be used when generating an ILcdValuedPolygon.
    void
    setOptimizedEdges(boolean aOptimizedEdges)
    Deprecated.
    Set the behavior for the algorithm when traversing the edges.
    void
    setTimingOn(boolean aTimingOn)
    Deprecated.
    Set timing to aTimingOn for this instance of TLcdContourFinder.
    void
    setTraceOn(boolean aTraceOn)
    Deprecated.
    This method has been deprecated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.
      Returns true if 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 is true then 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 either true or false as argument automatically turns off tracing for all other class instances for which setTraceOn has not been called. If the argument is false then 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 of TLcdContourFinder.
      Returns:
      whether timing is on for this instance of TLcdContourFinder.
    • setTimingOn

      public void setTimingOn(boolean aTimingOn)
      Deprecated.
      Set timing to aTimingOn for this instance of TLcdContourFinder.
      Parameters:
      aTimingOn - whether to set timing on for this instance of TLcdContourFinder.
    • removeStatusListener

      public void removeStatusListener(ILcdStatusListener aStatusListener)
      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

      public void addStatusListener(ILcdStatusListener aStatusListener)
      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 of TLcdContourFinder.
      Parameters:
      aAutoClearOn - whether to set auto clearing on for this instance of TLcdContourFinder.
      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

      public void setContourFactory(ILcdContourFactory aContourFactory)
      Deprecated.
      Set the ILcdContourFactory that needs to be used when generating an ILcdValuedPolygon.
      Parameters:
      aContourFactory - The ILcdContourFactory to 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 aMatrixView at a number of different levels defined by aNumberOfLevels. The specified aFunction is 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.
      Note that this orientation only says something about the immediate area surrounding the contour line, and not the entire area enclosed by the contour. For instance, it is possible to have a counter-clockwise oriented contour that contains other contours in its interior with lower values than itself.

      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 is true, 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 no ILcdContourFactory was set.
    • applyOnAllContours

      public int applyOnAllContours(ILcdFunction aFunction, ILcdMatrixView aMatrixView, double[] aContourLevels)
      Deprecated.

      Computes all contour lines for the specified aMatrixView at the levels indicated by aContourLevels. 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 no ILcdContourFactory was set.