ITK  4.2.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
itk::Statistics::MembershipSample< TSample > Class Template Reference

#include <itkMembershipSample.h>

+ Inheritance diagram for itk::Statistics::MembershipSample< TSample >:
+ Collaboration diagram for itk::Statistics::MembershipSample< TSample >:

List of all members.

Classes

class  ConstIterator
class  Iterator

Public Types

typedef
SampleType::AbsoluteFrequencyType 
AbsoluteFrequencyType
typedef itksys::hash_map
< InstanceIdentifier,
ClassLabelType
ClassLabelHolderType
typedef IdentifierType ClassLabelType
typedef
ClassSampleType::ConstPointer 
ClassSampleConstPointer
typedef ClassSampleType::Pointer ClassSamplePointer
typedef Subsample< SampleTypeClassSampleType
typedef SmartPointer< const SelfConstPointer
typedef
SampleType::InstanceIdentifier 
InstanceIdentifier
typedef SampleType::MeasurementType MeasurementType
typedef
SampleType::MeasurementVectorType 
MeasurementVectorType
typedef SmartPointer< SelfPointer
typedef SampleType::ConstPointer SampleConstPointer
typedef TSample SampleType
typedef MembershipSample Self
typedef DataObject Superclass
typedef
SampleType::TotalAbsoluteFrequencyType 
TotalAbsoluteFrequencyType
typedef std::vector
< ClassLabelType
UniqueClassLabelsType
- Public Types inherited from itk::DataObject
typedef std::string DataObjectIdentifierType
typedef std::vector< Pointer >
::size_type 
DataObjectPointerArraySizeType
- Public Types inherited from itk::Object
- Public Types inherited from itk::LightObject

Public Member Functions

void AddInstance (const ClassLabelType &classLabel, const InstanceIdentifier &id)
Iterator Begin ()
ConstIterator Begin () const
Iterator End ()
ConstIterator End () const
unsigned int GetClassLabel (const InstanceIdentifier &id) const
const ClassLabelHolderType GetClassLabelHolder () const
const ClassSampleTypeGetClassSample (const ClassLabelType &classLabel) const
AbsoluteFrequencyType GetFrequency (const InstanceIdentifier &id) const
MeasurementType GetMeasurement (const InstanceIdentifier &id, const unsigned int &dimension)
const MeasurementVectorTypeGetMeasurementVector (const InstanceIdentifier &id) const
virtual unsigned int GetNumberOfClasses () const
TotalAbsoluteFrequencyType GetTotalFrequency () const
virtual void Graft (const DataObject *thatObject)
void SetNumberOfClasses (unsigned int numberOfClasses)
virtual void SetSample (const SampleType *_arg)
virtual const SampleTypeGetSample ()
- Public Member Functions inherited from itk::DataObject
virtual void CopyInformation (const DataObject *)
virtual void DataHasBeenGenerated ()
void DisconnectPipeline ()
bool GetDataReleased () const
virtual const bool & GetReleaseDataFlag ()
SmartPointerForwardReference
< ProcessObject
GetSource () const
DataObjectPointerArraySizeType GetSourceOutputIndex () const
const DataObjectIdentifierTypeGetSourceOutputName () const
virtual unsigned long GetUpdateMTime () const
virtual void Initialize ()
virtual void PrepareForNewData ()
virtual void PropagateRequestedRegion ()
void ReleaseData ()
virtual void ReleaseDataFlagOff ()
virtual void ReleaseDataFlagOn ()
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion ()
virtual void ResetPipeline ()
void SetReleaseDataFlag (bool flag)
virtual void SetRequestedRegion (const DataObject *)
virtual void SetRequestedRegionToLargestPossibleRegion ()
bool ShouldIReleaseData () const
virtual void Update ()
virtual void UpdateOutputData ()
virtual void UpdateOutputInformation ()
virtual bool VerifyRequestedRegion ()
void SetPipelineMTime (unsigned long time)
virtual const unsigned long & GetPipelineMTime ()
virtual void SetRealTimeStamp (RealTimeStamp _arg)
virtual const RealTimeStampGetRealTimeStamp ()
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
unsigned long AddObserver (const EventObject &event, Command *) const
virtual void DebugOff () const
virtual void DebugOn () const
CommandGetCommand (unsigned long tag)
bool GetDebug () const
MetaDataDictionaryGetMetaDataDictionary (void)
const MetaDataDictionaryGetMetaDataDictionary (void) const
virtual unsigned long GetMTime () const
virtual const TimeStampGetTimeStamp () const
bool HasObserver (const EventObject &event) const
void InvokeEvent (const EventObject &)
void InvokeEvent (const EventObject &) const
virtual void Modified () const
virtual void Register () const
void RemoveAllObservers ()
void RemoveObserver (unsigned long tag)
void SetDebug (bool debugFlag) const
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
virtual void SetReferenceCount (int)
virtual void UnRegister () const
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
virtual int GetReferenceCount () const
 itkCloneMacro (Self)
