#include <ImFusion/US/MotionTrajectoryModel.h>
Model representing simple motion defined either by a shift and rotation or a rigid pose between the first and last frames.
More...
Model representing simple motion defined either by a shift and rotation or a rigid pose between the first and last frames.
The model supports two modes (SimpleMotionModel::SimpleMotionType):
- In ShiftAndRotation mode, the motion is described by a scalar translation along the Z axis and an in-plane rotation angle.
- In RigidPose mode, the motion is described by a translation vector and Euler angles.
|
|
SimpleMotionType | m_type |
| |
|
bool | m_distributeSymmetrically |
| | If true, will distribute symmetrically around the central frame.
|
| |
|
const int | m_size |
| | Size of the model, regularly the number of frames.
|
| |
|
std::vector< double > | m_pars |
| | Full motion parameter vector - not necessarily the exposed ones.
|
| |
|
mat4 | m_relShift |
| | Generic helper matrix to incorporate optional shifts. Considered by rigidMotion().
|
| |
|
std::vector< Param > | m_params |
| | List of all registered Parameter and SubProperty instances.
|
| |
|
|
SimpleMotionType | motionType () const |
| |
|
void | setDistributeSymmetrically (bool b) |
| |
|
bool | distributeSymmetrically () const |
| |
◆ SimpleMotionModel()
- Parameters
-
| size | The number of frames in the motion sequence. |
◆ name()
◆ configure()
◆ configuration()
Saves the current model settings into the provided Properties object, including the "distributeSymmetrically" property if set.
Reimplemented from MotionTrajectoryModel.
◆ setParameters()
| void setParameters |
( |
const std::vector< double > & | pars | ) |
|
|
overridevirtual |
Sets the motion parameters in Euler representation.
Implicitly changes the motion type.
- If
pars.size() == 2, the motion type is set to ShiftAndRotation.
- If
pars.size() >= 6, the motion type isset to RigidPose.
Any previously set parameters are discarded. Parameters are interpreted as:
- ShiftAndRotation: [z-translation, in-plane rotation angle]
- RigidPose: [tx, ty, tz, rx, ry, rz] in Euler angles
- Warning
- Logs a warning and ignores
pars if the number of parameters is not 2 and less than 6.
Reimplemented from MotionTrajectoryModel.
◆ defineMotion()
Computes a set of m_size matrices describing the intended motion trajectory.
Implements MotionTrajectoryModel.
◆ fitMatrices()
Sets the parameters based on the given motion sequence.
Defines the parameters as an Euler-angle representation of a rigid motion between first and the last frames of the input motion.
- Parameters
-
| mat | sequence of transformation matrices representing the motion. |
- Returns
- a new registration matrix corresponding to the fitted motion.
- Note
- The mode will be set to
RigidPose even if the motion only consists of a Z-axis translation and rotation around the Z-axis.
Implements MotionTrajectoryModel.
◆ setMotionType()
- Note
- When switching from RigidPose to the ShiftAndRotation, the parameters will be truncated: the translation along the Z-axis becomes the shift, and the rotation along the Z-axis becomes the rotation.
The documentation for this class was generated from the following file:
- ImFusion/US/MotionTrajectoryModel.h