Class FpListWeightsPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class FpListWeightsPanel extends FpListAbstractPanel<FpListWeightsPanel.Row>
A list of feature points with weights. It is used for the computation of weighted Hausdorff distance.
See Also:
  • Field Details

  • Constructor Details

    • FpListWeightsPanel

      public FpListWeightsPanel()
  • Method Details

    • initComponents

      public void initComponents(ActionListener action, DrawableFeaturePoints drFeaturePoints, Set<Landmark> selectedFPs)
      Initiates the list of feature points. This method must be called before any other method.
      Parameters:
      action - Action listener that handles events appeared during the interaction with the list
      drFeaturePoints - Feature points to be put on the list
      selectedFPs - Feature points that are checked by default. Can be empty
    • updateFeaturePointWeights

      public void updateFeaturePointWeights(Map<Landmark,Double> featurePointWeights)
      Updates GUI elements that display the weights of feature points used to calculate the weighted Hausdorff distance.
      Parameters:
      featurePointWeights - Map of feature point types and their weights
    • selectAllFeaturePoints

      public void selectAllFeaturePoints(boolean selected)
      (De)selects all feature points for the computation of the weighted Hausdorff distance.
      Parameters:
      selected - true if all feature point checkboxes are to be selected, false otherwise
    • selectFeaturePoint

      public void selectFeaturePoint(int index, boolean selected)
      (De)selects given feature point.
      Parameters:
      index - Index of the feature point
      selected - true if all feature point checkboxes are to be selected, false otherwise
    • getSphereSize

      public double getSphereSize(int index)
      Returns current size of the sphere of index-th feature point
      Parameters:
      index - Index of the feature point
      Returns:
      Sphere size, NaN on error.
    • setSliderActions

      protected void setSliderActions()
      If the slider or its spinner are changed, then ACTION_COMMAND_SPINSLIDER_SPINNER or ACTION_COMMAND_SPINSLIDER_SLIDER are triggered in the action listener.