BTK  0.3dev.0
Open-source library to visualize/process biomechanical data
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
btk::DownsampleFilter< T > Class Template Reference

Downsample data stored in the given input. More...

#include <btkDownsampleFilter.h>

Inheritance diagram for btk::DownsampleFilter< T >:
Inheritance graph
[legend]

Public Types

typedef btkSharedPtr< const
DownsampleFilter
ConstPointer
 
typedef T::ConstPointer ItemConstPointer
 
typedef T::Pointer ItemPointer
 
typedef btkSharedPtr
< DownsampleFilter
Pointer
 
- Public Types inherited from btk::ProcessObject
typedef btkSharedPtr< const
ProcessObject
ConstPointer
 
typedef btkSharedPtr
< ProcessObject
Pointer
 
- Public Types inherited from btk::Object
typedef btkSharedPtr< const
Object
ConstPointer
 
typedef btkSharedPtr< ObjectPointer
 

Public Member Functions

ItemPointer GetInput ()
 
ItemPointer GetOutput ()
 
int GetUpDownRatio () const
 
void SetInput (ItemPointer input)
 
void SetUpDownRatio (int ratio)
 
virtual ~DownsampleFilter ()
 
- Public Member Functions inherited from btk::ProcessObject
int GetInputNumber () const
 
int GetOutputNumber () const
 
int GetValidInputNumber () const
 
void ResetState ()
 
void Update ()
 
- Public Member Functions inherited from btk::Object
unsigned long int GetTimestamp () const
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 DownsampleFilter ()
 
virtual void GenerateData ()
 
ItemPointer GetInput (int idx)
 
ItemPointer GetOutput (int idx)
 
virtual DataObject::Pointer MakeOutput (int idx)
 
- Protected Member Functions inherited from btk::ProcessObject
int GetInputIndex (DataObject::Pointer input)
 
DataObject::Pointer GetNthInput (int idx)
 
DataObject::ConstPointer GetNthInput (int idx) const
 
DataObject::Pointer GetNthOutput (int idx)
 
DataObject::ConstPointer GetNthOutput (int idx) const
 
int GetOutputIndex (DataObject::Pointer output)
 
bool IsModified () const
 
void Modified ()
 
 ProcessObject ()
 
void SetInputNumber (int num)
 
virtual void SetNthInput (int idx, DataObject::Pointer input)
 
virtual void SetNthOutput (int idx, DataObject::Pointer output)
 
void SetOutputNumber (int num)
 
virtual ~ProcessObject ()
 
- Protected Member Functions inherited from btk::Object
 Object ()
 
 Object (const Object &toCopy)
 
virtual ~Object ()
 

Additional Inherited Members

- Protected Attributes inherited from btk::Object
unsigned long int m_Timestamp
 

Detailed Description

template<class T>
class btk::DownsampleFilter< T >

Downsample data stored in the given input.

Template Parameters
TMust be a class inheriting of btk::DataObject

To downsample data, you need to set the up/down sample ratio using the method SetUpDownRatio(). The given value is an integer corresponding to the ratio used to extract only the value of interest. For example, if you have 200 frames and a ratio of 10, then 20 frames will be extracted (one frame each 10 frames).

Note: This class require specialization for each kind of class. At this moment, only the specialization of the following classes are implemented:

Note
: The design of this class is not perfect as it cannot be used in a pipeline without to update the part before to know some information (up/down ratio). This class (or the pipeline mechanism) could be modified in a future version of BTK to make up this problem.

Member Typedef Documentation

template<class T >
btk::DownsampleFilter< T >::ConstPointer

Smart pointer associated with a const DownsampleFilter object.

template<class T >
btk::DownsampleFilter< T >::ItemConstPointer

Smart const pointer associated with a T object.

template<class T >
btk::DownsampleFilter< T >::ItemPointer

Smart pointer associated with a T object.

template<class T >
btk::DownsampleFilter< T >::Pointer

Smart pointer associated with a DownsampleFilter object.

Constructor & Destructor Documentation

template<class T >
template< class T > virtual btk::DownsampleFilter< T >::~DownsampleFilter ( )
inlinevirtual

Empty destructor.

template<class T >
btk::DownsampleFilter< T >::DownsampleFilter ( )
protected

Constructor. Sets the number of inputs and outputs to 1.

Member Function Documentation

template<class T >
void btk::DownsampleFilter< T >::GenerateData ( )
protectedvirtual

Generates the outputs' data.

Implements btk::ProcessObject.

template<class T >
template< class T > CollectionPointer btk::DownsampleFilter< T >::GetInput ( )
inline

Gets the input registered with this process.

template<class T >
template< class T > CollectionPointer btk::DownsampleFilter< T >::GetInput ( int  idx)
inlineprotected

Returns the input at the index idx.

template<class T >
template< class T > ItemPointer btk::DownsampleFilter< T >::GetOutput ( )
inline

Gets the output created with this process.

template<class T >
template< class T > ItemPointer btk::DownsampleFilter< T >::GetOutput ( int  idx)
inlineprotected

Returns the output at the index idx.

template<class T >
template< class T > int btk::DownsampleFilter< T >::GetUpDownRatio ( ) const
inline

Gets the ratio used to downsample the data.

template<class T >
DataObject::Pointer btk::DownsampleFilter< T >::MakeOutput ( int  idx)
protectedvirtual

Creates a T:Pointer object and return it as a DataObject::Pointer.

Implements btk::ProcessObject.

template<class T >
template< class T > static Pointer btk::DownsampleFilter< T >::New ( )
inlinestatic

Creates a smart pointer associated with a DownsampleFilter<T> object.

template<class T >
template< class T > void btk::DownsampleFilter< T >::SetInput ( ItemPointer  input)
inline

Sets the input required with this process.

template<class T >
void btk::DownsampleFilter< T >::SetUpDownRatio ( int  ratio)

Sets the ratio used to downsample the data.