void Print (std::ostream &os, Indent indent=0) const
- Static Public Member Functions inherited from itk::DataObject
static bool GetGlobalReleaseDataFlag ()
static void GlobalReleaseDataFlagOff ()
static void GlobalReleaseDataFlagOn ()
static void SetGlobalReleaseDataFlag (bool val)
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
static void GlobalWarningDisplayOff ()
static void GlobalWarningDisplayOn ()
static void SetGlobalWarningDisplay (bool flag)
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()

Protected Member Functions

 MembershipSample ()
void PrintSelf (std::ostream &os, Indent indent) const
virtual ~MembershipSample ()
- Protected Member Functions inherited from itk::DataObject
virtual void PropagateResetPipeline ()
 DataObject ()
 ~DataObject ()
- Protected Member Functions inherited from itk::Object
 Object ()
bool PrintObservers (std::ostream &os, Indent indent) const
virtual void SetTimeStamp (const TimeStamp &time)
virtual ~Object ()
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 LightObject ()
virtual void PrintHeader (std::ostream &os, Indent indent) const
virtual void PrintTrailer (std::ostream &os, Indent indent) const
virtual ~LightObject ()

Private Member Functions

int GetInternalClassLabel (const ClassLabelType classLabel) const
 MembershipSample (const Self &)
void operator= (const Self &)

Private Attributes

ClassLabelHolderType m_ClassLabelHolder
std::vector< ClassSamplePointerm_ClassSamples
unsigned int m_NumberOfClasses
SampleConstPointer m_Sample
UniqueClassLabelsType m_UniqueClassLabels
virtual const char * GetNameOfClass () const
virtual ::itk::LightObject::Pointer CreateAnother (void) const
static Pointer New ()

Additional Inherited Members


Detailed Description

template<class TSample>
class itk::Statistics::MembershipSample< TSample >

Container for storing the instance-identifiers of other sample with their associated class labels.

This class does not store any measurement data. In a sense, you can think it as an additional information to basic samples (such as Histogram, PointSetListSampleAdaptor, and ImageToListSampleAdaptor). The additional information is a class label for a measurement vector. Obviously without such basic types of sample, this one is meaningless. You can call any basic methods that has been defined in the Sample class such as GetMeasurementVector and GetFrequency. You can query the class label for an instance using an instance-identifier. Another new and important method is the GetClassSample method. With a given class label, it returns a pointer to the Subsample object that has all the instance-identifiers of instances that belong to the class.

This class is templated over the type of the basic sample. To use all the method, you should first plug in a basic type sample using the SetSample method

Wiki Examples:

Definition at line 56 of file itkMembershipSample.h.


Member Typedef Documentation

template<class TSample >
typedef SampleType::AbsoluteFrequencyType itk::Statistics::MembershipSample< TSample >::AbsoluteFrequencyType

Definition at line 78 of file itkMembershipSample.h.

template<class TSample >
typedef itksys::hash_map< InstanceIdentifier, ClassLabelType > itk::Statistics::MembershipSample< TSample >::ClassLabelHolderType

Typedef for the storage that holds a class label for each instance. The relationship between instances and class label is one-to-one

Definition at line 88 of file itkMembershipSample.h.

template<class TSample >
typedef IdentifierType itk::Statistics::MembershipSample< TSample >::ClassLabelType

Definition at line 81 of file itkMembershipSample.h.

Definition at line 94 of file itkMembershipSample.h.

Definition at line 93 of file itkMembershipSample.h.

template<class TSample >
typedef Subsample< SampleType > itk::Statistics::MembershipSample< TSample >::ClassSampleType

