Class DrawableFeaturePoints

java.lang.Object
cz.fidentis.analyst.drawables.Drawable
cz.fidentis.analyst.drawables.DrawableFeaturePoints
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DrawableFpWeights

public class DrawableFeaturePoints extends Drawable implements Serializable
Drawable feature points. Points are rendered using smooth filled triangles (see Drawable.initRendering(com.jogamp.opengl.GL2)).
See Also:
  • Field Details

    • FP_DEFAULT_COLOR

      public static final Color FP_DEFAULT_COLOR
    • FP_DEFAULT_SIZE

      public static final double FP_DEFAULT_SIZE
      See Also:
  • Constructor Details

    • DrawableFeaturePoints

      public DrawableFeaturePoints(List<Landmark> featurePoints)
      Constructor.
      Parameters:
      featurePoints - Feature points
    • DrawableFeaturePoints

      public DrawableFeaturePoints(List<Landmark> featurePoints, Color defaultColor, double defaultPerimeter)
      Constructor.
      Parameters:
      featurePoints - Feature points
      defaultColor - Default color
      defaultPerimeter - Default perimeter
  • Method Details

    • addFeaturePoint

      public void addFeaturePoint(Landmark fp)
      Adds a new feature point
      Parameters:
      fp - featurePoint to be added
    • removeFeaturePoint

      public void removeFeaturePoint(Landmark fp)
      Removes a feature point
      Parameters:
      fp - featurePoint to be removed
    • removeFeaturePoint

      public void removeFeaturePoint(int i)
      Removes a feature point
      Parameters:
      i - index
    • getColor

      public Color getColor(int index)
      Returns color of the feature point.
      Parameters:
      index - Index of the feature point
      Returns:
      The color or null
    • setColor

      public void setColor(int index, Color color)
      Sets color of the feature point.
      Parameters:
      index - Index of the feature point
      color - New color of the feature point
    • getAssignedColor

      public Color getAssignedColor(int index)
      Gets the assigned color of a feature point based on its relation to mesh
      Parameters:
      index - index of a chosen feature point
      Returns:
      Color
    • getMaxDistance

      public double getMaxDistance()
      Gets the maximum distance of all feature points from the mesh
      Returns:
      double
    • resetColorToDefault

      public void resetColorToDefault(int index)
      Removes (possible) special color of the feature point.
      Parameters:
      index - Index of the feature point
    • resetAllColorsToDefault

      public void resetAllColorsToDefault()
      Removes all individual colors of feature points.
    • getSize

      public Double getSize(int index)
      Returns size of the feature point.
      Parameters:
      index - Index of the feature point
      Returns:
      The size or null
    • setSize

      public void setSize(int index, double size)
      Sets size of the feature point.
      Parameters:
      index - Index of the feature point
      size - New size of the feature point.
    • resetSizeToDefault

      public void resetSizeToDefault(int index)
      Removes (possible) special size of the feature point.
      Parameters:
      index - Index of the feature point
    • resetAllSizesToDefault

      public void resetAllSizesToDefault()
      Removes all individual sizes of feature points.
    • getRenderMode

      public RenderingMode getRenderMode(int index)
      Returns render mode of the feature point.
      Parameters:
      index - Index of the feature point
      Returns:
      The render mode or null
    • setRenderMode

      public void setRenderMode(int index, RenderingMode renderMode)
      Sets render mode of the feature point. RenderingMode.NOTHING hides the point.
      Parameters:
      index - Index of the feature point
      renderMode - New render mode of the feature point
    • resetRenderModeToDefault

      public void resetRenderModeToDefault(int index)
      Removes (possible) special render mode of the feature point.
      Parameters:
      index - Index of the feature point
    • resetAllRenderModesToDefault

      public void resetAllRenderModesToDefault()
      Removes all individual render modes of feature points.
    • renderObject

      protected void renderObject(com.jogamp.opengl.GL2 gl)
      Specified by:
      renderObject in class Drawable
    • getFeaturePoints

      public List<Landmark> getFeaturePoints()
      Returns:
      List of Landmark
    • getDefaultPerimeter

      public double getDefaultPerimeter()
    • getDistanceThreshold

      public double getDistanceThreshold()
    • getOffTheMeshColor

      public Color getOffTheMeshColor()
    • getCloseToMeshColor

      public Color getCloseToMeshColor()
    • getOnTheMeshColor

      public Color getOnTheMeshColor()
    • getCustomFpColor

      public Color getCustomFpColor()
    • setDistanceThreshold

      public void setDistanceThreshold(double distanceThreshold)
    • setOffTheMeshColor

      public void setOffTheMeshColor(Color offTheMeshColor)
    • setCloseToMeshColor

      public void setCloseToMeshColor(Color closeToMeshColor)
    • setOnTheMeshColor

      public void setOnTheMeshColor(Color onTheMeshColor)
    • setCustomFpColor

      public void setCustomFpColor(Color customFpColor)