diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java index 317cf345a264b9c576a0df2e1b6226e3fe9999fd..18e515042de6c9a1a7609bec00c4f9c4aad00b42 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java @@ -6,6 +6,7 @@ package cz.fidentis.analyst.gui; import com.jogamp.opengl.GL2; +import cz.fidentis.analyst.feature.FeaturePoint; import cz.fidentis.analyst.gui.canvas.Canvas; import cz.fidentis.analyst.gui.scene.DrawableMesh; import cz.fidentis.analyst.mesh.core.MeshFacet; @@ -14,7 +15,6 @@ import cz.fidentis.analyst.visitors.mesh.BoundingBox; import java.awt.Color; import java.util.AbstractMap; import java.util.ArrayList; -import java.util.Collections; import javax.vecmath.Point3d; import javax.vecmath.Vector3d; @@ -65,24 +65,22 @@ public class RegistrationCPEventListener { if (!primaryFace.isRenderFeaturePoints()) { return; } - ArrayList<AbstractMap.SimpleEntry<Point3d, Color>> adjusted = new ArrayList<>(); + ArrayList<Color> color = (ArrayList)secondaryFace.getFeaturePointsColor(); for (int i = 0; i < primaryFace.getFeaturePoints().size(); i++) { - Point3d primaryPoint = primaryFace.getFeaturePoints().get(i).getKey(); - Point3d secondaryPoint = new Point3d(secondaryFace.getFeaturePoints().get(i).getKey()); - transformPoint(secondaryPoint); + FeaturePoint primary = primaryFace.getFeaturePoints().get(i); + FeaturePoint secondary = secondaryFace.getFeaturePoints().get(i); + Point3d transformed = new Point3d(secondary.getX(), secondary.getY(), secondary.getZ()); + transformPoint(transformed); double distance = Math.sqrt( - Math.pow(secondaryPoint.x - primaryPoint.x, 2) + - Math.pow(secondaryPoint.y - primaryPoint.y, 2) + - Math.pow(secondaryPoint.z - primaryPoint.z, 2)); - Point3d point = new Point3d(secondaryFace.getFeaturePoints().get(i).getKey()); + Math.pow(transformed.x - primary.getX(), 2) + + Math.pow(transformed.y - primary.getY(), 2) + + Math.pow(transformed.z - primary.getZ(), 2)); if (distance > featurePointsThreshold) { - adjusted.add(new AbstractMap.SimpleEntry<>( - point, Color.RED)); - } else { - adjusted.add(new AbstractMap.SimpleEntry<>( - point, Color.YELLOW)); + color.set(i, Color.RED); + } + else { + color.set(i, defaultSecondaryColor); } - secondaryFace.setFeaturePoints(adjusted); } } @@ -95,8 +93,13 @@ public class RegistrationCPEventListener { transformPoint(comparedPoint.getPosition()); } } - for (var point : secondaryFace.getFeaturePoints()) { - transformPoint(point.getKey()); + for (int i = 0; i < secondaryFace.getFeaturePoints().size(); i++) { + FeaturePoint point = secondaryFace.getFeaturePoints().get(i); + Point3d transformed = new Point3d(point.getX(), point.getY(), point.getZ()); + transformPoint(transformed); + point = new FeaturePoint(transformed.x, transformed.y, + transformed.z, point.getFeaturePointType()); + secondaryFace.getFeaturePoints().set(i, point); } canvas.renderScene(); } diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationTestTopComponent.form b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationTestTopComponent.form index aacf85556c0d9025093eace3a29d7d31ea369834..ec91c1380bbb7ba493046c8cdc1f2bb831b555c7 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationTestTopComponent.form +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationTestTopComponent.form @@ -22,6 +22,11 @@ --> <Form version="1.4" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> + <Properties> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[405, 600]"/> + </Property> + </Properties> <AuxValues> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/> <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> @@ -38,14 +43,14 @@ <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> - <EmptySpace pref="549" max="32767" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> <Component id="postRegistrationCP1" min="-2" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> </Group> <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> <Component id="canvas1" min="-2" pref="543" max="-2" attributes="0"/> - <EmptySpace min="0" pref="326" max="32767" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> </Group> </Group> </Group> @@ -53,12 +58,12 @@ <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" alignment="1" attributes="0"> - <Component id="postRegistrationCP1" pref="533" max="32767" attributes="0"/> + <Component id="postRegistrationCP1" pref="0" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/> </Group> <Group type="103" rootIndex="1" groupAlignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0"> - <Component id="canvas1" pref="533" max="32767" attributes="0"/> + <Component id="canvas1" max="32767" attributes="0"/> <EmptySpace max="-2" attributes="0"/> </Group> </Group> diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationTestTopComponent.java b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationTestTopComponent.java index 561e0009a9e3d4ee9644d5327b2412aa86a5b120..848f720353c4c7738fdc2b6968d6b3025781ed84 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationTestTopComponent.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationTestTopComponent.java @@ -6,6 +6,7 @@ package cz.fidentis.analyst.gui; import cz.fidentis.analyst.face.HumanFace; +import cz.fidentis.analyst.feature.FeaturePoint; import cz.fidentis.analyst.gui.scene.DrawableMesh; import cz.fidentis.analyst.gui.tab.PostRegistrationCP; import cz.fidentis.analyst.mesh.io.ModelFileFilter; @@ -81,17 +82,17 @@ public final class RegistrationTestTopComponent extends TopComponent { ArrayList<DrawableMesh> drawables = new ArrayList<>(canvas1.getScene().getDrawables()); DrawableMesh primaryFace = drawables.get(0); DrawableMesh secondaryFace = drawables.get(1); - ArrayList<AbstractMap.SimpleEntry<Point3d, Color>> primar = new ArrayList<>(); - primar.add(new AbstractMap.SimpleEntry<>(new Point3d(100, 0, 0), Color.BLUE)); + + ArrayList<FeaturePoint> primar = new ArrayList<>(); + primar.add(new FeaturePoint(100, 0, 0, null)); primaryFace.setFeaturePoints(primar); - ArrayList<AbstractMap.SimpleEntry<Point3d, Color>> secondar = new ArrayList<>(); - secondar.add(new AbstractMap.SimpleEntry<>(new Point3d(101, 0, 0), Color.YELLOW)); + + ArrayList<FeaturePoint> secondar = new ArrayList<>(); + secondar.add(new FeaturePoint(101, 0, 0, null)); secondaryFace.setFeaturePoints(secondar); postRegistrationCP1.initPostRegistrationCP(new RegistrationCPEventListener(canvas1)); - - } /** @@ -105,27 +106,29 @@ public final class RegistrationTestTopComponent extends TopComponent { postRegistrationCP1 = new cz.fidentis.analyst.gui.tab.PostRegistrationCP(); canvas1 = new cz.fidentis.analyst.gui.canvas.Canvas(); + setPreferredSize(new java.awt.Dimension(405, 600)); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addContainerGap(549, Short.MAX_VALUE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(postRegistrationCP1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(canvas1, javax.swing.GroupLayout.PREFERRED_SIZE, 543, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(0, 326, Short.MAX_VALUE))) + .addGap(0, 0, Short.MAX_VALUE))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(postRegistrationCP1, javax.swing.GroupLayout.PREFERRED_SIZE, 533, Short.MAX_VALUE) + .addComponent(postRegistrationCP1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addContainerGap()) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addComponent(canvas1, javax.swing.GroupLayout.DEFAULT_SIZE, 533, Short.MAX_VALUE) + .addComponent(canvas1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())) ); }// </editor-fold>//GEN-END:initComponents diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/DrawableMesh.java b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/DrawableMesh.java index b25cdd68411b9eab29cf3024d973673e448ecd9b..395eb4d942c591ca8183a8bd7b403ff871d790a6 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/DrawableMesh.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/DrawableMesh.java @@ -1,6 +1,7 @@ package cz.fidentis.analyst.gui.scene; import com.jogamp.opengl.GL2; +import cz.fidentis.analyst.feature.FeaturePoint; import cz.fidentis.analyst.mesh.core.MeshFacet; import cz.fidentis.analyst.mesh.core.MeshModel; import java.awt.Color; @@ -34,8 +35,9 @@ public class DrawableMesh { // render mode private int renderMode = GL2.GL_FILL; // feature points - private ArrayList<AbstractMap.SimpleEntry<Point3d, Color>> featurePoints = new ArrayList<>(); - boolean renderFeaturePoints = false; + private List<FeaturePoint> featurePoints = new ArrayList<>(); + private List<Color> featurePointsColor = new ArrayList<>(); + private boolean renderFeaturePoints = false; /** * Constructor. @@ -141,14 +143,27 @@ public class DrawableMesh { this.renderMode = renderMode; } - public ArrayList<AbstractMap.SimpleEntry<Point3d, Color>> getFeaturePoints() { + public List<FeaturePoint> getFeaturePoints() { return featurePoints; } - public void setFeaturePoints(ArrayList<AbstractMap.SimpleEntry<Point3d, Color>> featurePoints) { + public void setFeaturePoints(List<FeaturePoint> featurePoints) { this.featurePoints = featurePoints; + List<Color> colors = new ArrayList<>(); + featurePoints.forEach((_item) -> { + colors.add(this.color); + }); + this.setFeaturePointsColor(colors); } + public List<Color> getFeaturePointsColor() { + return featurePointsColor; + } + + public void setFeaturePointsColor(List<Color> featurePointsColor) { + this.featurePointsColor = featurePointsColor; + } + public boolean isRenderFeaturePoints() { return renderFeaturePoints; } diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java index 10d45da9393a6c77d803e58ac2db81eb8509ffbd..daa69717015a46169dcc83e14203215b75f3429a 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java @@ -6,6 +6,7 @@ import static com.jogamp.opengl.GL.GL_FRONT_AND_BACK; import com.jogamp.opengl.GL2; import com.jogamp.opengl.glu.GLU; import com.jogamp.opengl.glu.GLUquadric; +import cz.fidentis.analyst.feature.FeaturePoint; import cz.fidentis.analyst.mesh.core.MeshFacet; import java.awt.Color; import java.util.AbstractMap; @@ -178,11 +179,11 @@ public class SceneRenderer { * Renders feature points */ private void renderFeaturePoints(DrawableMesh obj) { - for (AbstractMap.SimpleEntry<Point3d, Color> featurePoint: obj.getFeaturePoints()) { - Color color = featurePoint.getValue(); - Point3d point = featurePoint.getKey(); + for (int i = 0; i < obj.getFeaturePoints().size(); i++) { + Color color = obj.getFeaturePointsColor().get(i); + FeaturePoint point = obj.getFeaturePoints().get(i); gl.glPushMatrix(); - gl.glTranslated(point.x, point.y, point.z); + gl.glTranslated(point.getX(), point.getY(), point.getZ()); float[] rgba = {color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f , obj.getTransparency()}; gl.glMaterialfv(GL2.GL_FRONT_AND_BACK, GL2.GL_AMBIENT, rgba, 0); diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.form b/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.form index 7936d52159e2a317f4a5940b8e8e07363cc5a82e..57847abcd50849613cbe1a65dd41c3ca4b53eb12 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.form +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.form @@ -181,10 +181,12 @@ <Component id="modelLabel" alignment="0" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace type="separate" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="secondaryColorPanel" pref="50" max="32767" attributes="0"/> - <Component id="primaryColorPanel" pref="50" max="32767" attributes="0"/> - <Component id="colorButton" alignment="1" pref="50" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="primaryColorPanel" pref="50" max="32767" attributes="0"/> + <Component id="colorButton" alignment="1" pref="50" max="32767" attributes="0"/> + </Group> + <Component id="secondaryColorPanel" min="-2" pref="50" max="-2" attributes="0"/> </Group> <EmptySpace type="separate" max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> @@ -284,40 +286,37 @@ <Component id="pointsLabel" alignment="3" min="-2" max="-2" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="103" groupAlignment="1" max="-2" attributes="0"> - <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="103" groupAlignment="0" max="-2" attributes="0"> - <Component id="secondaryColorPanel" max="32767" attributes="0"/> - <Component id="primaryLabel" max="32767" attributes="0"/> - </Group> - <Component id="primaryHighlightsCB" min="-2" max="-2" attributes="0"/> - <Component id="primaryFillRB" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace min="-2" pref="11" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Group type="103" alignment="1" groupAlignment="0" max="-2" attributes="0"> - <Component id="primaryColorPanel" max="32767" attributes="0"/> - <Component id="secondaryLabel" max="32767" attributes="0"/> - </Group> - <Component id="secondaryHighlightsCB" alignment="1" min="-2" max="-2" attributes="0"/> - <Component id="secondaryFillRB" alignment="1" min="-2" max="-2" attributes="0"/> - </Group> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="primaryLabel" min="-2" max="-2" attributes="0"/> + <Component id="primaryHighlightsCB" min="-2" max="-2" attributes="0"/> + <Component id="primaryFillRB" min="-2" max="-2" attributes="0"/> </Group> - <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="primaryLinesRB" min="-2" max="-2" attributes="0"/> - <Component id="primaryPointsRB" min="-2" max="-2" attributes="0"/> - </Group> - <EmptySpace max="32767" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="secondaryLinesRB" alignment="1" min="-2" max="-2" attributes="0"/> - <Component id="secondaryPointsRB" alignment="1" min="-2" max="-2" attributes="0"/> - </Group> + <EmptySpace min="-2" pref="11" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="secondaryLabel" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="secondaryHighlightsCB" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="secondaryFillRB" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="primaryLinesRB" min="-2" max="-2" attributes="0"/> + <Component id="primaryPointsRB" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="secondaryLinesRB" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="secondaryPointsRB" alignment="1" min="-2" max="-2" attributes="0"/> </Group> </Group> <Component id="transparencySlider" min="-2" pref="53" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="primaryColorPanel" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="secondaryColorPanel" min="-2" max="-2" attributes="0"/> + </Group> </Group> <EmptySpace type="unrelated" max="-2" attributes="0"/> <Component id="jSeparator2" min="-2" pref="8" max="-2" attributes="0"/> @@ -449,7 +448,7 @@ </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <EmptySpace min="0" pref="12" max="32767" attributes="0"/> </Group> </DimensionLayout> </Layout> @@ -478,12 +477,12 @@ <Layout> <DimensionLayout dim="0"> <Group type="103" groupAlignment="0" attributes="0"> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <EmptySpace min="0" pref="48" max="32767" attributes="0"/> </Group> </DimensionLayout> <DimensionLayout dim="1"> <Group type="103" groupAlignment="0" attributes="0"> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <EmptySpace min="0" pref="12" max="32767" attributes="0"/> </Group> </DimensionLayout> </Layout> diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.java b/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.java index 85315d019b09b3f074d400e2f240131da8a80ad5..3ea7a4dfe764f5873020678f0f779cf9146dfd90 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.java @@ -156,7 +156,7 @@ public class PostRegistrationCP extends javax.swing.JPanel { ); primaryColorPanelLayout.setVerticalGroup( primaryColorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 0, Short.MAX_VALUE) + .addGap(0, 12, Short.MAX_VALUE) ); secondaryColorPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); @@ -173,11 +173,11 @@ public class PostRegistrationCP extends javax.swing.JPanel { secondaryColorPanel.setLayout(secondaryColorPanelLayout); secondaryColorPanelLayout.setHorizontalGroup( secondaryColorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 0, Short.MAX_VALUE) + .addGap(0, 48, Short.MAX_VALUE) ); secondaryColorPanelLayout.setVerticalGroup( secondaryColorPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGap(0, 0, Short.MAX_VALUE) + .addGap(0, 12, Short.MAX_VALUE) ); transparencySlider.setMajorTickSpacing(5); @@ -865,10 +865,11 @@ public class PostRegistrationCP extends javax.swing.JPanel { .addComponent(primaryLabel) .addComponent(modelLabel)) .addGap(18, 18, 18) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(secondaryColorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE) - .addComponent(primaryColorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE) - .addComponent(colorButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(primaryColorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE) + .addComponent(colorButton, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)) + .addComponent(secondaryColorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(highlightsLabel) @@ -943,31 +944,30 @@ public class PostRegistrationCP extends javax.swing.JPanel { .addComponent(linesLabel) .addComponent(pointsLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(secondaryColorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(primaryLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addComponent(primaryHighlightsCB) - .addComponent(primaryFillRB)) - .addGap(11, 11, 11) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(primaryColorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(secondaryLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addComponent(secondaryHighlightsCB, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(secondaryFillRB, javax.swing.GroupLayout.Alignment.TRAILING))) - .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(primaryLinesRB) - .addComponent(primaryPointsRB)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(secondaryLinesRB, javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(secondaryPointsRB, javax.swing.GroupLayout.Alignment.TRAILING)))) - .addComponent(transparencySlider, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(primaryLabel) + .addComponent(primaryHighlightsCB) + .addComponent(primaryFillRB)) + .addGap(11, 11, 11) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(secondaryLabel, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(secondaryHighlightsCB, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(secondaryFillRB, javax.swing.GroupLayout.Alignment.TRAILING))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(primaryLinesRB) + .addComponent(primaryPointsRB)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(secondaryLinesRB, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(secondaryPointsRB, javax.swing.GroupLayout.Alignment.TRAILING))) + .addComponent(transparencySlider, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addComponent(primaryColorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(secondaryColorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) diff --git a/MeshModel/pom.xml b/MeshModel/pom.xml index 33f1efcc3d2f86834d051c0b6df40385f1d54d29..762834084c81ccc852da5fd2cd16d6505315729f 100644 --- a/MeshModel/pom.xml +++ b/MeshModel/pom.xml @@ -21,6 +21,7 @@ <publicPackage>cz.fidentis.analyst.mesh.io.*</publicPackage> <publicPackage>cz.fidentis.analyst.mesh.*</publicPackage> <publicPackage>cz.fidentis.analyst.kdtree.*</publicPackage> + <publicPackage>cz.fidentis.analyst.feature.*</publicPackage> <!--<publicPackage>cz.fidentis.analyst.mesh.core.MeshFacet</publicPackage>--> <!--<publicPackage>cz.fidentis.analyst.mesh.core.MeshPoint</publicPackage>--> </publicPackages> diff --git a/MeshModel/test_file_landmarks.csv b/MeshModel/test_file_landmarks.csv index e2d6288e77633889dd6f24afab8da4e892c0cc9b..b9658ea0436adba2cb335af9ad6f55acf6f1f6a3 100644 --- a/MeshModel/test_file_landmarks.csv +++ b/MeshModel/test_file_landmarks.csv @@ -1,2 +1,2 @@ -Scan name,EX_R x,EX_R y,EX_R z,EX_L x,EX_L y,EX_L z,EN_R x,EN_R y,EN_R z,EN_L x,EN_L y,EN_L z,PAS_R x,PAS_R y,PAS_R z,PAS_L x,PAS_L y,PAS_L z,PAI_R x,PAI_R y,PAI_R z,PAI_L x,PAI_L y,PAI_L z,G x,G y,G z,SN x,SN y,SN z,AL_R x,AL_R y,AL_R z,AL_L x,AL_L y,AL_L z,N x,N y,N z,PRN x,PRN y,PRN z,LS x,LS y,LS z,STO x,STO y,STO z,LI x,LI y,LI z,CH_R x,CH_R y,CH_R z,CH_L x,CH_L y,CH_L z,CP_R x,CP_R y,CP_R z,CP_L x,CP_L y,CP_L z,SL x,SL y,SL z,GN x,GN y,GN z,GOL_R x,GOL_R y,GOL_R z,GOL_L x,GOL_L y,GOL_L z,ZY_R x,ZY_R y,ZY_R z,ZY_L x,ZY_L y,ZY_L z,PG x,PG y,PG z,T_R x,T_R y,T_R z,T_L x,T_L y,T_L z,SA_R x,SA_R y,SA_R z,SA_L x,SA_L y,SA_L z,SBA_R x,SBA_R y,SBA_R z,SBA_L x,SBA_L y,SBA_L z,PA_R x,PA_R y,PA_R z,PA_L x,PA_L y,PA_L z,OBS_R x,OBS_R y,OBS_R z,OBS_L x,OBS_L y,OBS_L z,OBI_R x,OBI_R y,OBI_R z,OBI_L x,OBI_L y,OBI_L z,PRA_R x,PRA_R y,PRA_R z,PRA_L x,PRA_L y,PRA_L z +Scan name,EX_R x,EX_R y,EX_R z,EX_L x,EX_L y,EX_L z,EN_R x,EN_R y,EN_R z,EN_L x,EN_L y,EN_L z,PAS_R x,PAS_R y,PAS_R z,PAS_L x,PAS_L y,PAS_L z,PAI_R x,PAI_R y,PAI_R z,PAI_L x,PAI_L y,PAI_L z,G x,G y,G z,SN x,SN y,SN z,AL_R x,AL_R y,AL_R z,AL_L x,AL_L y,AL_L z,N x,N y,N z,PRN x,PRN y,PRN z,LS x,LS y,LS z,STO x,STO y,STO z,LI x,LI y,LI z,CH_R x,CH_R y,CH_R z,CH_L x,CH_L y,CH_L z,CP_R x,CP_R y,CP_R z,CP_L x,CP_L y,CP_L z,SL x,SL y,SL z,GN x,GN y,GN z,GOL_R x,GOL_R y,GOL_R z,GOL_L x,GOL_L y,GOL_L z,ZY_R x,ZY_R y,ZY_R z,ZY_L x,ZY_L y,ZY_L z,PG x,PG y,PG z,T_R x,T_R y,T_R z,T_L x,T_L y,T_L z,SA_R x,SA_R y,SA_R z,SA_L x,SA_L y,SA_L z,SBA_R x,SBA_R y,SBA_R z,SBA_L x,SBA_L y,SBA_L z,PA_R x,PA_R y,PA_R z,PA_L x,PA_L y,PA_L z,OBS_R x,OBS_R y,OBS_R z,OBS_L x,OBS_L y,OBS_L z,OBI_R x,OBI_R y,OBI_R z,OBI_L x,OBI_L y,OBI_L z,PRA_R x,PRA_R y,PRA_R z,PRA_L x,PRA_L y,PRA_L z test_file,-45.3298,37.1466,-40.5415,44.3033,36.255,-42.623,-18.5134,33.2336,-36.7921,16.188,32.6379,-37.2197,-34.3363,41.5306,-33.6564,33.8288,39.5634,-34.2531,-34.4132,31.9017,-35.2642,33.5827,30.789,-36.755,0.12959,51.8853,-14.4235,-0.0356107,-13.0827,-16.9983,-16.6623,-4.05884,-19.1798,15.5038,-4.97323,-21.1836,0.044336,39.4236,-19.1853,-0.0291473,0.258132,-0.140334,-0.0901103,-29.1039,-16.7076,0.055705,-35.7511,-21.7819,0.0285089,-44.8791,-21.1852,-28.1537,-35.8802,-32.2677,24.4702,-34.6564,-34.317,-5.68164,-26.7827,-16.8184,5.63171,-26.3173,-17.4413,0.0403775,-52.2879,-27.0041,0.0981629,-80.2827,-43.5233,-57.0806,-39.8906,-118.469,50.4482,-38.958,-118.26,-63.254,40.8951,-53.951,59.7107,38.7682,-58.1024,0.0468024,-61.4376,-25.9881,-78.3702,26.048,-120.74,70.6534,28.1125,-122.519,-91.2689,55.5377,-137.688,87.5631,56.4117,-137.202,-75.6368,-4.45582,-120.828,70.4776,-1.8171,-120.704,-93.2421,34.1812,-155.155,90.0449,35.8349,-155.402,-82.7099,46.6375,-123.483,76.087,46.7891,-123.211,-72.0651,-5.47207,-119.272,64.1992,-3.95897,-118.937,-83.3521,40.1314,-121.805,75.3747,40.0263,-121.781 \ No newline at end of file