Typedef for each subsample that stores instance identifiers of instances that belong to a class

Definition at line 92 of file itkMembershipSample.h.

template<class TSample >
typedef SmartPointer< const Self > itk::Statistics::MembershipSample< TSample >::ConstPointer

Reimplemented from itk::DataObject.

Definition at line 63 of file itkMembershipSample.h.

template<class TSample >
typedef SampleType::InstanceIdentifier itk::Statistics::MembershipSample< TSample >::InstanceIdentifier

Definition at line 75 of file itkMembershipSample.h.

template<class TSample >
typedef SampleType::MeasurementType itk::Statistics::MembershipSample< TSample >::MeasurementType

Definition at line 74 of file itkMembershipSample.h.

template<class TSample >
typedef SampleType::MeasurementVectorType itk::Statistics::MembershipSample< TSample >::MeasurementVectorType

Definition at line 73 of file itkMembershipSample.h.

template<class TSample >
typedef SmartPointer< Self > itk::Statistics::MembershipSample< TSample >::Pointer

Reimplemented from itk::DataObject.

Definition at line 62 of file itkMembershipSample.h.

template<class TSample >
typedef SampleType::ConstPointer itk::Statistics::MembershipSample< TSample >::SampleConstPointer

Definition at line 76 of file itkMembershipSample.h.

template<class TSample >
typedef TSample itk::Statistics::MembershipSample< TSample >::SampleType

Typedefs for Measurement vector, measurement, Instance Identifier, frequency, size, size element value from the template argument TSample

Definition at line 67 of file itkMembershipSample.h.

template<class TSample >
typedef MembershipSample itk::Statistics::MembershipSample< TSample >::Self

Standard class typedefs.

Reimplemented from itk::DataObject.

Definition at line 60 of file itkMembershipSample.h.

template<class TSample >
typedef DataObject itk::Statistics::MembershipSample< TSample >::Superclass

Reimplemented from itk::DataObject.

Definition at line 61 of file itkMembershipSample.h.

template<class TSample >
typedef SampleType::TotalAbsoluteFrequencyType itk::Statistics::MembershipSample< TSample >::TotalAbsoluteFrequencyType

Definition at line 79 of file itkMembershipSample.h.

template<class TSample >
typedef std::vector< ClassLabelType > itk::Statistics::MembershipSample< TSample >::UniqueClassLabelsType

vector of unique class labels that will be used for mapping internal continuous class label with real class labels

Definition at line 84 of file itkMembershipSample.h.


Constructor & Destructor Documentation

template<class TSample >
itk::Statistics::MembershipSample< TSample >::MembershipSample ( )
protected
template<class TSample >
virtual itk::Statistics::MembershipSample< TSample >::~MembershipSample ( )
inlineprotectedvirtual

Definition at line 289 of file itkMembershipSample.h.

template<class TSample >
itk::Statistics::MembershipSample< TSample >::MembershipSample ( const Self )
private

Member Function Documentation

template<class TSample >
void itk::Statistics::MembershipSample< TSample >::AddInstance ( const ClassLabelType classLabel,
const InstanceIdentifier id 
)

Adds an instance from the source sample to this container. The first argument is the class label for that instance. The second argument is the instance identifier from the source identifier that is going to be included this container.

template<class TSample >
Iterator itk::Statistics::MembershipSample< TSample >::Begin ( void  )
inline

This method returns an iterator to the beginning of the measurement vectors

Definition at line 257 of file itkMembershipSample.h.

template<class TSample >
ConstIterator itk::Statistics::MembershipSample< TSample >::Begin ( void  ) const
inline

Definition at line 273 of file itkMembershipSample.h.

template<class TSample >
virtual::itk::LightObject::Pointer itk::Statistics::MembershipSample< TSample >::CreateAnother ( void  ) const
virtual

Standard macros

Reimplemented from itk::Object.

template<class TSample >
Iterator itk::Statistics::MembershipSample< TSample >::End ( void  )
inline

This method returns an iterator to the beginning of the measurement vectors

Definition at line 266 of file itkMembershipSample.h.

template<class TSample >
ConstIterator itk::Statistics::MembershipSample< TSample >::End ( void  ) const
inline

Definition at line 280 of file itkMembershipSample.h.

