Skip to content
Snippets Groups Projects
Commit 923a1294 authored by Daniel Schramm's avatar Daniel Schramm
Browse files

Initially select all feature points for the weighted Hausdorff distance

parent 1039fb08
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ public class DistanceAction extends ControlPanelAction { ...@@ -33,7 +33,7 @@ public class DistanceAction extends ControlPanelAction {
* Attributes handling the state * Attributes handling the state
*/ */
private HausdorffDistancePrioritized visitor = null; private HausdorffDistancePrioritized visitor = null;
private final Map<FeaturePointType, Double> featurePointTypes = new HashMap<>(); private final Map<FeaturePointType, Double> featurePointTypes;
private String strategy = DistancePanel.STRATEGY_POINT_TO_POINT; private String strategy = DistancePanel.STRATEGY_POINT_TO_POINT;
private boolean relativeDist = false; private boolean relativeDist = false;
private boolean weightedDist = false; private boolean weightedDist = false;
...@@ -55,6 +55,12 @@ public class DistanceAction extends ControlPanelAction { ...@@ -55,6 +55,12 @@ public class DistanceAction extends ControlPanelAction {
super(canvas, topControlPanel); super(canvas, topControlPanel);
this.controlPanel = new DistancePanel(this, getSecondaryFeaturePoints().getFeaturePoints()); this.controlPanel = new DistancePanel(this, getSecondaryFeaturePoints().getFeaturePoints());
this.featurePointTypes = getSecondaryFeaturePoints().getFeaturePoints()
.stream()
.collect(Collectors.toMap(
FeaturePoint::getFeaturePointType,
featurePoint -> DrawableFeaturePoints.DEFAULT_SIZE));
// Place control panel to the topControlPanel // Place control panel to the topControlPanel
topControlPanel.addTab(controlPanel.getName(), controlPanel.getIcon(), controlPanel); topControlPanel.addTab(controlPanel.getName(), controlPanel.getIcon(), controlPanel);
topControlPanel.addChangeListener(e -> { topControlPanel.addChangeListener(e -> {
......
...@@ -89,7 +89,7 @@ public class DistancePanel extends ControlPanel { ...@@ -89,7 +89,7 @@ public class DistancePanel extends ControlPanel {
final FeaturePoint featurePoint = featurePoints.get(i); final FeaturePoint featurePoint = featurePoints.get(i);
final JCheckBox checkBox = fpBuilder.addCheckBox( final JCheckBox checkBox = fpBuilder.addCheckBox(
false, true,
createListener(action, ACTION_COMMAND_DISTANCE_RECOMPUTE) createListener(action, ACTION_COMMAND_DISTANCE_RECOMPUTE)
); );
checkBox.setText(featurePoint.getFeaturePointType().getName()); checkBox.setText(featurePoint.getFeaturePointType().getName());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment