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