Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::Label Class Reference

A data structure describing a label. More...

#include <mitkLabel.h>

Inheritance diagram for mitk::Label:
Collaboration diagram for mitk::Label:

Public Types

typedef unsigned short PixelType
 
- Public Types inherited from mitk::PropertyList
typedef PropertyList Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef std::map< std::string, BaseProperty::PointerPropertyMap
 
typedef std::pair< std::string, BaseProperty::PointerPropertyMapElementType
 

Public Member Functions

 mitkClassMacro (Label, mitk::PropertyList)
 
void SetLocked (bool locked)
 
bool GetLocked () const
 
void SetVisible (bool visible)
 
bool GetVisible () const
 
void SetOpacity (float opacity)
 
float GetOpacity () const
 
void SetName (const std::string &name)
 
std::string GetName () const
 
void SetCenterOfMassIndex (const mitk::Point3D &center)
 
mitk::Point3D GetCenterOfMassIndex () const
 
void SetCenterOfMassCoordinates (const mitk::Point3D &center)
 
mitk::Point3D GetCenterOfMassCoordinates () const
 
void SetColor (const mitk::Color &)
 
const mitk::ColorGetColor () const
 
void SetValue (PixelType pixelValue)
 
PixelType GetValue () const
 
void SetLayer (unsigned int layer)
 
unsigned int GetLayer () const
 
void SetProperty (const std::string &propertyKey, BaseProperty *property)
 
void Modified ()
 
 Label ()
 
virtual ~Label ()
 
- Public Member Functions inherited from mitk::PropertyList
virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
mitk::BasePropertyGetProperty (const std::string &propertyKey) const
 Get a property by its name. More...
 
void SetProperty (const std::string &propertyKey, BaseProperty *property)
 Set a property in the list/map by value. More...
 
void ReplaceProperty (const std::string &propertyKey, BaseProperty *property)
 Set a property object in the list/map by reference. More...
 
void ConcatenatePropertyList (PropertyList *pList, bool replace=false)
 Set a property object in the list/map by reference. More...
 
template<typename T >
bool GetPropertyValue (const char *propertyKey, T &value) const
 Convenience access method for GenericProperty<T> properties (T being the type of the second parameter) More...
 
bool GetBoolProperty (const char *propertyKey, bool &boolValue) const
 Convenience method to access the value of a BoolProperty. More...
 
bool Get (const char *propertyKey, bool &boolValue) const
 ShortCut for the above method. More...
 
void SetBoolProperty (const char *propertyKey, bool boolValue)
 Convenience method to set the value of a BoolProperty. More...
 
void Set (const char *propertyKey, bool boolValue)
 ShortCut for the above method. More...
 
bool GetIntProperty (const char *propertyKey, int &intValue) const
 Convenience method to access the value of an IntProperty. More...
 
bool Get (const char *propertyKey, int &intValue) const
 ShortCut for the above method. More...
 
void SetIntProperty (const char *propertyKey, int intValue)
 Convenience method to set the value of an IntProperty. More...
 
void Set (const char *propertyKey, int intValue)
 ShortCut for the above method. More...
 
bool GetFloatProperty (const char *propertyKey, float &floatValue) const
 Convenience method to access the value of a FloatProperty. More...
 
bool Get (const char *propertyKey, float &floatValue) const
 ShortCut for the above method. More...
 
void SetFloatProperty (const char *propertyKey, float floatValue)
 Convenience method to set the value of a FloatProperty. More...
 
void Set (const char *propertyKey, float floatValue)
 ShortCut for the above method. More...
 
bool GetDoubleProperty (const char *propertyKey, double &doubleValue) const
 Convenience method to access the value of a DoubleProperty. More...
 
bool Get (const char *propertyKey, double &doubleValue) const
 ShortCut for the above method. More...
 
void SetDoubleProperty (const char *propertyKey, double doubleValue)
 Convenience method to set the value of a DoubleProperty. More...
 
void Set (const char *propertyKey, double doubleValue)
 ShortCut for the above method. More...
 
bool GetStringProperty (const char *propertyKey, std::string &stringValue) const
 Convenience method to access the value of a StringProperty. More...
 
bool Get (const char *propertyKey, std::string &stringValue) const
 ShortCut for the above method. More...
 
void SetStringProperty (const char *propertyKey, const char *stringValue)
 Convenience method to set the value of a StringProperty. More...
 
void Set (const char *propertyKey, const char *stringValue)
 ShortCut for the above method. More...
 
void Set (const char *propertyKey, const std::string &stringValue)
 ShortCut for the above method. More...
 
virtual unsigned long GetMTime () const override
 Get the timestamp of the last change of the map or the last change of one of the properties store in the list (whichever is later). More...
 
bool DeleteProperty (const std::string &propertyKey)
 Remove a property from the list/map. More...
 
const PropertyMapGetMap () const
 
bool IsEmpty () const
 
