CLAM::DiscontinuousSegmentation Class Reference

#include <DiscontinuousSegmentation.hxx>

Inheritance diagram for CLAM::DiscontinuousSegmentation:

CLAM::Segmentation List of all members.

Detailed Description

Definition at line 8 of file DiscontinuousSegmentation.hxx.

Public Types

typedef std::vector< double > TimePositions

Public Member Functions

 DiscontinuousSegmentation (double maxLength)
template<typename Iterator>
 DiscontinuousSegmentation (double maxLength, Iterator begin, Iterator end)
 It will create a discontinuous segmentation where the onsets and offsets are specified on the ordered list of bounds [begin,end).
unsigned insert (double timePosition)
 Inserts a new border at timePosition.
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.

Classes

class  InsertedOutOfBounds
class  MissplacedOffset
class  MissplacedOnset
class  OffsetMissing


Member Typedef Documentation

typedef std::vector<double> CLAM::DiscontinuousSegmentation::TimePositions

Reimplemented from CLAM::Segmentation.

Definition at line 55 of file DiscontinuousSegmentation.hxx.


Constructor & Destructor Documentation

CLAM::DiscontinuousSegmentation::DiscontinuousSegmentation ( double  maxLength  )  [inline]

Definition at line 57 of file DiscontinuousSegmentation.hxx.

template<typename Iterator>
CLAM::DiscontinuousSegmentation::DiscontinuousSegmentation ( double  maxLength,
Iterator  begin,
Iterator  end 
) [inline]

It will create a discontinuous segmentation where the onsets and offsets are specified on the ordered list of bounds [begin,end).

Precondition:
The onsets is a sorted container of bounds in between 0 and maxLength

Definition at line 67 of file DiscontinuousSegmentation.hxx.

References CLAM::Segmentation::_offsets, CLAM::Segmentation::_onsets, and CLAM::Segmentation::_selection.


Member Function Documentation

unsigned CLAM::DiscontinuousSegmentation::insert ( double  timePosition  )  [inline, virtual]

Inserts a new border at timePosition.

Implements CLAM::Segmentation.

Definition at line 89 of file DiscontinuousSegmentation.hxx.

References CLAM::Segmentation::_current, CLAM::Segmentation::_maxLength, CLAM::Segmentation::_offsets, CLAM::Segmentation::_onsets, and CLAM::Segmentation::_selection.

void CLAM::DiscontinuousSegmentation::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 128 of file DiscontinuousSegmentation.hxx.

References CLAM::Segmentation::_current, CLAM::Segmentation::_offsets, CLAM::Segmentation::_onsets, and CLAM::Segmentation::_selection.

unsigned CLAM::DiscontinuousSegmentation::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 141 of file DiscontinuousSegmentation.hxx.

References CLAM::Segmentation::_offsets.

unsigned CLAM::DiscontinuousSegmentation::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 151 of file DiscontinuousSegmentation.hxx.

References CLAM::Segmentation::_onsets.

unsigned CLAM::DiscontinuousSegmentation::pickSegmentBody ( double  timePosition  )  const [inline, virtual]

Returns the index of the segment which body is on timePosition.

Implements CLAM::Segmentation.

Definition at line 158 of file DiscontinuousSegmentation.hxx.

References CLAM::Segmentation::_offsets, and CLAM::Segmentation::_onsets.

void CLAM::DiscontinuousSegmentation::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 173 of file DiscontinuousSegmentation.hxx.

References CLAM::Segmentation::_offsets, and CLAM::Segmentation::_onsets.

void CLAM::DiscontinuousSegmentation::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 195 of file DiscontinuousSegmentation.hxx.

References CLAM::Segmentation::_maxLength, CLAM::Segmentation::_offsets, and CLAM::Segmentation::_onsets.


The documentation for this class was generated from the following file:
Generated on Tue Jun 19 20:35:02 2007 for CLAM-Development by  doxygen 1.5.2