ncut::Sequence< ELEMENT_TYPE > Class Template Reference

#include <ncutImage.h>

List of all members.

Public Member Functions

virtual Image< ELEMENT_TYPE > * operator[] (unsigned long)
virtual const Image< ELEMENT_TYPE > * operator[] (unsigned long) const
unsigned int width () const
 Get the with of the images.
unsigned int height () const
 Get the height of the images.
unsigned int nChl () const
 Get the number of channels of the images.
unsigned int length () const
 Get the length of the sequence.
virtual int pushThrough (const Image< ELEMENT_TYPE > &frame)
 Push a frame onto the sequence and pop the first frame.
virtual int pushFrame (const Image< ELEMENT_TYPE > &frame)
 Push a frame to the back of the sequence.
virtual void popFrame ()
 Pop the last frame of the sequence.
virtual int clear ()
 Remove all frames from the sequence.
 Sequence ()
 Sequence empty constructor
 Sequence (const Sequence &clone)
 Sequence copy constructor.
virtual ~Sequence ()
 Sequence destructor.
virtual Sequenceoperator= (const Sequence &clone)
 Sequence assignment operator.

Protected Member Functions

bool validateFrame (const Image< ELEMENT_TYPE > &frame)
 Checks if a frame can be added to this sequence.

Protected Attributes

std::deque< Image< ELEMENT_TYPE > * > frames_
unsigned int width_
unsigned int height_
unsigned int nChl_


Detailed Description

template<class ELEMENT_TYPE = unsigned char>
class ncut::Sequence< ELEMENT_TYPE >

Sequence is the base class for PNGSequence and BSISequence. It stores pointers to a sequence images. Sequence is a small wrapper around a STL deque containing pointers to all Sequence s in the sequence, providing additional information, such as width, height and length, and special sequence manipulation functions.


Constructor & Destructor Documentation

template<class ELEMENT_TYPE>
ncut::Sequence< ELEMENT_TYPE >::Sequence  ) 
 

Sequence empty constructor

Creates an empty Sequence with=height=channels=0.

template<class ELEMENT_TYPE>
ncut::Sequence< ELEMENT_TYPE >::Sequence const Sequence< ELEMENT_TYPE > &  clone  ) 
 

Sequence copy constructor.

Parameters:
clone The Sequence to be cloned.


Member Function Documentation

template<class ELEMENT_TYPE>
int ncut::Sequence< ELEMENT_TYPE >::clear  )  [virtual]
 

Remove all frames from the sequence.

Returns:
0 if successful.
Deletes all frames in the sequence and sets width, height and number of channels to zero. The length of the sequence is zero.

Reimplemented in ncut::BSISequence.

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Sequence< ELEMENT_TYPE >::height  )  const [inline]
 

Get the height of the images.

Returns:
The height of the images

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Sequence< ELEMENT_TYPE >::length  )  const [inline]
 

Get the length of the sequence.

Returns:
The length of the sequence

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Sequence< ELEMENT_TYPE >::nChl  )  const [inline]
 

Get the number of channels of the images.

Returns:
The number of channles of the images

template<class ELEMENT_TYPE>
Sequence< ELEMENT_TYPE > & ncut::Sequence< ELEMENT_TYPE >::operator= const Sequence< ELEMENT_TYPE > &  clone  )  [virtual]
 

Sequence assignment operator.

Parameters:
clone The Sequence to be cloned.
Returns:
This object.

template<class ELEMENT_TYPE>
void ncut::Sequence< ELEMENT_TYPE >::popFrame  )  [virtual]
 

Pop the last frame of the sequence.

Deletes the last frame and removes it from the sequence. This does nothing if the sequence is empty.

Reimplemented in ncut::PNGSequence, and ncut::BSISequence.

template<class ELEMENT_TYPE>
int ncut::Sequence< ELEMENT_TYPE >::pushFrame const Image< ELEMENT_TYPE > &  frame  )  [virtual]
 

Push a frame to the back of the sequence.

Parameters:
frame The Image to be pushed onto the sequence.
Returns:
0 if successful.
Pushes a copy of Image to the back of the sequence. The length of the sequence is increased by one. Only images of the same dimension as all other images in the sequence are accepted.

Reimplemented in ncut::PNGSequence, and ncut::BSISequence.

template<class ELEMENT_TYPE>
int ncut::Sequence< ELEMENT_TYPE >::pushThrough const Image< ELEMENT_TYPE > &  frame  )  [virtual]
 

Push a frame onto the sequence and pop the first frame.

Parameters:
frame The Image to be pushed onto the sequence.
Returns:
0 if successful.
Pushes a copy of Image onto the sequence and removes the first frame of the sequence. The length of the sequence remains unchanged. Only images of the same dimension as all other images in the sequence are accepted.

Reimplemented in ncut::PNGSequence, and ncut::BSISequence.

template<class ELEMENT_TYPE>
bool ncut::Sequence< ELEMENT_TYPE >::validateFrame const Image< ELEMENT_TYPE > &  frame  )  [protected]
 

Checks if a frame can be added to this sequence.

Parameters:
frame The frame to be checked.
Returns:
true if the frame has the right dimension, false otherwise.
Every frame in a sequence has to be of the same dimension. This function checks if width, height and number of channels match.

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Sequence< ELEMENT_TYPE >::width  )  const [inline]
 

Get the with of the images.

Returns:
The width of the images


Member Data Documentation

template<class ELEMENT_TYPE = unsigned char>
std::deque<Image<ELEMENT_TYPE>* > ncut::Sequence< ELEMENT_TYPE >::frames_ [protected]
 

Contains pointers to all images in this sequence. All images are owned by Sequence

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Sequence< ELEMENT_TYPE >::height_ [protected]
 

The height of all images in this sequence.

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Sequence< ELEMENT_TYPE >::nChl_ [protected]
 

The number of channels of all images in this sequence.

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Sequence< ELEMENT_TYPE >::width_ [protected]
 

The width of all images in this sequence.


The documentation for this class was generated from the following file:
Generated on Thu Jun 22 14:47:22 2006 for ncut.kdevelop by  doxygen 1.4.6