ITK
6.0.0
Insight Toolkit
|
#include <itkMembershipSample.h>
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
Definition at line 57 of file itkMembershipSample.h.
Classes | |
class | ConstIterator |
class | Iterator |
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 ClassSampleType * | GetClassSample (const ClassLabelType &classLabel) const |
AbsoluteFrequencyType | GetFrequency (const InstanceIdentifier &id) const |
MeasurementType | GetMeasurement (const InstanceIdentifier &id, const unsigned int dimension) |
const MeasurementVectorType & | GetMeasurementVector (const InstanceIdentifier &id) const |
virtual unsigned int | GetNumberOfClasses () const |
TotalAbsoluteFrequencyType | GetTotalFrequency () const |
void | Graft (const DataObject *thatObject) override |
void | SetNumberOfClasses (unsigned int numberOfClasses) |
virtual void | SetSample (const SampleType *_arg) |
virtual const SampleType * | GetSample () const |
Public Member Functions inherited from itk::DataObject | |
virtual void | CopyInformation (const DataObject *) |
virtual void | DataHasBeenGenerated () |
void | DisconnectPipeline () |
bool | GetDataReleased () const |
virtual const bool & | GetReleaseDataFlag () const |
SmartPointer< ProcessObject > | GetSource () const |
DataObjectPointerArraySizeType | GetSourceOutputIndex () const |
const DataObjectIdentifierType & | GetSourceOutputName () const |
virtual ModifiedTimeType | GetUpdateMTime () const |
virtual void | Initialize () |
virtual void | PrepareForNewData () |
virtual void | PropagateRequestedRegion () |
void | ReleaseData () |
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 () |
void | UpdateSource () const |
virtual bool | VerifyRequestedRegion () |
void | SetPipelineMTime (ModifiedTimeType time) |
virtual const ModifiedTimeType & | GetPipelineMTime () const |
virtual void | SetRealTimeStamp (RealTimeStamp _arg) |
virtual const RealTimeStamp & | GetRealTimeStamp () const |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
Protected Member Functions | |
MembershipSample () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~MembershipSample () override=default | |
Protected Member Functions inherited from itk::DataObject | |
DataObject () | |
virtual void | PropagateResetPipeline () |
~DataObject () override | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
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 |
Private Attributes | |
ClassLabelHolderType | m_ClassLabelHolder {} |
std::vector< ClassSamplePointer > | m_ClassSamples {} |
unsigned int | m_NumberOfClasses {} |
SampleConstPointer | m_Sample {} |
UniqueClassLabelsType | m_UniqueClassLabels {} |
const char * | GetNameOfClass () const override |
static Pointer | New () |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::DataObject | |
static bool | GetGlobalReleaseDataFlag () |
static void | GlobalReleaseDataFlagOff () |
static void | GlobalReleaseDataFlagOn () |
static Pointer | New () |
static void | SetGlobalReleaseDataFlag (bool val) |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
using itk::Statistics::MembershipSample< TSample >::AbsoluteFrequencyType = typename SampleType::AbsoluteFrequencyType |
Definition at line 81 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::ClassLabelHolderType = std::unordered_map<InstanceIdentifier, ClassLabelType> |
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 91 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::ClassLabelType = IdentifierType |
Definition at line 84 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::ClassSampleConstPointer = typename ClassSampleType::ConstPointer |
Definition at line 97 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::ClassSamplePointer = typename ClassSampleType::Pointer |
Definition at line 96 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::ClassSampleType = Subsample<SampleType> |
Typedef for each subsample that stores instance identifiers of instances that belong to a class
Definition at line 95 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::ConstPointer = SmartPointer<const Self> |
Definition at line 66 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::InstanceIdentifier = typename SampleType::InstanceIdentifier |
Definition at line 78 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::MeasurementType = typename SampleType::MeasurementType |
Definition at line 77 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::MeasurementVectorType = typename SampleType::MeasurementVectorType |
Definition at line 76 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::Pointer = SmartPointer<Self> |
Definition at line 65 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::SampleConstPointer = typename SampleType::ConstPointer |
Definition at line 79 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::SampleType = TSample |
Typedefs for Measurement vector, measurement, Instance Identifier, frequency, size, size element value from the template argument TSample
Definition at line 75 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::Self = MembershipSample |
Standard class type aliases.
Definition at line 63 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::Superclass = DataObject |
Definition at line 64 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::TotalAbsoluteFrequencyType = typename SampleType::TotalAbsoluteFrequencyType |
Definition at line 82 of file itkMembershipSample.h.
using itk::Statistics::MembershipSample< TSample >::UniqueClassLabelsType = std::vector<ClassLabelType> |
vector of unique class labels that will be used for mapping internal continuous class label with real class labels
Definition at line 87 of file itkMembershipSample.h.
|
protected |
|
overrideprotecteddefault |
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.
|
inline |
This method returns an iterator to the beginning of the measurement vectors
Definition at line 276 of file itkMembershipSample.h.
|
inline |
Definition at line 294 of file itkMembershipSample.h.
|
inline |
This method returns an iterator to the beginning of the measurement vectors
Definition at line 286 of file itkMembershipSample.h.
|
inline |
Definition at line 302 of file itkMembershipSample.h.
unsigned int itk::Statistics::MembershipSample< TSample >::GetClassLabel | ( | const InstanceIdentifier & | id | ) | const |
Gets the class label for the instance that has the instance identifier, id.
const ClassLabelHolderType itk::Statistics::MembershipSample< TSample >::GetClassLabelHolder | ( | ) | const |
Gets the class labels that corresponding to the each instance in this container.
const ClassSampleType* itk::Statistics::MembershipSample< TSample >::GetClassSample | ( | const ClassLabelType & | classLabel | ) | const |
Gets the Subsample that includes only the instances that belong to the classLabel. If classLabel does not exist, nullptr is returned.
AbsoluteFrequencyType itk::Statistics::MembershipSample< TSample >::GetFrequency | ( | const InstanceIdentifier & | id | ) | const |
returns the frequency of the instance which is identified by the 'id'
|
private |
Gets the internal continuous class label from the class labels that are used for AddInstance method.
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
const MeasurementVectorType& itk::Statistics::MembershipSample< TSample >::GetMeasurementVector | ( | const InstanceIdentifier & | id | ) | const |
returns the measurement of the instance which is identified by the 'id'
|
overridevirtual |
Reimplemented from itk::DataObject.
|
virtual |
Gets the number of classes (class labels)
|
virtual |
Set/Get the actual sample data
TotalAbsoluteFrequencyType itk::Statistics::MembershipSample< TSample >::GetTotalFrequency | ( | ) | const |
returns the total frequency for the 'd' dimension
|
overridevirtual |
Method to graft another sample
Reimplemented from itk::DataObject.
|
static |
|
overrideprotectedvirtual |
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::DataObject.
void itk::Statistics::MembershipSample< TSample >::SetNumberOfClasses | ( | unsigned int | numberOfClasses | ) |
Sets the number of classes (class labels)
|
virtual |
Set/Get the actual sample data
|
private |
Definition at line 322 of file itkMembershipSample.h.
|
private |
Definition at line 323 of file itkMembershipSample.h.
|
private |
Definition at line 325 of file itkMembershipSample.h.
|
private |
Definition at line 324 of file itkMembershipSample.h.
|
private |
Definition at line 321 of file itkMembershipSample.h.