Class RegistrationAction
java.lang.Object
javax.swing.AbstractAction
cz.fidentis.analyst.gui.task.ControlPanelAction<RegistrationPanel>
cz.fidentis.analyst.gui.task.registration.RegistrationAction
- All Implemented Interfaces:
HumanFaceListener
,ActionListener
,Serializable
,Cloneable
,EventListener
,Action
public class RegistrationAction
extends ControlPanelAction<RegistrationPanel>
implements HumanFaceListener
Action listener for the ICP and Procrustes registration.
Besides the UX logic, this object stores the parameters and results of manual, ICP, or Procrustes registration (alignment of human faces)
This object also serves as HumanFaceListener
. It means that it is
invoked whenever one of the faces are changed and then can react to these
changes.
Changes made by these objects are announced to other listeners. Following events are triggered:
MeshChangedEvent
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.AbstractAction
enabled, changeSupport
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
ConstructorsConstructorDescriptionRegistrationAction
(Canvas canvas, FacesProxy faces, JTabbedPane topControlPane) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptEvent
(HumanFaceEvent event) Subscription method, which is invoked when an event appears.void
protected void
applyICP()
protected void
Calculates Procrustes analysis and transforms secondary face.protected boolean
getOrDetectLandmarks
(List<Landmark> fpList, int faceSlot) Returns either existing or auto-detected feature points.Methods inherited from class cz.fidentis.analyst.gui.task.ControlPanelAction
getCanvas, getControlPanel, getFaces, getPrimaryDrawableFace, getPrimaryFace, getPrimaryFeaturePoints, getPrimaryInteractiveMask, getScene, getSecondaryDrawableFace, getSecondaryFace, getSecondaryFeaturePoints, getSecondaryInteractiveMask, hideShowPanelActionPerformed, popup, renderScene, setControlPanel, setShowHideCode
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
MINIMAL_SIGNIFICANT_POINTS
public static final int MINIMAL_SIGNIFICANT_POINTS- See Also:
-
-
Constructor Details
-
RegistrationAction
Constructor. A newRegistrationPanel
is instantiated and added to thetopControlPane
- Parameters:
canvas
- OpenGL canvasfaces
- Faces processed by current analytical tasktopControlPane
- A top component when a new control panel is placed
-
-
Method Details
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
- Specified by:
actionPerformed
in classControlPanelAction<RegistrationPanel>
-
acceptEvent
Description copied from interface:HumanFaceListener
Subscription method, which is invoked when an event appears.- Specified by:
acceptEvent
in interfaceHumanFaceListener
- Parameters:
event
- A fired event.
-
applyProcrustes
protected void applyProcrustes()Calculates Procrustes analysis and transforms secondary face. -
applyICP
protected void applyICP() -
getOrDetectLandmarks
Returns either existing or auto-detected feature points.- Parameters:
fpList
- output listfaceSlot
- face slot- Returns:
true
if pre-defined landmarks are used (put into the output list)
-