class of a 2D active contour also called "snakes"
typedef mtl::matrix | SparseMatrix the type of sparse matrix used to store the rigidity matrix |
ActiveLine2DIterator | firstLine (void) const returns a line Iterator of type ActiveLine2DIterator on AContourLine2D |
ActiveLine2DIterator | lastLine (void) const returns a line Iterator of type ActiveLine2DIterator on AContourLine2D |
ActiveVertexContour2DIterator | firstVertex () const returns a VertexIterator of type ActiveVertexContour2D belonging to the contour |
void | computeEdgeDirection () The internal force init function |
void | computeSimplexAngle () throw(ContourLine2D::IllegalGeometry) The internal force init function |
void | computeCurvature () throw(ContourLine2D::IllegalGeometry) compute the curvature for all vertices |
void | setSpringRestLengths () sets the current edge length as the rest length |
void | setMetricParameters () sets the current metric parameters as the reference metric parameters |
void | resetMetricParameters () sets the reference metric parameters to 0.5 |
void | topologyHasChanged () called when a vertex has been removed or added or when a vertex mobility (fixed member) has been modified |
void | initInternalForce () create internal force types |
void | computeMaximumRigidity () computes the maximum rigidity |
ActiveContour2D::TimeDiscretizationScheme | getTimeScheme (void) const return the time integration scheme |
void | setTimeScheme (const ActiveContour2D::TimeDiscretizationScheme ts) set the time integration scheme |
void | computeInternalForce () compute the internal force for all contour vertices by calling internalForce->computeInternalForce(this) |
void | setInternalForce (InternalForceContour2D *ft) set a given internal force as the internal force applying on all contour vertices : call the unsetInternalForce() of the previous internal force and call ft->setInternalForce() |
void | setInternalForce (char *forceName) find the internal force corresponding to its name |
virtual void | computeExternalForce () compute the external force on all contour vertices |
void | updatePosition () update the position of all contour vertices by calling the corresponding function v->updatePosition |
void | iterate (const unsigned int n) the routine called when the scene activates all active items : it computes the internal, external force, force constraint and update the position of all vertices |
SparseMatrix* | getRigidityMatrix () const returns the contour rigidity matrix |
mtl::dense1D | getForceVector () const returns the contour rigidity matrix |
bool | hasTopologyChanged () const indicates if the contour has changed in the previous iteration such that rigidity matrices must be updated |
double | getMinimumEdgeLength () const returns the mean edge distance in the contour |
double | getMedianEdgeLength () const returns the median edge length in the contour |
double | getMeanEdgeLength () const returns the mean edge distance in the contour |
double | getMeanEdgeSquareLength () const returns the mean edge square distance of the contour |
InternalForceContour2D* | getInternalForce () const returns the internal force type applying on the whole contour |
virtual bool | continueDeformation () whether this deformable model should still be deformed |
virtual ContourLine* | createLine (ContourLine::Topology top) create a new line : use a virtual function in order to create inherited lines |
AContourLine2D* | getFirstLine (void) const returns the first Line of type L * |
void | applyLine (void (AContourLine2D::*fn)(void)) Apply a function on all lines of a contour |
void | applyLine (void (AContourLine2D::*fn) (void) const) Apply a function on all lines of a contour |
void | applyVertex (void (ActiveVertexContour2D::*fn)(void)) Apply a function on all vertices of a contour @psaram fn a function of prototype void (ActiveVertexContour2D::*fn)(void) that is a member function of type T that must be derived class of VertexContour |
void | applyVertex (void (ActiveVertexContour2D::*fn)(const double), const double v) Apply a function on all vertices of a contour |
void | applyVertexUInt (void (ActiveVertexContour2D::*fn)(const unsigned int), const unsigned int v) Apply a function on all vertices of a contour |
void | readMainModule (GFInput &input) throw(InvalidContour) the function that read the contour topology and geometry |
void | skipMainModule (GFInput &input) the function that skip the contour topology and geometry |
void | writeMainModule (GFOutput &output) the function that write the contour topology and geometry |
void | readInternalForceModule (GFInput &input) the function that reads the internal force set on all contour vertices |
void | skipInternalForceModule (GFInput &input) the function that skips the internal force set on all contour vertices |
void | writeInternalForceModule (GFOutput &output) the function that writes the internal force set on all contour vertices |
void | readPositionConstraintModule (GFInput &input) the function that reads the position constraint existing on the contour |
void | skipPositionConstraintModule (GFInput &input) the function that skips the position constraint existing on the contour |
void | writePositionConstraintModule (GFOutput &output) the function that writes the position constraint existing on the contour |
void | readForceConstraintModule (GFInput &input) the function that reads the force constraint existing on the contour |
void | skipForceConstraintModule (GFInput &input) the function that skips the force constraint existing on the contour |
void | writeForceConstraintModule (GFOutput &output) the function that writes the force constraint existing on the contour |
void | readAlphaModule (GFInput &input) the function that reads the internal force weight for each contour vertex |
void | skipDoubleVertexModule (GFInput &input) the function that skips the internal force weight for each contour vertex |
void | writeAlphaModule (GFOutput &output) the function that writes the internal force weight for each contour vertex |
void | readBetaModule (GFInput &input) the function that reads the external force weight for each contour vertex |
void | writeBetaModule (GFOutput &output) the function that writes the external force weight for each contour vertex |
void | readRigidityModule (GFInput &input) the function that reads the rigidity parameter for each contour vertex |
void | skipIntVertexModule (GFInput &input) the function that skip an integer value written for each contour vertex |
void | writeRigidityModule (GFOutput &output) the function that writes the rigidity parameter for each contour vertex |
void | readShapePositionModule (GFInput &input) the function that reads the shape position for each contour vertex |
void | skipVectorVertexModule (GFInput &input) the function that skip a 2D vector written for each contour vertex |
void | writeShapePositionModule (GFOutput &output) the function that write the shape position for each contour vertex |
void | readRangeInformation (GFInput &input) the function that reads the range Information stored at some vertices |
void | skipRangeInformation (GFInput &input) the function that skips the range Information stored at some vertices |
void | writeRangeInformation (GFOutput &output) the function that writes a 2D vector written for each contour vertex |
void | readMobilityModule (GFInput &input) the function that reads the mobility (if the vertex is fixed or not) for each contour vertex |
void | writeMobilityModule (GFOutput &output) the function that writes the mobility (if the vertex is fixed or not) for each contour vertex |
void | addContour (const ActiveContour2D *contour) add in the current contour a copy of another contour |
RangeInformation* | getRangeInformation () const get the range information applied on all vertices |
void | setRangeInformation ( RangeInformation * ri) set the range information applied on all vertices |
virtual void | mergeEdges (EdgeActiveContour2D *e1, EdgeActiveContour2D *e2) Merge two edges belonging |
TclObject* | getTclInterface () const returns the interface associated with the contour |
virtual void | translate (const Vec2 translate the contour |
virtual void | scale (const double scale) scale the active contour |
virtual void | rotate (const Rotation2D &rotation) rotate the active contour |
virtual void | redraw (Camera2D *cam) the redraw function |
ActiveVertexContour2D* | getSelectedActiveVertex () const gives the selected vertex as an ActiveVertexContour2D |
void | getSelectedEdgeColor (float &r, float &g, float &b) const Returns the display color of the selected edge |
float | getSelectedEdgeWidth () const Returns the width of the selected edge |
EdgeActiveContour2D* | getSelectedEdge () const Returns the selected edge |
EdgeActiveContour2D* | getPreviousSelectedEdge () const Returns the previous selected edge |
void | setSelectedEdgeColor (const float r, const float g, const float b) Sets the display color of selected edge |
void | setSelectedEdgeWidth (const float w) Sets the width of the selected Edge |
void | setSelectedEdge (EdgeActiveContour2D *e) sets the selected edge of a contour |
void | setShowClosestPoint (const bool b) sets the boolean indicating if the closest points should be displayed |
void | setShowRangeDistance (const bool b) sets the boolean indicating if the range distance should be displayed |
bool | getShowRangeDistance () const returns the boolean indicating if the range distance should be displayed |
bool | getShowClosestPoint () const returns the boolean indicating if the closest points should be displayed |
ActiveVertexContour2D* | getSelectedActiveVertex2D () const returns the selected active vertex |
AContourLine2D* | getSelectedActiveLine2D () const returns the selected active line |
void | selectEdge (const Vec2 select the closest edge from a given pixel position |
void | grabVertex (const Vec2 applies an external force that attract the closest contour vertex towards a pixel position |
virtual void | selectObject (const Vec2 a function that allows to perform a task on a data object from a mouse click |
Constructors
|
bool | topologyChanged tells if the contour topology has been modified in the previous iteration |
RangeInformation* | rangeInformation the range information used for all vertices |
SparseMatrix* | rigidityMatrix rigidity matrix used by implicit scheme resolution |
mtl::dense1D | forceVector vector used to store all external forces applied on vertices |
mtl::dense1D | resultVector vector used to store the solution of the linear equation used by implicit scheme resolution |
EdgeActiveContour2D* | selectedEdge the selected Edge |
EdgeActiveContour2D* | previousSelectedEdge the selected Edge |
float | selectedEdgeColor [3] the color of the selected edge |
static const float | defaultSelectedEdgeColor [3] the default color of the selected edge |
float | selectedEdgeWidth the width of the selected edge |
static const float | defaultSelectedEdgeWidth the default width of the selected edge |
static const bool | defaultShowClosestPoint the default value of showClosestPoint |
bool | showClosestPoint Should the closest point be displayed? |
static const bool | defaultShowRangeDistance the default value of showRangeDistance |
bool | showRangeDistance Should the range distance be displayed |
TimeDiscretizationScheme | timeScheme the time discretization scheme may be implicit or explicit |
InternalForceContour2D* | internalForce the internal force that applies on most contour vertices |
void | initGeometry () routine that computes basic geometric information such as the contour center or radius |
Destructor
constructor
destructor
class of a 2D active contour also called "snakes"
scene - : the Scene2D where the contour should be placed (since it is a Data2D and DeformableModel2D)
nbVertices - the number of the vertices of each line. It is an array of size nbLines
array - the array of 2D vertices that are in each line. The first index of the array "lineIndex" is the index of the line (lineIndex
scene - : the Scene2D where the contour should be placed (since it is a Data2D and DeformableModel2D)
v - a value to be passed to the member function
v - a value to be passed to the member function