CLineSegmentsUnit
The CLineSegmentsUnit class represents a collection of line segments in 2D space. It is a derived class of CIntermediateResultUnit.
Definition
Namespace: dynamsoft::intermediate_results
Assembly: DynamsoftCore
Inheritance: CIntermediateResultUnit -> CLineSegmentsUnit
class CLineSegmentsUnit : public CIntermediateResultUnit
Methods
| Method | Description |
|---|---|
GetCount |
Gets the number of line segments in the collection. |
GetLineSegment |
Gets the specified line segment from the collection. |
operator[] |
Gets the line segment at the specified index. |
RemoveAllLineSegments |
Removes all line segments from the unit. |
RemoveLineSegment |
Removes the line segment at the specified index. |
AddLineSegment |
Adds a line segment to the unit. |
SetLineSegment |
Sets the line segment at the specified index. |
| Methods Inherited from CIntermediateResultUnit: | |
GetHashId |
Gets the hash ID of the unit. |
GetOriginalImageHashId |
Gets the hash ID of the original image. |
GetOriginalImageTag |
Gets the tag of the original image. |
GetType |
Gets the type of the intermediate result unit. |
Clone |
Creates a copy of the intermediate result unit. |
SetHashId |
Sets the hash ID of the unit. |
SetOriginalImageHashId |
Sets the hash ID of the original image. |
SetOriginalImageTag |
Sets the tag of the original image. |
Retain |
Increases the reference count of the unit. |
Release |
Decreases the reference count of the unit. |
GetTransformMatrix |
Gets the transformation matrix via CTransformMatrixType. |
SetTransformMatrix |
Sets the transformation matrix via CTransformMatrixType. |
GetCount
Gets the number of line segments in the collection.
virtual int GetCount() const
Return value
Returns the number of line segments in the collection.
GetLineSegment
Gets the specified line segment from the collection.
virtual const CLineSegment* GetLineSegement(int index) const
Parameters
[in] index The index of the line segment to retrieve.
Return value
Returns the CLineSegment object at the specified index or NULL if the index is out of range.
See Also
operator[]
Gets the line segment at the specified index.
virtual const CLineSegment* operator[](int index) const = 0;
Parameters
index The index of the line segment to get.
Return Value
A pointer to the CLineSegment object that represents the line segment at the specified index.
RemoveAllLineSegments
Removes all line segments from the unit.
virtual void RemoveAllLineSegments() = 0;
RemoveLineSegment
Removes the line segment at the specified index.
virtual int RemoveLineSegment(int index) = 0;
Parameters
index The index of the line segment to remove.
Return Value
Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.
AddLineSegment
Adds a line segment to the unit.
virtual int AddLineSegment(const CLineSegment& line, const double matrixToOriginalImage[9] = IDENTITY_MATRIX) = 0;
Parameters
line The line segment to add.
matrixToOriginalImage The matrix to original image.
Return Value
Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.
SetLineSegment
Sets the line segment at the specified index.
virtual int SetLineSegment(int index, const CLineSegment& line, const double matrixToOriginalImage[9] = IDENTITY_MATRIX) = 0;
Parameters
index The index of the line segment to set.
line The line segment to set.
matrixToOriginalImage The matrix to original image.
Return Value
Returns 0 if the operation succeeds, or a nonzero error code if the operation fails.