#include <itkMembershipSample.h>
Inheritance diagram for itk::Statistics::MembershipSample< TSample >:
[NOHEADER] | |
virtual const char * | GetNameOfClass () const |
Pointer | New () |
Public Types | |
typedef MembershipSample | Self |
typedef Sample< typename TSample::MeasurementVectorType > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef TSample::MeasurementVectorType | MeasurementVectorType |
typedef TSample::MeasurementType | MeasurementType |
typedef TSample::InstanceIdentifier | InstanceIdentifier |
typedef TSample::FrequencyType | FrequencyType |
typedef TSample::TotalFrequencyType | TotalFrequencyType |
typedef std::vector< unsigned int > | UniqueClassLabelsType |
typedef itk::hash_map< InstanceIdentifier, unsigned int > | ClassLabelHolderType |
typedef Subsample< TSample > | ClassSampleType |
typedef ClassSampleType::Pointer | ClassSamplePointer |
typedef ClassSampleType::ConstPointer | ClassSampleConstPointer |
Public Member Functions | |
void | SetSample (const TSample *sample) |
const TSample * | GetSample () const |
void | SetNumberOfClasses (unsigned int numberOfClasses) |
unsigned int | GetNumberOfClasses () const |
void | AddInstance (const unsigned int &classLabel, const InstanceIdentifier &id) |
unsigned int | GetClassLabel (const InstanceIdentifier &id) const |
int | GetInternalClassLabel (const unsigned int classLabel) const |
unsigned int | GetClassSampleSize (const unsigned int &classLabel) const |
const ClassSampleType * | GetClassSample (const unsigned int &classLabel) const |
ClassLabelHolderType * | GetClassLabels () |
unsigned int | Size (void) const |
const MeasurementVectorType & | GetMeasurementVector (const InstanceIdentifier &id) const |
MeasurementType | GetMeasurement (const InstanceIdentifier &id, const unsigned int &dimension) |
FrequencyType | GetFrequency (const InstanceIdentifier &id) const |
TotalFrequencyType | GetTotalFrequency () const |
void | Resize (unsigned int n) |
ConstIterator | Begin () const |
ConstIterator | End () const |
Protected Member Functions | |
MembershipSample () | |
virtual | ~MembershipSample () |
void | PrintSelf (std::ostream &os, Indent indent) const |
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 ImageToListAdaptor). 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
Recent API changes: The static const macro to get the length of a measurement vector, 'MeasurementVectorSize' has been removed to allow the length of a measurement vector to be specified at run time. Please use the function GetMeasurementVectorSize() instead.
Definition at line 57 of file itkMembershipSample.h.
|
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 87 of file itkMembershipSample.h. Referenced by itk::Statistics::MembershipSample< TSample >::~MembershipSample(). |
|
Definition at line 93 of file itkMembershipSample.h. |
|
Definition at line 92 of file itkMembershipSample.h. |
|
Typedef for each subsample that stores instance identifers of instances that belong to a class Definition at line 91 of file itkMembershipSample.h. |
|
Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 65 of file itkMembershipSample.h. |
|
Frequency value type Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 77 of file itkMembershipSample.h. Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels(). |
|
InstanceIdentifier typedef. This identifier is a unique sequential id for each measurement vector in a Sample subclass. Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 76 of file itkMembershipSample.h. Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels(), and itk::Statistics::MembershipSample< TSample >::ConstIterator::GetMeasurementVector(). |
|
ValueType of a measurement (ValueType of a component of the MeasurementVector Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 75 of file itkMembershipSample.h. Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels(). |
|
Typedefs for Measurement vector, measurement, Instance Identifier, frequency, size, size element value from the template argument TSample Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 74 of file itkMembershipSample.h. Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels(), and itk::Statistics::MembershipSample< TSample >::ConstIterator::GetFrequency(). |
|
Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 64 of file itkMembershipSample.h. |
|
Standard class typedefs. Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 62 of file itkMembershipSample.h. Referenced by itk::Statistics::MembershipSample< TSample >::~MembershipSample(). |
|
Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 63 of file itkMembershipSample.h. |
|
Total frequency type Reimplemented from itk::Statistics::Sample< TMeasurementVector >. Definition at line 78 of file itkMembershipSample.h. Referenced by itk::Statistics::MembershipSample< TSample >::GetClassLabels(). |
|
vector of unique class labels that will be used for mapping internal continuous class label with real class labels Definition at line 83 of file itkMembershipSample.h. Referenced by itk::Statistics::MembershipSample< TSample >::~MembershipSample(). |
|
|
|
|
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. |
|
Definition at line 238 of file itkMembershipSample.h. |
|
Definition at line 244 of file itkMembershipSample.h. |
|
Gets the class label for the instance that has the instance identifier, id. |
|
Gets the class labels that corresponding to the each instance in this container. Definition at line 131 of file itkMembershipSample.h. References itk::Statistics::MembershipSample< TSample >::FrequencyType, itk::Statistics::MembershipSample< TSample >::InstanceIdentifier, itk::Statistics::MembershipSample< TSample >::MeasurementType, itk::Statistics::MembershipSample< TSample >::MeasurementVectorType, and itk::Statistics::MembershipSample< TSample >::TotalFrequencyType. |
|
Gets the Subsample that includes only the instances that belongs to the classLabel |
|
Gets the number of instances that belong to the class label in this container |
|
returns the frequency of the instance which is identified by the 'id' Implements itk::Statistics::Sample< TMeasurementVector >. |
|
Gets the internal continuous class label from the class labels that are used for AddInstance method. |
|
returns the measurement element which is the 'n'-th element in the 'd' dimension of the measurement vector |
|
retunrs the measurement of the instance which is identified by the 'id' Implements itk::Statistics::Sample< TMeasurementVector >. |
|
Standard macros Reimplemented from itk::Statistics::Sample< TMeasurementVector >. |
|
Gets the number of classes (class labels) |
|
Returns the source sample pointer |
|
returns the total frequency for the 'd' dimension Implements itk::Statistics::Sample< TMeasurementVector >. |
|
Standard macros Reimplemented from itk::Object. |
|
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from itk::Statistics::Sample< TMeasurementVector >. |
|
Definition at line 152 of file itkMembershipSample.h. |
|
Sets the number of classes (class labels) |
|
Plug in the actual sample data |
|
returns the number of elements in each dimension Implements itk::Statistics::Sample< TMeasurementVector >. |