Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions
itk::PSMContainer< T > Class Template Reference

A container class that holds particle position information for the PSMParticleSystem class. More...

#include <itkPSMContainer.h>

+ Inheritance diagram for itk::PSMContainer< T >:
+ Collaboration diagram for itk::PSMContainer< T >:

Classes

class  ConstIterator
 
class  Iterator
 
struct  ltcmp
 

Public Types

typedef T DataType
 
typedef PSMContainer Self
 
typedef DataObject Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef WeakPointer< const SelfConstWeakPointer
 
typedef std::map< unsigned int, T, ltcmpMapType
 

Public Member Functions

 itkNewMacro (Self)
 
 itkTypeMacro (PSMContainer, DataObject)
 
ConstIterator GetBegin () const
 
ConstIterator GetEnd () const
 
MapType::const_iterator GetMapBegin () const
 
MapType::const_iterator GetMapEnd () const
 
MapType::iterator GetMapBegin ()
 
MapType::iterator GetMapEnd ()
 
T & operator[] (const unsigned long int &k)
 
const T & operator[] (const unsigned long int &k) const
 
bool HasIndex (unsigned long int k) const
 
unsigned long int GetSize () const
 
MapType::size_type Erase (const unsigned int &k)
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const
 

Detailed Description

template<class T>
class itk::PSMContainer< T >

A container class that holds particle position information for the PSMParticleSystem class.

This class is a wrapper around an stl map data structure that holds particle position information (points). It provides the necessary iterators and less-than comparison methods.

Definition at line 42 of file itkPSMContainer.h.

Member Typedef Documentation

template<class T>
typedef T itk::PSMContainer< T >::DataType

Standard class typedefs

Definition at line 46 of file itkPSMContainer.h.

template<class T>
typedef std::map<unsigned int, T, ltcmp> itk::PSMContainer< T >::MapType

The underlying type of the container structure: an stl map

Definition at line 69 of file itkPSMContainer.h.

Member Function Documentation

template<class T>
MapType::size_type itk::PSMContainer< T >::Erase ( const unsigned int &  k)
inline

Erase the element in the container with index k. Return value is 1 on success.

Definition at line 135 of file itkPSMContainer.h.

136  { return m_Map.erase(k); }
template<class T>
ConstIterator itk::PSMContainer< T >::GetBegin ( ) const
inline

Return iterators for container values.

Definition at line 103 of file itkPSMContainer.h.

104  { return ConstIterator( m_Map.begin()); }
template<class T>
MapType::const_iterator itk::PSMContainer< T >::GetMapBegin ( ) const
inline

Return iterators for the underlying map container.

Definition at line 109 of file itkPSMContainer.h.

110  { return m_Map.begin(); }
template<class T>
unsigned long int itk::PSMContainer< T >::GetSize ( ) const
inline

Number of objects in the container.

Definition at line 131 of file itkPSMContainer.h.

131 { return m_Map.size(); }
template<class T>
bool itk::PSMContainer< T >::HasIndex ( unsigned long int  k) const
inline

Returns true if index k is in the container and false otherwise.

Definition at line 124 of file itkPSMContainer.h.

125  {
126  if ( m_Map.find(k) != m_Map.end()) return true;
127  else return false;
128  }
template<class T>
itk::PSMContainer< T >::itkNewMacro ( Self  )

Method for creation through the object factory.

template<class T>
itk::PSMContainer< T >::itkTypeMacro ( PSMContainer< T >  ,
DataObject   
)

Run-time type information (and related methods).

template<class T>
T& itk::PSMContainer< T >::operator[] ( const unsigned long int &  k)
inline

Returns a reference to the object associated with index k. If the index k does not already exist, this method inserts a new entry for k.

Definition at line 120 of file itkPSMContainer.h.

120 { return m_Map[k]; }

The documentation for this class was generated from the following file: