CLAM::UnsizedSegmentation Class Reference

#include <UnsizedSegmentation.hxx>

List of all members.

Classes

class  InsertedOutOfBounds

Public Types

typedef std::vector< double > TimePositions

Public Member Functions

 UnsizedSegmentation ()
 UnsizedSegmentation (double maxPosition)
 UnsizedSegmentation (double maxPosition, const TData *begin, const TData *end)
void takeArray (const TData *begin, const TData *end)
 take data from an array.
 ~UnsizedSegmentation ()
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.
void fillArray (DataArray &segmentation) const
 Performs an implementation to fill the DataArray with the segmentation.
const char * GetClassName () const
 Return the class name.

Detailed Description

Definition at line 8 of file UnsizedSegmentation.hxx.


Member Typedef Documentation

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

Reimplemented from CLAM::Segmentation.

Definition at line 16 of file UnsizedSegmentation.hxx.


Constructor & Destructor Documentation

CLAM::UnsizedSegmentation::UnsizedSegmentation (  )  [inline]

Definition at line 18 of file UnsizedSegmentation.hxx.

CLAM::UnsizedSegmentation::UnsizedSegmentation ( double  maxPosition  )  [inline]

Definition at line 22 of file UnsizedSegmentation.hxx.

CLAM::UnsizedSegmentation::UnsizedSegmentation ( double  maxPosition,
const TData begin,
const TData end 
) [inline]

Definition at line 27 of file UnsizedSegmentation.hxx.

References takeArray().

CLAM::UnsizedSegmentation::~UnsizedSegmentation (  )  [inline]

Definition at line 40 of file UnsizedSegmentation.hxx.


Member Function Documentation

void CLAM::UnsizedSegmentation::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 126 of file UnsizedSegmentation.hxx.

References CLAM::Segmentation::_offsets, CLAM::Segmentation::_onsets, and CLAM::Segmentation::maxPosition().

Referenced by dragOnset().

void CLAM::UnsizedSegmentation::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 116 of file UnsizedSegmentation.hxx.

References dragOffset().

void CLAM::UnsizedSegmentation::fillArray ( DataArray segmentation  )  const [inline, virtual]

Performs an implementation to fill the DataArray with the segmentation.

Implements CLAM::Segmentation.

Definition at line 148 of file UnsizedSegmentation.hxx.

References CLAM::Segmentation::_onsets, CLAM::Array< T >::Resize(), and CLAM::Array< T >::SetSize().

const char* CLAM::UnsizedSegmentation::GetClassName (  )  const [inline, virtual]

Return the class name.

Reimplemented from CLAM::Segmentation.

Definition at line 157 of file UnsizedSegmentation.hxx.

unsigned CLAM::UnsizedSegmentation::insert ( double  timePosition  )  [inline, virtual]
unsigned CLAM::UnsizedSegmentation::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 85 of file UnsizedSegmentation.hxx.

References CLAM::Segmentation::_offsets.

unsigned CLAM::UnsizedSegmentation::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 95 of file UnsizedSegmentation.hxx.

References CLAM::Segmentation::_onsets.

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

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

Implements CLAM::Segmentation.

Definition at line 102 of file UnsizedSegmentation.hxx.

References CLAM::Segmentation::_offsets.

void CLAM::UnsizedSegmentation::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 72 of file UnsizedSegmentation.hxx.

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

void CLAM::UnsizedSegmentation::takeArray ( const TData begin,
const TData end 
) [inline, virtual]

take data from an array.

Implements CLAM::Segmentation.

Definition at line 35 of file UnsizedSegmentation.hxx.

References insert().

Referenced by UnsizedSegmentation().


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.3