From 76ee47a7f56c524e9f3a68db07333353e34111e7 Mon Sep 17 00:00:00 2001 From: Radek Oslejsek <oslejsek@fi.muni.cz> Date: Thu, 10 Jun 2021 16:44:03 +0200 Subject: [PATCH] Color of FPs and their statistics --- .../registration/RegistrationAction.java | 46 +- .../registration/RegistrationPanel.form | 611 ++++++++++-------- .../registration/RegistrationPanel.java | 493 ++++++++------ .../analyst/scene/DrawableFeaturePoints.java | 22 +- .../java/cz/fidentis/analyst/scene/Scene.java | 28 +- .../analyst/registration/Bundle.properties | 42 +- 6 files changed, 735 insertions(+), 507 deletions(-) diff --git a/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationAction.java b/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationAction.java index 932b762f..80fe26f6 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationAction.java +++ b/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationAction.java @@ -9,6 +9,7 @@ import cz.fidentis.analyst.icp.RandomStrategy; import cz.fidentis.analyst.icp.UndersamplingStrategy; import cz.fidentis.analyst.mesh.core.MeshFacet; import cz.fidentis.analyst.mesh.core.MeshPoint; +import cz.fidentis.analyst.scene.DrawableFace; import cz.fidentis.analyst.scene.DrawableFeaturePoints; import java.awt.Color; import java.awt.event.ActionEvent; @@ -37,10 +38,10 @@ public class RegistrationAction extends ControlPanelAction { private double error = 0.3; private UndersamplingStrategy undersampling = new RandomStrategy(200); - /** - * Threshold of feature points showing too far away + /* + * Coloring threshold and statistical values of feature point distances: */ - private double featurePointsThreshold = 5.0; + private double fpThreshold = 5.0; private final RegistrationPanel controlPanel; @@ -66,10 +67,7 @@ public class RegistrationAction extends ControlPanelAction { if (((JToggleButton) ae.getSource()).isSelected()) { calculateFeaturePoints(); // color points } else { - for (int i = 0; i < getPrimaryFeaturePoints().getFeaturePoints().size(); i++) { - getPrimaryFeaturePoints().setColor(i, DrawableFeaturePoints.DEFAULT_COLOR); - getSecondaryFeaturePoints().setColor(i, DrawableFeaturePoints.DEFAULT_COLOR); - } + this.getCanvas().getScene().setDefaultColors(); } break; case RegistrationPanel.ACTION_COMMAND_APPLY_ICP: @@ -164,24 +162,22 @@ public class RegistrationAction extends ControlPanelAction { } calculateFeaturePoints(); break; - case RegistrationPanel.ACTION_COMMAND_RESET_ALL: - getSecondaryDrawableFace().setTranslation(new Vector3d(0, 0, 0)); - getSecondaryDrawableFace().setRotation(new Vector3d(0, 0, 0)); - getSecondaryDrawableFace().setScale(new Vector3d(0, 0, 0)); - calculateFeaturePoints(); - break; case RegistrationPanel.ACTION_COMMAND_APPLY_TRANSFORMATIONS: transformFace(); getSecondaryDrawableFace().setTranslation(new Vector3d(0, 0, 0)); getSecondaryDrawableFace().setRotation(new Vector3d(0, 0, 0)); getSecondaryDrawableFace().setScale(new Vector3d(0, 0, 0)); - break; + if (getSecondaryFeaturePoints() != null) { + getSecondaryFeaturePoints().setTranslation(new Vector3d(0, 0, 0)); + getSecondaryFeaturePoints().setRotation(new Vector3d(0, 0, 0)); + getSecondaryFeaturePoints().setScale(new Vector3d(0, 0, 0)); + }break; case RegistrationPanel.ACTION_COMMAND_TRANSPARENCY: int transparency = ((JSlider) ae.getSource()).getValue(); setTransparency(transparency); break; case RegistrationPanel.ACTION_COMMAND_FP_CLOSENESS_THRESHOLD: - featurePointsThreshold = ((Number)(((JFormattedTextField) ae.getSource()).getValue())).doubleValue(); + fpThreshold = ((Number)(((JFormattedTextField) ae.getSource()).getValue())).doubleValue(); calculateFeaturePoints(); break; case RegistrationPanel.ACTION_COMMAND_ICP_SCALE: @@ -253,7 +249,10 @@ public class RegistrationAction extends ControlPanelAction { getPrimaryFeaturePoints().getFeaturePoints().size() != getSecondaryFeaturePoints().getFeaturePoints().size()) { return; } - + + double fpMaxDist = Double.NEGATIVE_INFINITY; + double fpMinDist = Double.POSITIVE_INFINITY; + double distSum = 0.0; for (int i = 0; i < getPrimaryFeaturePoints().getFeaturePoints().size(); i++) { FeaturePoint primary = getPrimaryFeaturePoints().getFeaturePoints().get(i); FeaturePoint secondary = getSecondaryFeaturePoints().getFeaturePoints().get(i); @@ -263,14 +262,19 @@ public class RegistrationAction extends ControlPanelAction { Math.pow(transformed.x - primary.getX(), 2) + Math.pow(transformed.y - primary.getY(), 2) + Math.pow(transformed.z - primary.getZ(), 2)); - if (distance > featurePointsThreshold) { - getPrimaryFeaturePoints().setColor(i, Color.RED); - getSecondaryFeaturePoints().setColor(i, Color.RED); + if (distance > fpThreshold) { + getPrimaryFeaturePoints().resetColorToDefault(i); + getSecondaryFeaturePoints().resetColorToDefault(i); } else { - getPrimaryFeaturePoints().setColor(i, DrawableFeaturePoints.DEFAULT_COLOR); - getSecondaryFeaturePoints().setColor(i, DrawableFeaturePoints.DEFAULT_COLOR); + getPrimaryFeaturePoints().setColor(i, Color.GREEN); + getSecondaryFeaturePoints().setColor(i, Color.GREEN); } + fpMaxDist = Math.max(fpMaxDist, distance); + fpMinDist = Math.min(fpMinDist, distance); + distSum += distance; } + double fpAvgDist = distSum / getPrimaryFeaturePoints().getFeaturePoints().size(); + this.controlPanel.updateFPStats(fpAvgDist, fpMaxDist, fpMinDist); } /** diff --git a/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationPanel.form b/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationPanel.form index cbc5b362..4ea7faef 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationPanel.form +++ b/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationPanel.form @@ -33,69 +33,73 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Component id="visualizationPanel" pref="1057" max="32767" attributes="0"/> - <Group type="102" attributes="0"> + <Group type="102" alignment="0" attributes="0"> <Component id="transformationPanel" min="-2" pref="599" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="jSeparator2" max="32767" attributes="0"/> <EmptySpace min="-2" pref="450" max="-2" attributes="0"/> </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="registrationAdjustmentLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <Component id="jSeparator11" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> - <Component id="jButton1" min="-2" max="-2" attributes="0"/> - </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel7" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> <Component id="jCheckBox1" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="jFormattedTextField1" min="-2" pref="49" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> <Component id="jLabel5" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="9" max="-2" attributes="0"/> - <Component id="jFormattedTextField2" min="-2" pref="53" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="1" max="-2" attributes="0"/> - <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> + <Component id="jFormattedTextField1" min="-2" pref="49" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="jComboBox1" min="-2" max="-2" attributes="0"/> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="3" max="-2" attributes="0"/> + <Component id="jFormattedTextField2" min="-2" pref="53" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="3" max="-2" attributes="0"/> + <Component id="jLabel8" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="2" max="-2" attributes="0"/> + <Component id="jComboBox1" min="-2" pref="123" max="-2" attributes="0"/> + </Group> + <Component id="registrationAdjustmentLabel" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="215" max="-2" attributes="0"/> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> </Group> </Group> <EmptySpace max="32767" attributes="0"/> </Group> - <Component id="jSeparator11" alignment="0" max="32767" attributes="0"/> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="jLabel1" alignment="3" min="-2" pref="57" max="-2" attributes="0"/> - <Component id="jCheckBox1" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jFormattedTextField1" alignment="3" min="-2" pref="22" max="-2" attributes="0"/> - <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jFormattedTextField2" alignment="3" min="-2" pref="20" max="-2" attributes="0"/> - <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="jComboBox1" alignment="3" min="-2" pref="20" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel7" min="-2" max="-2" attributes="0"/> + <Component id="jCheckBox1" min="-2" max="-2" attributes="0"/> + <Group type="103" alignment="0" groupAlignment="3" attributes="0"> + <Component id="jFormattedTextField1" alignment="3" min="-2" pref="22" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jFormattedTextField2" alignment="3" min="-2" pref="20" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox1" alignment="3" min="-2" pref="20" max="-2" attributes="0"/> + </Group> </Group> <EmptySpace max="-2" attributes="0"/> <Component id="jButton1" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> <Component id="jSeparator11" min="-2" pref="10" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="registrationAdjustmentLabel" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="visualizationPanel" min="-2" pref="206" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="22" max="-2" attributes="0"/> + <Component id="visualizationPanel" min="-2" pref="180" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Component id="transformationPanel" min="-2" pref="333" max="-2" attributes="0"/> <Component id="jSeparator2" min="-2" pref="10" max="-2" attributes="0"/> </Group> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace pref="67" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -115,6 +119,9 @@ </Component> <Container class="javax.swing.JPanel" name="visualizationPanel"> <Properties> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[600, 600]"/> + </Property> <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> <Dimension value="[400, 0]"/> </Property> @@ -129,19 +136,57 @@ <Group type="102" attributes="0"> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0"> - <Component id="featurePointsPanel" alignment="0" min="-2" max="-2" attributes="0"/> - <Component id="viewPanel" alignment="0" max="32767" attributes="0"/> - </Group> <Group type="102" alignment="0" attributes="0"> - <Component id="visualizationLabel" min="-2" max="-2" attributes="0"/> + <Component id="featurePointsLabel" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> + <Component id="thersholdFTF" min="-2" pref="55" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> - <Component id="transparencySlider" min="-2" pref="281" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="transparencyButton" min="-2" pref="78" max="-2" attributes="0"/> + <Component id="thersholdUpButton" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="thresholdDownButton" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jLabel12" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel13" min="-2" pref="48" max="-2" attributes="0"/> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Component id="jLabel10" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="665" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel9" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="visualizationLabel" min="-2" max="-2" attributes="0"/> + <Component id="viewLabel" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="transparencySlider" min="-2" pref="281" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="transparencyButton" min="-2" pref="78" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="256" max="-2" attributes="0"/> + <Component id="jLabel15" min="-2" pref="39" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jLabel11" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel14" min="-2" pref="45" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="12" pref="12" max="-2" attributes="0"/> + <Component id="frontButton" min="-2" pref="50" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="profileButton" min="-2" pref="50" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace max="32767" attributes="0"/> </Group> </Group> - <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -162,11 +207,34 @@ <Component id="transparencyButton" min="-2" pref="30" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace min="-2" pref="34" max="-2" attributes="0"/> - <Component id="viewPanel" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="22" max="-2" attributes="0"/> - <Component id="featurePointsPanel" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="25" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="viewLabel" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="frontButton" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="profileButton" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jLabel9" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="featurePointsLabel" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="thersholdFTF" alignment="3" min="-2" pref="27" max="-2" attributes="0"/> + </Group> + <Component id="thersholdUpButton" min="-2" max="-2" attributes="0"/> + <Component id="thresholdDownButton" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel14" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -175,208 +243,13 @@ <Component class="javax.swing.JLabel" name="visualizationLabel"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Tahoma" size="14" style="1"/> + <Font name="Tahoma" size="14" style="0"/> </Property> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.visualizationLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> </Properties> </Component> - <Container class="javax.swing.JPanel" name="viewPanel"> - - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Component id="viewLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace max="32767" attributes="0"/> - <Component id="frontButton" min="-2" pref="50" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="profileButton" min="-2" pref="50" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="216" max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="103" groupAlignment="3" attributes="0"> - <Component id="viewLabel" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="frontButton" alignment="3" min="-2" max="-2" attributes="0"/> - <Component id="profileButton" alignment="3" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> - <SubComponents> - <Component class="javax.swing.JButton" name="profileButton"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.profileButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.profileButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> - <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> - <TitledBorder> - <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> - <EtchetBorder/> - </Border> - </TitledBorder> - </Border> - </Property> - <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> - <Color id="Default Cursor"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JButton" name="frontButton"> - <Properties> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.frontButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.frontButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> - <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> - <TitledBorder> - <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> - <EtchetBorder/> - </Border> - </TitledBorder> - </Border> - </Property> - <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> - <Color id="Default Cursor"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="viewLabel"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Tahoma" size="14" style="3"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.viewLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - </Component> - </SubComponents> - </Container> - <Container class="javax.swing.JPanel" name="featurePointsPanel"> - - <Layout> - <DimensionLayout dim="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" alignment="0" attributes="0"> - <Component id="featurePointsLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace type="separate" max="-2" attributes="0"/> - <Component id="thersholdFTF" min="-2" pref="70" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="thersholdUpButton" min="-2" max="-2" attributes="0"/> - <EmptySpace max="-2" attributes="0"/> - <Component id="thresholdDownButton" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="192" max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - <DimensionLayout dim="1"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="featurePointsLabel" min="-2" max="-2" attributes="0"/> - <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> - <Component id="thersholdFTF" alignment="0" pref="0" max="32767" attributes="0"/> - <Component id="thersholdUpButton" alignment="0" max="32767" attributes="0"/> - <Component id="thresholdDownButton" alignment="0" max="32767" attributes="0"/> - </Group> - </Group> - <EmptySpace min="0" pref="10" max="32767" attributes="0"/> - </Group> - </Group> - </DimensionLayout> - </Layout> - <SubComponents> - <Component class="javax.swing.JButton" name="thersholdUpButton"> - <Properties> - <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> - <Image iconType="3" name="/add-line.png"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.thersholdUpButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> - <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> - <TitledBorder/> - </Border> - </Property> - <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> - <Color id="Default Cursor"/> - </Property> - <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[24, 24]"/> - </Property> - <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[24, 24]"/> - </Property> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[24, 24]"/> - </Property> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="thersholdUpButtonActionPerformed"/> - </Events> - </Component> - <Component class="javax.swing.JFormattedTextField" name="thersholdFTF"> - <Properties> - <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor"> - <Format subtype="0" type="0"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JLabel" name="featurePointsLabel"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Tahoma" size="14" style="3"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.featurePointsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - </Component> - <Component class="javax.swing.JButton" name="thresholdDownButton"> - <Properties> - <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> - <Image iconType="3" name="/subtract-line.png"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.thresholdDownButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> - <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> - <TitledBorder/> - </Border> - </Property> - <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> - <Color id="Default Cursor"/> - </Property> - <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[24, 24]"/> - </Property> - <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[24, 24]"/> - </Property> - <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> - <Dimension value="[24, 24]"/> - </Property> - </Properties> - <Events> - <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="thresholdDownButtonActionPerformed"/> - </Events> - </Component> - </SubComponents> - </Container> <Component class="javax.swing.JSlider" name="transparencySlider"> <Properties> <Property name="majorTickSpacing" type="int" value="5"/> @@ -398,7 +271,7 @@ <Component class="javax.swing.JButton" name="transparencyButton"> <Properties> <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Tahoma" size="11" style="1"/> + <Font name="Tahoma" size="14" style="0"/> </Property> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.transparencyButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> @@ -426,6 +299,201 @@ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="transparencyButtonActionPerformed"/> </Events> </Component> + <Component class="javax.swing.JLabel" name="viewLabel"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.viewLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="frontButton"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.frontButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.frontButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder> + <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </TitledBorder> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="profileButton"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.profileButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.profileButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder> + <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo"> + <EtchetBorder/> + </Border> + </TitledBorder> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Ubuntu" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel9.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="featurePointsLabel"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="0"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.featurePointsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JFormattedTextField" name="thersholdFTF"> + <Properties> + <Property name="formatterFactory" type="javax.swing.JFormattedTextField$AbstractFormatterFactory" editor="org.netbeans.modules.form.editors.AbstractFormatterFactoryEditor"> + <Format subtype="0" type="0"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="thersholdUpButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/add-line.png"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.thersholdUpButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[24, 24]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[24, 24]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[24, 24]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="thersholdUpButtonActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="thresholdDownButton"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/subtract-line.png"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.thresholdDownButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder/> + </Border> + </Property> + <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> + <Color id="Default Cursor"/> + </Property> + <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[24, 24]"/> + </Property> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[24, 24]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[24, 24]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="thresholdDownButtonActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel10.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel11.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Ubuntu" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel12.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Ubuntu" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel13.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Ubuntu" size="15" style="0"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel14.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Ubuntu" size="15" style="0"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel15.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> </SubComponents> </Container> <Container class="javax.swing.JPanel" name="transformationPanel"> @@ -941,16 +1009,19 @@ <EmptySpace min="-2" pref="12" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Component id="rotationZFTF" min="-2" pref="60" max="-2" attributes="0"/> - <Group type="102" alignment="0" attributes="0"> - <Group type="103" groupAlignment="1" attributes="0"> - <Component id="rotatZLabel" min="-2" max="-2" attributes="0"/> - <Component id="leftRotationZButton" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="16" max="-2" attributes="0"/> + <Component id="rotatZLabel" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="leftRotationZButton" alignment="0" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> <Component id="rightRotationZButton" min="-2" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace max="32767" attributes="0"/> + <EmptySpace pref="214" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -1286,24 +1357,17 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <Component id="jLabel4" min="-2" max="-2" attributes="0"/> - <EmptySpace min="0" pref="93" max="32767" attributes="0"/> - </Group> + <Group type="103" groupAlignment="1" attributes="0"> <Group type="102" alignment="1" attributes="0"> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - <Component id="scaleButton" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="102" attributes="0"> - <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Component id="jLabel4" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="111" max="32767" attributes="0"/> <Component id="scalePlusButton" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="scaleMinusButton" min="-2" max="-2" attributes="0"/> </Group> <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="scaleButton" min="-2" max="-2" attributes="0"/> <EmptySpace type="unrelated" max="-2" attributes="0"/> <Component id="scaleFTF" min="-2" pref="54" max="-2" attributes="0"/> </Group> @@ -1573,6 +1637,9 @@ </Container> <Component class="javax.swing.JButton" name="jButton1"> <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Ubuntu" size="15" style="1"/> + </Property> <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> </Property> @@ -1583,16 +1650,6 @@ </Component> <Component class="javax.swing.JSeparator" name="jSeparator2"> </Component> - <Component class="javax.swing.JLabel" name="jLabel1"> - <Properties> - <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> - <Font name="Ubuntu" size="14" style="1"/> - </Property> - <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> - <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> - </Property> - </Properties> - </Component> <Component class="javax.swing.JCheckBox" name="jCheckBox1"> <Properties> <Property name="selected" type="boolean" value="true"/> @@ -1651,5 +1708,19 @@ <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> </AuxValues> </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel7.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/registration/Bundle.properties" key="RegistrationPanel.jLabel8.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> </SubComponents> </Form> diff --git a/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationPanel.java b/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationPanel.java index b1eeb5f4..d679b2db 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationPanel.java +++ b/GUI/src/main/java/cz/fidentis/analyst/registration/RegistrationPanel.java @@ -2,8 +2,11 @@ package cz.fidentis.analyst.registration; import cz.fidentis.analyst.canvas.Direction; import cz.fidentis.analyst.core.ControlPanel; +import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.text.DecimalFormat; +import java.text.NumberFormat; import javax.swing.ImageIcon; import javax.swing.JFormattedTextField; @@ -11,6 +14,7 @@ import javax.swing.JFormattedTextField; * Panel used to interactively visualize two face and adjust their registration. * * @author Richard Pajersky + * @author Radek Oslejsek */ public class RegistrationPanel extends ControlPanel { @@ -33,7 +37,6 @@ public class RegistrationPanel extends ControlPanel { public static final String ACTION_COMMAND_SCALE = "scale"; public static final String ACTION_COMMAND_FRONT_VIEW = "front view"; public static final String ACTION_COMMAND_SIDE_VIEW = "side view"; - public static final String ACTION_COMMAND_RESET_ALL = "reset all"; public static final String ACTION_COMMAND_RESET_ROTATION = "reset translation"; public static final String ACTION_COMMAND_RESET_TRANSLATION = "reset rotation"; public static final String ACTION_COMMAND_RESET_SCALE = "reset scale"; @@ -76,6 +79,11 @@ public class RegistrationPanel extends ControlPanel { private double moveModifier = LOW_SHIFT_QUOTIENT; + private double fpMaxDist = Double.NEGATIVE_INFINITY; + private double fpMinDist = Double.POSITIVE_INFINITY; + private double fpAvgDist = 0.0; + + /** * Constructor. * @param action Action listener @@ -100,7 +108,11 @@ public class RegistrationPanel extends ControlPanel { translationButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_TRANSLATION)); rotationButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_ROTATION)); scaleButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_SCALE)); + resetAllButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_TRANSLATION)); + resetAllButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_SCALE)); + resetAllButton.addActionListener(createListener(action, ACTION_COMMAND_RESET_ROTATION)); + applyButton.addActionListener(createListener(action, ACTION_COMMAND_APPLY_TRANSFORMATIONS)); thersholdFTF.addActionListener(createListener(action, ACTION_COMMAND_FP_CLOSENESS_THRESHOLD)); jCheckBox1.addActionListener(createListener(action, ACTION_COMMAND_ICP_SCALE)); @@ -109,6 +121,60 @@ public class RegistrationPanel extends ControlPanel { jComboBox1.addActionListener(createListener(action, ACTION_COMMAND_ICP_UNDERSAMPLING)); } + /** + * Sets given values as basic basic values that we aim to improve. + * + * @param avg Average distance + * @param max Maximal distance + * @param min Minimal distance + */ + public void initFPStats(double avg, double max, double min) { + fpMaxDist = max; + fpMinDist = min; + fpAvgDist = avg; + } + + /** + * Updates statistical info related to the distance of feature points + * @param avg Average distance + * @param max Maximal distance + * @param min Minimal distance + */ + public void updateFPStats(double avg, double max, double min) { + if (fpMaxDist == Double.NEGATIVE_INFINITY) { // first calculation + initFPStats(avg, max, min); + } + + if (min < fpMinDist) { + jLabel15.setForeground(Color.GREEN); + } else if (min > fpMinDist) { + jLabel15.setForeground(Color.RED); + } else { + jLabel15.setForeground(Color.BLACK); + } + + if (max < fpMaxDist) { + jLabel14.setForeground(Color.GREEN); + } else if (max > fpMaxDist) { + jLabel14.setForeground(Color.RED); + } else { + jLabel14.setForeground(Color.BLACK); + } + + if (avg < fpAvgDist) { + jLabel13.setForeground(Color.GREEN); + } else if (avg > fpAvgDist) { + jLabel13.setForeground(Color.RED); + } else { + jLabel13.setForeground(Color.BLACK); + } + + NumberFormat formatter = new DecimalFormat("#0.00"); + jLabel15.setText(formatter.format(min)); + jLabel14.setText(formatter.format(max)); + jLabel13.setText(formatter.format(avg)); + } + /** * Additional initialization of panel */ @@ -166,13 +232,13 @@ public class RegistrationPanel extends ControlPanel { decreaseInputField(rotationYFTF); break; case ROTATE_IN: - decreaseInputField(rotationZFTF); + increaseInputField(rotationZFTF); break; case ROTATE_OUT: decreaseInputField(rotationZFTF); break; case ZOOM_OUT: - increaseInputField(scaleFTF); + decreaseInputField(scaleFTF); break; case ZOOM_IN: increaseInputField(scaleFTF); @@ -182,20 +248,6 @@ public class RegistrationPanel extends ControlPanel { } } - private void increaseInputField(JFormattedTextField textField) { - double newValue = ((Number)textField.getValue()).doubleValue() + moveModifier; - newValue *= TRANSFORMATION_FINESS; - textField.setValue(newValue); - textField.postActionEvent(); - } - - private void decreaseInputField(JFormattedTextField textField) { - double newValue = ((Number)textField.getValue()).doubleValue() - moveModifier; - newValue *= TRANSFORMATION_FINESS; - textField.setValue(newValue); - textField.postActionEvent(); - } - @Override public ImageIcon getIcon() { return getStaticIcon(); @@ -210,6 +262,20 @@ public class RegistrationPanel extends ControlPanel { return new ImageIcon(RegistrationPanel.class.getClassLoader().getResource("/" + ICON)); } + private void increaseInputField(JFormattedTextField textField) { + double newValue = ((Number)textField.getValue()).doubleValue() + moveModifier; + newValue *= TRANSFORMATION_FINESS; + textField.setValue(newValue); + textField.postActionEvent(); + } + + private void decreaseInputField(JFormattedTextField textField) { + double newValue = ((Number)textField.getValue()).doubleValue() - moveModifier; + newValue *= TRANSFORMATION_FINESS; + textField.setValue(newValue); + textField.postActionEvent(); + } + /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always @@ -226,17 +292,22 @@ public class RegistrationPanel extends ControlPanel { jSeparator11 = new javax.swing.JSeparator(); visualizationPanel = new javax.swing.JPanel(); visualizationLabel = new javax.swing.JLabel(); - viewPanel = new javax.swing.JPanel(); - profileButton = new javax.swing.JButton(); - frontButton = new javax.swing.JButton(); + transparencySlider = new javax.swing.JSlider(); + transparencyButton = new javax.swing.JButton(); viewLabel = new javax.swing.JLabel(); - featurePointsPanel = new javax.swing.JPanel(); - thersholdUpButton = new javax.swing.JButton(); - thersholdFTF = new javax.swing.JFormattedTextField(); + frontButton = new javax.swing.JButton(); + profileButton = new javax.swing.JButton(); + jLabel9 = new javax.swing.JLabel(); featurePointsLabel = new javax.swing.JLabel(); + thersholdFTF = new javax.swing.JFormattedTextField(); + thersholdUpButton = new javax.swing.JButton(); thresholdDownButton = new javax.swing.JButton(); - transparencySlider = new javax.swing.JSlider(); - transparencyButton = new javax.swing.JButton(); + jLabel10 = new javax.swing.JLabel(); + jLabel11 = new javax.swing.JLabel(); + jLabel12 = new javax.swing.JLabel(); + jLabel13 = new javax.swing.JLabel(); + jLabel14 = new javax.swing.JLabel(); + jLabel15 = new javax.swing.JLabel(); transformationPanel = new javax.swing.JPanel(); translationPanel = new javax.swing.JPanel(); translationButton = new javax.swing.JButton(); @@ -285,13 +356,14 @@ public class RegistrationPanel extends ControlPanel { highShiftRB = new javax.swing.JRadioButton(); jButton1 = new javax.swing.JButton(); jSeparator2 = new javax.swing.JSeparator(); - jLabel1 = new javax.swing.JLabel(); jCheckBox1 = new javax.swing.JCheckBox(); jFormattedTextField1 = new javax.swing.JFormattedTextField(); jLabel5 = new javax.swing.JLabel(); jFormattedTextField2 = new javax.swing.JFormattedTextField(); jLabel6 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox<>(); + jLabel7 = new javax.swing.JLabel(); + jLabel8 = new javax.swing.JLabel(); setMinimumSize(new java.awt.Dimension(600, 600)); setPreferredSize(new java.awt.Dimension(415, 700)); @@ -299,44 +371,58 @@ public class RegistrationPanel extends ControlPanel { registrationAdjustmentLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(registrationAdjustmentLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.registrationAdjustmentLabel.text")); // NOI18N + visualizationPanel.setMaximumSize(new java.awt.Dimension(600, 600)); visualizationPanel.setMinimumSize(new java.awt.Dimension(400, 0)); visualizationPanel.setPreferredSize(new java.awt.Dimension(400, 265)); - visualizationLabel.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + visualizationLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(visualizationLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.visualizationLabel.text")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(profileButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.profileButton.text")); // NOI18N - profileButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.profileButton.toolTipText")); // NOI18N - profileButton.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder())); - profileButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + transparencySlider.setMajorTickSpacing(5); + transparencySlider.setMaximum(20); + transparencySlider.setMinorTickSpacing(5); + transparencySlider.setPaintTicks(true); + transparencySlider.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencySlider.toolTipText")); // NOI18N + transparencySlider.setValue(10); + transparencySlider.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); + transparencySlider.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent evt) { + transparencySliderStateChanged(evt); + } + }); + + transparencyButton.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(transparencyButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencyButton.text")); // NOI18N + transparencyButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencyButton.toolTipText")); // NOI18N + transparencyButton.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder())); + transparencyButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); + transparencyButton.setPreferredSize(new java.awt.Dimension(100, 19)); + transparencyButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + transparencyButtonActionPerformed(evt); + } + }); + + viewLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(viewLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.viewLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(frontButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.frontButton.text")); // NOI18N frontButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.frontButton.toolTipText")); // NOI18N frontButton.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder())); frontButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); - viewLabel.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(viewLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.viewLabel.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(profileButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.profileButton.text")); // NOI18N + profileButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.profileButton.toolTipText")); // NOI18N + profileButton.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder())); + profileButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); - javax.swing.GroupLayout viewPanelLayout = new javax.swing.GroupLayout(viewPanel); - viewPanel.setLayout(viewPanelLayout); - viewPanelLayout.setHorizontalGroup( - viewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(viewPanelLayout.createSequentialGroup() - .addComponent(viewLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(frontButton, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(profileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(216, 216, 216)) - ); - viewPanelLayout.setVerticalGroup( - viewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(viewPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(viewLabel) - .addComponent(frontButton) - .addComponent(profileButton)) - ); + jLabel9.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(jLabel9, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel9.text")); // NOI18N + + featurePointsLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(featurePointsLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.featurePointsLabel.text")); // NOI18N + + thersholdFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter())); thersholdUpButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/add-line.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(thersholdUpButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.thersholdUpButton.text")); // NOI18N @@ -351,11 +437,6 @@ public class RegistrationPanel extends ControlPanel { } }); - thersholdFTF.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter())); - - featurePointsLabel.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(featurePointsLabel, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.featurePointsLabel.text")); // NOI18N - thresholdDownButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/subtract-line.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(thresholdDownButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.thresholdDownButton.text")); // NOI18N thresholdDownButton.setBorder(javax.swing.BorderFactory.createTitledBorder("")); @@ -369,56 +450,21 @@ public class RegistrationPanel extends ControlPanel { } }); - javax.swing.GroupLayout featurePointsPanelLayout = new javax.swing.GroupLayout(featurePointsPanel); - featurePointsPanel.setLayout(featurePointsPanelLayout); - featurePointsPanelLayout.setHorizontalGroup( - featurePointsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(featurePointsPanelLayout.createSequentialGroup() - .addComponent(featurePointsLabel) - .addGap(18, 18, 18) - .addComponent(thersholdFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(thersholdUpButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(thresholdDownButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(192, Short.MAX_VALUE)) - ); - featurePointsPanelLayout.setVerticalGroup( - featurePointsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(featurePointsPanelLayout.createSequentialGroup() - .addGroup(featurePointsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(featurePointsLabel) - .addGroup(featurePointsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addComponent(thersholdFTF, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) - .addComponent(thersholdUpButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(thresholdDownButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) - .addGap(0, 10, Short.MAX_VALUE)) - ); + org.openide.awt.Mnemonics.setLocalizedText(jLabel10, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel10.text")); // NOI18N - transparencySlider.setMajorTickSpacing(5); - transparencySlider.setMaximum(20); - transparencySlider.setMinorTickSpacing(5); - transparencySlider.setPaintTicks(true); - transparencySlider.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencySlider.toolTipText")); // NOI18N - transparencySlider.setValue(10); - transparencySlider.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); - transparencySlider.addChangeListener(new javax.swing.event.ChangeListener() { - public void stateChanged(javax.swing.event.ChangeEvent evt) { - transparencySliderStateChanged(evt); - } - }); + org.openide.awt.Mnemonics.setLocalizedText(jLabel11, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel11.text")); // NOI18N - transparencyButton.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(transparencyButton, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencyButton.text")); // NOI18N - transparencyButton.setToolTipText(org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.transparencyButton.toolTipText")); // NOI18N - transparencyButton.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder())); - transparencyButton.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); - transparencyButton.setPreferredSize(new java.awt.Dimension(100, 19)); - transparencyButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - transparencyButtonActionPerformed(evt); - } - }); + jLabel12.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(jLabel12, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel12.text")); // NOI18N + + jLabel13.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(jLabel13, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel13.text")); // NOI18N + + jLabel14.setFont(new java.awt.Font("Ubuntu", 0, 15)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(jLabel14, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel14.text")); // NOI18N + + jLabel15.setFont(new java.awt.Font("Ubuntu", 0, 15)); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(jLabel15, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel15.text")); // NOI18N javax.swing.GroupLayout visualizationPanelLayout = new javax.swing.GroupLayout(visualizationPanel); visualizationPanel.setLayout(visualizationPanelLayout); @@ -427,16 +473,47 @@ public class RegistrationPanel extends ControlPanel { .addGroup(visualizationPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(featurePointsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(viewPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(visualizationPanelLayout.createSequentialGroup() - .addComponent(visualizationLabel) + .addComponent(featurePointsLabel) + .addGap(4, 4, 4) + .addComponent(thersholdFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(transparencySlider, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(transparencyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(thersholdUpButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(thresholdDownButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jLabel12) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel10) + .addGap(665, 665, 665)) + .addGroup(visualizationPanelLayout.createSequentialGroup() + .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel9) + .addGroup(visualizationPanelLayout.createSequentialGroup() + .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(visualizationLabel) + .addComponent(viewLabel)) + .addGap(30, 30, 30) + .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(visualizationPanelLayout.createSequentialGroup() + .addComponent(transparencySlider, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(transparencyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(visualizationPanelLayout.createSequentialGroup() + .addGap(256, 256, 256) + .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jLabel11) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(visualizationPanelLayout.createSequentialGroup() + .addGap(12, 12, 12) + .addComponent(frontButton, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(profileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); visualizationPanelLayout.setVerticalGroup( visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -451,11 +528,29 @@ public class RegistrationPanel extends ControlPanel { .addGroup(javax.swing.GroupLayout.Alignment.LEADING, visualizationPanelLayout.createSequentialGroup() .addGap(24, 24, 24) .addComponent(transparencyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addGap(34, 34, 34) - .addComponent(viewPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(22, 22, 22) - .addComponent(featurePointsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(25, Short.MAX_VALUE)) + .addGap(8, 8, 8) + .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(viewLabel) + .addComponent(frontButton) + .addComponent(profileButton)) + .addGap(18, 18, 18) + .addComponent(jLabel9) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(featurePointsLabel) + .addComponent(thersholdFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(thersholdUpButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(thresholdDownButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(visualizationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel11) + .addComponent(jLabel10) + .addComponent(jLabel12) + .addComponent(jLabel13) + .addComponent(jLabel14) + .addComponent(jLabel15))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); transformationPanel.setPreferredSize(new java.awt.Dimension(400, 400)); @@ -819,12 +914,14 @@ public class RegistrationPanel extends ControlPanel { .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(rotationZFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(rotationPanelLayout.createSequentialGroup() - .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(rotatZLabel) + .addGroup(rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(rotationPanelLayout.createSequentialGroup() + .addGap(16, 16, 16) + .addComponent(rotatZLabel)) .addComponent(leftRotationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(rightRotationZButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(214, Short.MAX_VALUE)) ); rotationPanelLayout.setVerticalGroup( rotationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -910,20 +1007,16 @@ public class RegistrationPanel extends ControlPanel { scalePanelLayout.setHorizontalGroup( scalePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scalePanelLayout.createSequentialGroup() - .addGroup(scalePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(scalePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(scalePanelLayout.createSequentialGroup() .addComponent(jLabel4) - .addGap(0, 93, Short.MAX_VALUE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scalePanelLayout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addComponent(scaleButton))) - .addGroup(scalePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(scalePanelLayout.createSequentialGroup() - .addGap(18, 18, 18) + .addGap(0, 111, Short.MAX_VALUE) .addComponent(scalePlusButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(scaleMinusButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, scalePanelLayout.createSequentialGroup() + .addGroup(scalePanelLayout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(scaleButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(scaleFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) @@ -1075,6 +1168,7 @@ public class RegistrationPanel extends ControlPanel { .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) ); + jButton1.setFont(new java.awt.Font("Ubuntu", 1, 15)); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jButton1.text")); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -1082,9 +1176,6 @@ public class RegistrationPanel extends ControlPanel { } }); - jLabel1.setFont(new java.awt.Font("Ubuntu", 1, 14)); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel1.text")); // NOI18N - jCheckBox1.setSelected(true); org.openide.awt.Mnemonics.setLocalizedText(jCheckBox1, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jCheckBox1.text")); // NOI18N jCheckBox1.addActionListener(new java.awt.event.ActionListener() { @@ -1105,6 +1196,10 @@ public class RegistrationPanel extends ControlPanel { jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "None", "Random 200" })); + org.openide.awt.Mnemonics.setLocalizedText(jLabel7, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel7.text")); // NOI18N + + org.openide.awt.Mnemonics.setLocalizedText(jLabel8, org.openide.util.NbBundle.getMessage(RegistrationPanel.class, "RegistrationPanel.jLabel8.text")); // NOI18N + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -1115,78 +1210,63 @@ public class RegistrationPanel extends ControlPanel { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSeparator2) .addGap(450, 450, 450)) + .addComponent(jSeparator11) .addGroup(layout.createSequentialGroup() - .addComponent(registrationAdjustmentLabel) - .addGap(0, 0, Short.MAX_VALUE)) - .addGroup(layout.createSequentialGroup() - .addComponent(jLabel1) + .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGap(29, 29, 29) - .addComponent(jButton1)) - .addGroup(layout.createSequentialGroup() - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel7) + .addGap(6, 6, 6) .addComponent(jCheckBox1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(4, 4, 4) .addComponent(jLabel5) - .addGap(9, 9, 9) - .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(1, 1, 1) - .addComponent(jLabel6) + .addGap(4, 4, 4) + .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(jLabel6) + .addGap(3, 3, 3) + .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(3, 3, 3) + .addComponent(jLabel8) + .addGap(2, 2, 2) + .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(registrationAdjustmentLabel) + .addGroup(layout.createSequentialGroup() + .addGap(215, 215, 215) + .addComponent(jButton1))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addComponent(jSeparator11) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel7) .addComponent(jCheckBox1) - .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel5) - .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jLabel6) - .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jFormattedTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel5) + .addComponent(jLabel6) + .addComponent(jFormattedTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel8) + .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSeparator11, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(registrationAdjustmentLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(visualizationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(22, 22, 22) + .addComponent(visualizationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(transformationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 333, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(67, Short.MAX_VALUE)) ); }// </editor-fold>//GEN-END:initComponents - /** - * Resets transparency slider to default position - * @param evt - */ - private void transparencyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_transparencyButtonActionPerformed - transparencySlider.setValue(TRANSPARENCY_RANGE); - transparencySlider.repaint(); - //listener.setTransparency(PostRegistrationListener.TRANSPARENCY_RANGE); - }//GEN-LAST:event_transparencyButtonActionPerformed - - private void transparencySliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_transparencySliderStateChanged - listener.actionPerformed( - new ActionEvent( - evt.getSource(), - ActionEvent.ACTION_PERFORMED, - ACTION_COMMAND_TRANSPARENCY) - ); - }//GEN-LAST:event_transparencySliderStateChanged - private void leftTranslationXButtonMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_leftTranslationXButtonMousePressed animator.startModelAnimation(Direction.TRANSLATE_LEFT, this); }//GEN-LAST:event_leftTranslationXButtonMousePressed @@ -1299,18 +1379,6 @@ public class RegistrationPanel extends ControlPanel { animator.stopModelAnimation(this); }//GEN-LAST:event_scalePlusButtonMouseReleased - private void thresholdDownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_thresholdDownButtonActionPerformed - double newValue = ((Number)thersholdFTF.getValue()).doubleValue() - 0.1; - thersholdFTF.setValue(newValue); - thersholdFTF.postActionEvent(); - }//GEN-LAST:event_thresholdDownButtonActionPerformed - - private void thersholdUpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_thersholdUpButtonActionPerformed - double newValue = ((Number)thersholdFTF.getValue()).doubleValue() + 0.1; - thersholdFTF.setValue(newValue); - thersholdFTF.postActionEvent(); - }//GEN-LAST:event_thersholdUpButtonActionPerformed - private void lowShiftRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_lowShiftRBActionPerformed this.moveModifier = LOW_SHIFT_QUOTIENT; }//GEN-LAST:event_lowShiftRBActionPerformed @@ -1353,11 +1421,41 @@ public class RegistrationPanel extends ControlPanel { // TODO add your handling code here: }//GEN-LAST:event_jCheckBox1ActionPerformed + /** + * Resets transparency slider to default position + * @param evt + */ + private void transparencyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_transparencyButtonActionPerformed + transparencySlider.setValue(TRANSPARENCY_RANGE); + transparencySlider.repaint(); + //listener.setTransparency(PostRegistrationListener.TRANSPARENCY_RANGE); + }//GEN-LAST:event_transparencyButtonActionPerformed + + private void transparencySliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_transparencySliderStateChanged + listener.actionPerformed( + new ActionEvent( + evt.getSource(), + ActionEvent.ACTION_PERFORMED, + ACTION_COMMAND_TRANSPARENCY) + ); + }//GEN-LAST:event_transparencySliderStateChanged + + private void thresholdDownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_thresholdDownButtonActionPerformed + double newValue = ((Number)thersholdFTF.getValue()).doubleValue() - 0.1; + thersholdFTF.setValue(newValue); + thersholdFTF.postActionEvent(); + }//GEN-LAST:event_thresholdDownButtonActionPerformed + + private void thersholdUpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_thersholdUpButtonActionPerformed + double newValue = ((Number)thersholdFTF.getValue()).doubleValue() + 0.1; + thersholdFTF.setValue(newValue); + thersholdFTF.postActionEvent(); + }//GEN-LAST:event_thersholdUpButtonActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton applyButton; private javax.swing.JLabel featurePointsLabel; - private javax.swing.JPanel featurePointsPanel; private javax.swing.JButton frontButton; private javax.swing.JRadioButton highShiftRB; private javax.swing.JButton jButton1; @@ -1365,12 +1463,20 @@ public class RegistrationPanel extends ControlPanel { private javax.swing.JComboBox<String> jComboBox1; private javax.swing.JFormattedTextField jFormattedTextField1; private javax.swing.JFormattedTextField jFormattedTextField2; - private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; private javax.swing.JSeparator jSeparator10; private javax.swing.JSeparator jSeparator11; private javax.swing.JSeparator jSeparator2; @@ -1425,7 +1531,6 @@ public class RegistrationPanel extends ControlPanel { private javax.swing.JButton transparencyButton; private javax.swing.JSlider transparencySlider; private javax.swing.JLabel viewLabel; - private javax.swing.JPanel viewPanel; private javax.swing.JLabel visualizationLabel; private javax.swing.JPanel visualizationPanel; // End of variables declaration//GEN-END:variables diff --git a/GUI/src/main/java/cz/fidentis/analyst/scene/DrawableFeaturePoints.java b/GUI/src/main/java/cz/fidentis/analyst/scene/DrawableFeaturePoints.java index 9b110b99..1fa59779 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/scene/DrawableFeaturePoints.java +++ b/GUI/src/main/java/cz/fidentis/analyst/scene/DrawableFeaturePoints.java @@ -18,7 +18,7 @@ import java.util.Map; */ public class DrawableFeaturePoints extends Drawable { - public static final Color DEFAULT_COLOR = Color.GREEN; + public static final Color DEFAULT_COLOR = Color.LIGHT_GRAY; private static final GLU GLU_CONTEXT = new GLU(); @@ -51,7 +51,7 @@ public class DrawableFeaturePoints extends Drawable { if (specialColors.containsKey(index)) { return specialColors.get(index); } else { - return DEFAULT_COLOR; + return getColor(); } } @@ -64,12 +64,26 @@ public class DrawableFeaturePoints extends Drawable { if (index < 0 || index >= featurePoints.size() || color == null) { return; } - if (color.equals(DEFAULT_COLOR)) { + if (color.equals(getColor())) { specialColors.remove(index); } else { specialColors.put(index, color); } } + + /** + * Removes (possible) special color of given feature point. + */ + public void resetColorToDefault(int index) { + setColor(index, getColor()); + } + + /** + * Removes all individual colors of feature points. + */ + public void resetAllColorsToDefault() { + this.specialColors.clear(); + } @Override protected void renderObject(GL2 gl) { @@ -111,7 +125,7 @@ public class DrawableFeaturePoints extends Drawable { * @return {@link List} of {@link FeaturePoint} */ public List<FeaturePoint> getFeaturePoints() { - return Collections.unmodifiableList(featurePoints); + return featurePoints; } /** diff --git a/GUI/src/main/java/cz/fidentis/analyst/scene/Scene.java b/GUI/src/main/java/cz/fidentis/analyst/scene/Scene.java index 98174da8..6b8e3bf9 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/scene/Scene.java +++ b/GUI/src/main/java/cz/fidentis/analyst/scene/Scene.java @@ -1,6 +1,7 @@ package cz.fidentis.analyst.scene; import cz.fidentis.analyst.face.HumanFace; +import java.awt.Color; import java.util.ArrayList; import java.util.List; @@ -35,6 +36,8 @@ public class Scene { drawableFeaturePoints.add(null); } drawableSymmetryPlanes.add(null); + + setDefaultColors(); } /** @@ -72,7 +75,22 @@ public class Scene { drawableSymmetryPlanes.add(null); drawableSymmetryPlanes.add(null); - drawableFaces.get(1).setColor(DrawableFace.SKIN_COLOR_SECONDARY); + setDefaultColors(); + } + + /** + * Sets default colors of faces and feature points + */ + public final void setDefaultColors() { + for (int i = 0; i < getNumFaces(); i++) { + if (drawableFaces.get(i) != null) { + drawableFaces.get(i).setColor((i == 0) ? DrawableFace.SKIN_COLOR_PRIMARY : DrawableFace.SKIN_COLOR_SECONDARY); + } + if (drawableFeaturePoints.get(i) != null) { + drawableFeaturePoints.get(i).setColor(getColorOfFeaturePoints((i == 0) ? DrawableFace.SKIN_COLOR_PRIMARY : DrawableFace.SKIN_COLOR_SECONDARY)); + drawableFeaturePoints.get(i).resetAllColorsToDefault(); + } + } } /** @@ -138,4 +156,12 @@ public class Scene { while (ret.remove(null)) {} return ret; } + + private Color getColorOfFeaturePoints(Color origColor) { + return new Color( + Math.min(255, origColor.getRed() + 40), + Math.min(255, origColor.getGreen() + 40), + Math.min(255, origColor.getBlue() + 40) + ); + } } diff --git a/GUI/src/main/resources/cz/fidentis/analyst/registration/Bundle.properties b/GUI/src/main/resources/cz/fidentis/analyst/registration/Bundle.properties index eb1ca6c1..4145e80a 100644 --- a/GUI/src/main/resources/cz/fidentis/analyst/registration/Bundle.properties +++ b/GUI/src/main/resources/cz/fidentis/analyst/registration/Bundle.properties @@ -4,7 +4,6 @@ RegistrationPanel.rotationButton.text= RegistrationPanel.rotatXLabel.text=X RegistrationPanel.rotatYLabel.text=Y RegistrationPanel.rotatZLabel.text=Z -RegistrationPanel.transparencySlider.toolTipText=sets model transparency RegistrationPanel.leftRotationXButton.text= RegistrationPanel.leftRotationYButton.text= RegistrationPanel.leftTranslationZButton.text= @@ -13,15 +12,12 @@ RegistrationPanel.rightTranslationZButton.text= RegistrationPanel.translYLabel.text=vertical RegistrationPanel.translZLabel.text=front-back RegistrationPanel.translXLabel.text=horizontal -RegistrationPanel.transparencyButton.toolTipText=reset transparency -RegistrationPanel.transparencyButton.text=clear RegistrationPanel.rightTranslationYButton.text= RegistrationPanel.leftTranslationYButton.text= RegistrationPanel.translationXFTF.toolTipText= RegistrationPanel.applyButton.toolTipText=apply transformations RegistrationPanel.applyButton.text=Apply changes RegistrationPanel.rightTranslationXButton.text= -RegistrationPanel.visualizationLabel.text=Transparency: RegistrationPanel.jLabel2.text=Translation: RegistrationPanel.translationButton.toolTipText=reset translation RegistrationPanel.translationButton.text= @@ -32,34 +28,46 @@ RegistrationPanel.lowShiftRB.toolTipText=set low shifting amount RegistrationPanel.lowShiftRB.text=low RegistrationPanel.shiftLabel.toolTipText=transformation amount RegistrationPanel.shiftLabel.text=shift -RegistrationPanel.featurePointsLabel.text=FP closeness treshold: RegistrationPanel.resetAllButton.toolTipText=reset all transformations RegistrationPanel.resetAllButton.text=reset all RegistrationPanel.scaleButton.toolTipText=reset scale RegistrationPanel.scaleButton.text= RegistrationPanel.scaleFTF.toolTipText= -RegistrationPanel.thersholdUpButton.text= -RegistrationPanel.thresholdDownButton.text= RegistrationPanel.scaleMinusButton.text= RegistrationPanel.scalePlusButton.text= RegistrationPanel.jLabel4.text=Scale: -RegistrationPanel.viewLabel.text=View: RegistrationPanel.jLabel3.text=Rotation: -RegistrationPanel.frontButton.toolTipText=model front view -RegistrationPanel.frontButton.text=front RegistrationPanel.rotationXFTF.toolTipText= -RegistrationPanel.profileButton.toolTipText=model profile view -RegistrationPanel.profileButton.text=side # To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. RegistrationPanel.rightRotationXButton.text= RegistrationPanel.leftRotationZButton.text= RegistrationPanel.rightRotationYButton.text= -RegistrationPanel.jButton1.text=(Re)compute -RegistrationPanel.jLabel1.text=ICP: -RegistrationPanel.jCheckBox1.text=scale +RegistrationPanel.jButton1.text=(Re)compute ICP +RegistrationPanel.jCheckBox1.text= RegistrationPanel.jFormattedTextField1.text=0,3 -RegistrationPanel.jLabel5.text=error +RegistrationPanel.jLabel5.text=error: RegistrationPanel.jFormattedTextField2.text=10 -RegistrationPanel.jLabel6.text=max iters +RegistrationPanel.jLabel6.text=max iters.: +RegistrationPanel.jLabel7.text=scale: +RegistrationPanel.jLabel8.text=undersampling: +RegistrationPanel.thersholdUpButton.text= +RegistrationPanel.visualizationLabel.text=Transparency: +RegistrationPanel.profileButton.toolTipText=model profile view +RegistrationPanel.profileButton.text=side +RegistrationPanel.frontButton.toolTipText=model front view +RegistrationPanel.frontButton.text=front +RegistrationPanel.viewLabel.text=View: +RegistrationPanel.transparencyButton.toolTipText=reset transparency +RegistrationPanel.transparencyButton.text=clear +RegistrationPanel.transparencySlider.toolTipText=sets model transparency +RegistrationPanel.thresholdDownButton.text= +RegistrationPanel.featurePointsLabel.text=Coloring treshold: +RegistrationPanel.jLabel9.text=Feature points: +RegistrationPanel.jLabel10.text=min: +RegistrationPanel.jLabel11.text=max: +RegistrationPanel.jLabel12.text=avg: +RegistrationPanel.jLabel13.text=0 +RegistrationPanel.jLabel14.text=0 +RegistrationPanel.jLabel15.text=0 -- GitLab