virtual void Clear ()
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::PropertyList
static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 

Static Public Attributes

static const PixelType MAX_LABEL_VALUE
 The maximum value a label can get: Since the value is of type unsigned short MAX_LABEL_VALUE = 65535. More...
 

Protected Member Functions

void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
 Label (const Label &other)
 
- Protected Member Functions inherited from mitk::PropertyList
 PropertyList ()
 
 PropertyList (const PropertyList &other)
 
virtual ~PropertyList ()
 

Additional Inherited Members

- Protected Attributes inherited from mitk::PropertyList
PropertyMap m_Properties
 Map of properties. More...
 

Detailed Description

A data structure describing a label.

Definition at line 35 of file mitkLabel.h.

Member Typedef Documentation

typedef unsigned short mitk::Label::PixelType

Definition at line 40 of file mitkLabel.h.

Constructor & Destructor Documentation

mitk::Label::~Label ( )
virtual

Definition at line 81 of file mitkLabel.cpp.

mitk::Label::Label ( const Label other)
protected

Definition at line 66 of file mitkLabel.cpp.

References mitk::PropertyList::GetMap(), Modified(), and mitk::New().

Member Function Documentation

mitk::Point3D mitk::Label::GetCenterOfMassCoordinates ( ) const

Definition at line 244 of file mitkLabel.cpp.

References mitk::GenericProperty< T >::GetValue().

mitk::Point3D mitk::Label::GetCenterOfMassIndex ( ) const

Definition at line 227 of file mitkLabel.cpp.

References mitk::GenericProperty< T >::GetValue().

const mitk::Color & mitk::Label::GetColor ( ) const
unsigned int mitk::Label::GetLayer ( ) const

Definition at line 191 of file mitkLabel.cpp.

References mitk::GenericProperty< T >::GetValue().

bool mitk::Label::GetLocked ( ) const

Definition at line 105 of file mitkLabel.cpp.

Referenced by InternalWritePreviewOnWorkingImage().

std::string mitk::Label::GetName ( ) const

Definition at line 153 of file mitkLabel.cpp.

float mitk::Label::GetOpacity ( ) const

Definition at line 141 of file mitkLabel.cpp.

bool mitk::Label::GetVisible ( ) const
mitk::Label::mitkClassMacro ( Label  ,
mitk::PropertyList   
)
void mitk::Label::Modified ( )
inline

Definition at line 77 of file mitkLabel.h.

Referenced by Label(), and SetProperty().

void mitk::Label::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

Definition at line 257 of file mitkLabel.cpp.

void mitk::Label::SetCenterOfMassCoordinates ( const mitk::Point3D center)

Definition at line 233 of file mitkLabel.cpp.

References mitk::Point3dProperty::New(), and mitk::GenericProperty< T >::SetValue().

Referenced by Label().

void mitk::Label::SetCenterOfMassIndex ( const mitk::Point3D center)

Definition at line 216 of file mitkLabel.cpp.

References mitk::Point3dProperty::New(), and mitk::GenericProperty< T >::SetValue().

Referenced by Label().

void mitk::Label::SetColor ( const mitk::Color _color)
void mitk::Label::SetLayer ( unsigned int  layer)

Definition at line 180 of file mitkLabel.cpp.

References mitk::UIntProperty::New(), and mitk::GenericProperty< T >::SetValue().

Referenced by Label().

void mitk::Label::SetLocked ( bool  locked)

Definition at line 94 of file mitkLabel.cpp.

References mitk::GenericProperty< T >::SetValue().

Referenced by Label().

void mitk::Label::SetName ( const std::string &  name)

Definition at line 148 of file mitkLabel.cpp.

Referenced by Label(), and mitk::LabelSet::RenameLabel().

void mitk::Label::SetOpacity ( float  opacity)

Definition at line 130 of file mitkLabel.cpp.

References mitk::GenericProperty< T >::SetValue().

Referenced by Label().

void mitk::Label::SetProperty ( const std::string &  propertyKey,
BaseProperty property 
)

Definition at line 85 of file mitkLabel.cpp.

References Modified(), and mitk::New().

void mitk::Label::SetValue ( PixelType  pixelValue)

Definition at line 160 of file mitkLabel.cpp.

References mitk::UShortProperty::New(), and mitk::GenericProperty< T >::SetValue().

Referenced by Label().

void mitk::Label::SetVisible ( bool  visible)

Definition at line 112 of file mitkLabel.cpp.

References mitk::GenericProperty< T >::SetValue().

Referenced by Label().

Member Data Documentation

const mitk::Label::PixelType mitk::Label::MAX_LABEL_VALUE
static

The maximum value a label can get: Since the value is of type unsigned short MAX_LABEL_VALUE = 65535.

Definition at line 45 of file mitkLabel.h.

Referenced by mitk::LabelSet::AddLabel(), and mitk::LabelSetImage::InitializeByLabeledImageProcessing().


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