#include <ContiguousSegmentation.hxx>
Classes | |
class | InsertedOutOfBounds |
Public Types | |
typedef std::vector< double > | TimePositions |
Public Member Functions | |
ContiguousSegmentation (double maxPosition=0) | |
ContiguousSegmentation (double maxPosition, const TData *begin, const TData *end) | |
~ContiguousSegmentation () | |
void | takeArray (const TData *begin, const TData *end) |
take data from an array. | |
unsigned | insert (double timePosition) |
Inserts a new border at timePosition. | |
void | maxPosition (double maxPosition) |
move the last offset to maxPosition | |
void | remove (unsigned segment) |
Removes the specified segment. | |
unsigned | pickOffset (double timePosition, double tolerance) const |
Returns the index of the segment whose offset is nearest to the given time position, and within the tolerance. | |
unsigned | pickOnset (double timePosition, double tolerance) const |
Returns the index of the segment whose onset is nearest to the given time position, and within the tolerance. | |
unsigned | pickSegmentBody (double timePosition) const |
Returns the index of the segment which body is on timePosition. | |
void | dragOnset (unsigned segment, double newTimePosition) |
Performs a dragging movement for the Onset of the given segment in order to move it to the newTimePosition. | |
void | dragOffset (unsigned segment, double newTimePosition) |
Performs a dragging movement for the Offset of the given segment in order to move it to the newTimePosition. | |
void | fillArray (DataArray &segmentation) const |
Performs an implementation to fill the DataArray with the segmentation. | |
const char * | GetClassName () const |
Return the class name. |
Definition at line 6 of file ContiguousSegmentation.hxx.
typedef std::vector<double> CLAM::ContiguousSegmentation::TimePositions |
Reimplemented from CLAM::Segmentation.
Definition at line 12 of file ContiguousSegmentation.hxx.
CLAM::ContiguousSegmentation::ContiguousSegmentation | ( | double | maxPosition = 0 |
) | [inline] |
Definition at line 14 of file ContiguousSegmentation.hxx.
CLAM::ContiguousSegmentation::ContiguousSegmentation | ( | double | maxPosition, | |
const TData * | begin, | |||
const TData * | end | |||
) | [inline] |
Definition at line 23 of file ContiguousSegmentation.hxx.
CLAM::ContiguousSegmentation::~ContiguousSegmentation | ( | ) | [inline] |
Definition at line 31 of file ContiguousSegmentation.hxx.
void CLAM::ContiguousSegmentation::dragOffset | ( | unsigned | segment, | |
double | newTimePosition | |||
) | [inline, virtual] |
Performs a dragging movement for the Offset of the given segment in order to move it to the newTimePosition.
Constraints for the segmentation mode are applied.
Implements CLAM::Segmentation.
Definition at line 134 of file ContiguousSegmentation.hxx.
void CLAM::ContiguousSegmentation::dragOnset | ( | unsigned | segment, | |
double | newTimePosition | |||
) | [inline, virtual] |
Performs a dragging movement for the Onset of the given segment in order to move it to the newTimePosition.
Constraints for the segmentation mode are applied.
Implements CLAM::Segmentation.
Definition at line 122 of file ContiguousSegmentation.hxx.
void CLAM::ContiguousSegmentation::fillArray | ( | DataArray & | segmentation | ) | const [inline, virtual] |
Performs an implementation to fill the DataArray with the segmentation.
Implements CLAM::Segmentation.
Definition at line 153 of file ContiguousSegmentation.hxx.
const char* CLAM::ContiguousSegmentation::GetClassName | ( | ) | const [inline, virtual] |
Return the class name.
Reimplemented from CLAM::Segmentation.
Definition at line 161 of file ContiguousSegmentation.hxx.
unsigned CLAM::ContiguousSegmentation::insert | ( | double | timePosition | ) | [inline, virtual] |
Inserts a new border at timePosition.
Implements CLAM::Segmentation.
Definition at line 47 of file ContiguousSegmentation.hxx.
References CLAM::Segmentation::_current, CLAM::Segmentation::_offsets, CLAM::Segmentation::_onsets, and CLAM::Segmentation::_selection.
Referenced by takeArray().
void CLAM::ContiguousSegmentation::maxPosition | ( | double | maxPosition | ) | [inline, virtual] |
move the last offset to maxPosition
Reimplemented from CLAM::Segmentation.
Definition at line 65 of file ContiguousSegmentation.hxx.
unsigned CLAM::ContiguousSegmentation::pickOffset | ( | double | timePosition, | |
double | tolerance | |||
) | const [inline, virtual] |
Returns the index of the segment whose offset is nearest to the given time position, and within the tolerance.
If no end of segment within the tolerance range an invalid segment is returned (nSegments)
Implements CLAM::Segmentation.
Definition at line 93 of file ContiguousSegmentation.hxx.
unsigned CLAM::ContiguousSegmentation::pickOnset | ( | double | timePosition, | |
double | tolerance | |||
) | const [inline, virtual] |
Returns the index of the segment whose onset is nearest to the given time position, and within the tolerance.
If no end of segment within the tolerance range an invalid segment is returned (nSegments)
Implements CLAM::Segmentation.
Definition at line 103 of file ContiguousSegmentation.hxx.
unsigned CLAM::ContiguousSegmentation::pickSegmentBody | ( | double | timePosition | ) | const [inline, virtual] |
Returns the index of the segment which body is on timePosition.
Implements CLAM::Segmentation.
Definition at line 110 of file ContiguousSegmentation.hxx.
void CLAM::ContiguousSegmentation::remove | ( | unsigned | segment | ) | [inline, virtual] |
Removes the specified segment.
The previous segment is expanded to cover the region. When removing the first segment, the next segment is the one expanded to start at 0. When just a single element, no efect at all.
Implements CLAM::Segmentation.
Definition at line 77 of file ContiguousSegmentation.hxx.
void CLAM::ContiguousSegmentation::takeArray | ( | const TData * | begin, | |
const TData * | end | |||
) | [inline, virtual] |
take data from an array.
Implements CLAM::Segmentation.
Definition at line 38 of file ContiguousSegmentation.hxx.
References insert().