template<class TSample >
unsigned int itk::Statistics::MembershipSample< TSample >::GetClassLabel ( const InstanceIdentifier id) const

Gets the class label for the instance that has the instance identifier, id.

template<class TSample >
const ClassLabelHolderType itk::Statistics::MembershipSample< TSample >::GetClassLabelHolder ( ) const

Gets the class labels that corresponding to the each instance in this container.

template<class TSample >
const ClassSampleType* itk::Statistics::MembershipSample< TSample >::GetClassSample ( const ClassLabelType classLabel) const

Gets the Subsample that includes only the instances that belongs to the classLabel

template<class TSample >
AbsoluteFrequencyType itk::Statistics::MembershipSample< TSample >::GetFrequency ( const InstanceIdentifier id) const

returns the frequency of the instance which is identified by the 'id'

template<class TSample >
int itk::Statistics::MembershipSample< TSample >::GetInternalClassLabel ( const ClassLabelType  classLabel) const
private

Gets the internal continuous class label from the class labels that are used for AddInstance method.

template<class TSample >
MeasurementType itk::Statistics::MembershipSample< TSample >::GetMeasurement ( const InstanceIdentifier id,
const unsigned int &  dimension 
)

returns the measurement element which is the 'n'-th element in the 'd' dimension of the measurement vector

template<class TSample >
const MeasurementVectorType& itk::Statistics::MembershipSample< TSample >::GetMeasurementVector ( const InstanceIdentifier id) const

retunrs the measurement of the instance which is identified by the 'id'

template<class TSample >
virtual const char* itk::Statistics::MembershipSample< TSample >::GetNameOfClass ( ) const
virtual

Standard macros

Reimplemented from itk::DataObject.

template<class TSample >
virtual unsigned int itk::Statistics::MembershipSample< TSample >::GetNumberOfClasses ( ) const
virtual

Gets the number of classes (class labels)

template<class TSample >
virtual const SampleType* itk::Statistics::MembershipSample< TSample >::GetSample ( )
virtual

Set/Get the actual sample data

template<class TSample >
TotalAbsoluteFrequencyType itk::Statistics::MembershipSample< TSample >::GetTotalFrequency ( ) const

returns the total frequency for the 'd' dimension

template<class TSample >
virtual void itk::Statistics::MembershipSample< TSample >::Graft ( const DataObject thatObject)
virtual

Method to graft another sample

Reimplemented from itk::DataObject.

template<class TSample >
static Pointer itk::Statistics::MembershipSample< TSample >::New ( )
static

Standard macros

Reimplemented from itk::Object.

template<class TSample >
void itk::Statistics::MembershipSample< TSample >::operator= ( const Self )
private

Reimplemented from itk::DataObject.

template<class TSample >
void itk::Statistics::MembershipSample< TSample >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protectedvirtual

Method for grafting the content of one data object into another one. This method is intended to be overloaded by derived classes. Each one of them should use dynamic_casting in order to verify that the grafted object is actually of the same type as the class on which the Graft() method was invoked.

Reimplemented from itk::DataObject.

template<class TSample >
void itk::Statistics::MembershipSample< TSample >::SetNumberOfClasses ( unsigned int  numberOfClasses)

Sets the number of classes (class labels)

template<class TSample >
virtual void itk::Statistics::MembershipSample< TSample >::SetSample ( const SampleType _arg)
virtual

Set/Get the actual sample data


Member Data Documentation

template<class TSample >
ClassLabelHolderType itk::Statistics::MembershipSample< TSample >::m_ClassLabelHolder
private

Definition at line 301 of file itkMembershipSample.h.

template<class TSample >
std::vector< ClassSamplePointer > itk::Statistics::MembershipSample< TSample >::m_ClassSamples
private

Definition at line 302 of file itkMembershipSample.h.

template<class TSample >
unsigned int itk::Statistics::MembershipSample< TSample >::m_NumberOfClasses
private

Definition at line 304 of file itkMembershipSample.h.

template<class TSample >
SampleConstPointer itk::Statistics::MembershipSample< TSample >::m_Sample
private

Definition at line 303 of file itkMembershipSample.h.

template<class TSample >
UniqueClassLabelsType itk::Statistics::MembershipSample< TSample >::m_UniqueClassLabels
private

Definition at line 300 of file itkMembershipSample.h.


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