Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
A data structure describing a label. More...
#include <mitkLabel.h>
Public Types | |
typedef unsigned short | PixelType |
![]() | |
typedef PropertyList | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef std::map< std::string, BaseProperty::Pointer > | PropertyMap |
typedef std::pair< std::string, BaseProperty::Pointer > | PropertyMapElementType |
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 ¢er) |
mitk::Point3D | GetCenterOfMassIndex () const |
void | SetCenterOfMassCoordinates (const mitk::Point3D ¢er) |
mitk::Point3D | GetCenterOfMassCoordinates () const |
void | SetColor (const mitk::Color &) |
const mitk::Color & | GetColor () 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, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
Add new or change existent property. More... | |
void | Modified () |
Label () | |
~Label () override | |
![]() | |
virtual std::vector< std::string > | GetClassHierarchy () const |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override |
Get property by its key. More... | |
std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override |
Query keys of existing properties. More... | |
std::vector< std::string > | GetPropertyContextNames () const override |
Query names of existing contexts. More... | |
BaseProperty * | GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override |
Get property by its key. More... | |
void | RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
Removes a property. If the property does not exist, nothing will be done. More... | |
mitk::BaseProperty * | GetProperty (const std::string &propertyKey) const |
Get a property by its name. 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... | |
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 PropertyMap * | GetMap () const |
bool | IsEmpty () const |
virtual void | Clear () |
![]() | |
~IPropertyOwner () override | |
![]() | |
virtual | ~IPropertyProvider () |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
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) | |
![]() | |
PropertyList () | |
PropertyList (const PropertyList &other) | |
~PropertyList () override | |
Additional Inherited Members | |
![]() | |
PropertyMap | m_Properties |
Map of properties. More... | |
A data structure describing a label.
Definition at line 31 of file mitkLabel.h.
typedef unsigned short mitk::Label::PixelType |
Definition at line 36 of file mitkLabel.h.
mitk::Label::Label | ( | ) |
Definition at line 24 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), SetCenterOfMassCoordinates(), SetCenterOfMassIndex(), SetColor(), mitk::DICOMSegmentationPropertyHelper::SetDICOMSegmentProperties(), SetLayer(), SetLocked(), SetName(), SetOpacity(), SetValue(), and SetVisible().
|
override |
Definition at line 79 of file mitkLabel.cpp.
|
protected |
Definition at line 64 of file mitkLabel.cpp.
References mitk::PropertyList::GetMap(), and Modified().
mitk::Point3D mitk::Label::GetCenterOfMassCoordinates | ( | ) | const |
Definition at line 242 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), and mitk::GenericProperty< T >::GetValue().
Referenced by QmitkLabelSetWidget::SetDataStorage().
mitk::Point3D mitk::Label::GetCenterOfMassIndex | ( | ) | const |
Definition at line 225 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), and mitk::GenericProperty< T >::GetValue().
const mitk::Color & mitk::Label::GetColor | ( | ) | const |
Definition at line 197 of file mitkLabel.cpp.
References mitk::ColorProperty::GetColor(), and mitk::PropertyList::GetProperty().
Referenced by mitk::LabelSetImageVtkMapper2D::GenerateDataForRenderer(), mitk::DICOMSegmentationIO::Read(), QmitkLabelSetWidget::SelectLabelByPixelValue(), QmitkLabelSetWidget::UpdateAllTableWidgetItems(), mitk::LabelSet::UpdateLookupTable(), and QmitkLabelSetWidget::~QmitkLabelSetWidget().
unsigned int mitk::Label::GetLayer | ( | ) | const |
Definition at line 189 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), and mitk::GenericProperty< T >::GetValue().
bool mitk::Label::GetLocked | ( | ) | const |
Definition at line 103 of file mitkLabel.cpp.
References mitk::PropertyList::GetBoolProperty().
Referenced by QmitkLabelSetWidget::SelectLabelByPixelValue(), and QmitkLabelSetWidget::UpdateAllTableWidgetItems().
std::string mitk::Label::GetName | ( | ) | const |
Definition at line 151 of file mitkLabel.cpp.
References mitk::PropertyList::GetStringProperty().
Referenced by mitk::DICOMSegmentationIO::Read(), QmitkLabelSetWidget::SelectLabelByPixelValue(), mitk::DICOMSegmentationPropertyHelper::SetDICOMSegmentProperties(), and QmitkLabelSetWidget::UpdateAllTableWidgetItems().
float mitk::Label::GetOpacity | ( | ) | const |
Definition at line 139 of file mitkLabel.cpp.
References mitk::PropertyList::GetFloatProperty().
Referenced by mitk::LabelSet::UpdateLookupTable().
mitk::Label::PixelType mitk::Label::GetValue | ( | ) | const |
Definition at line 169 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty().
Referenced by mitk::ContourModelUtils::FillSliceInSlice(), mitk::LabelSetImageVtkMapper2D::GenerateDataForRenderer(), mitk::LabelSetImage::MaskStampProcessing(), mitk::SetRegionTool::OnMouseReleased(), mitk::ContourTool::OnMouseReleased(), mitk::DICOMSegmentationIO::Read(), QmitkLabelSetWidget::SelectLabelByPixelValue(), and mitk::DICOMSegmentationPropertyHelper::SetDICOMSegmentProperties().
bool mitk::Label::GetVisible | ( | ) | const |
Definition at line 121 of file mitkLabel.cpp.
References mitk::PropertyList::GetBoolProperty().
Referenced by mitk::LabelSetImageVtkMapper2D::GenerateDataForRenderer(), QmitkLabelSetWidget::SelectLabelByPixelValue(), and QmitkLabelSetWidget::UpdateAllTableWidgetItems().
mitk::Label::mitkClassMacro | ( | Label | , |
mitk::PropertyList | |||
) |
|
inline |
Definition at line 73 of file mitkLabel.h.
References mitk::eps, mitk::Equal(), MITKMULTILABEL_EXPORT, and verbose().
Referenced by Label(), and SetProperty().
|
static |
|
overrideprotected |
Definition at line 255 of file mitkLabel.cpp.
void mitk::Label::SetCenterOfMassCoordinates | ( | const mitk::Point3D & | center | ) |
Definition at line 231 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), mitk::Point3dProperty::New(), SetProperty(), and mitk::GenericProperty< T >::SetValue().
Referenced by mitk::LabelSetImage::CalculateCenterOfMassProcessing(), and Label().
void mitk::Label::SetCenterOfMassIndex | ( | const mitk::Point3D & | center | ) |
Definition at line 214 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), mitk::Point3dProperty::New(), SetProperty(), and mitk::GenericProperty< T >::SetValue().
Referenced by mitk::LabelSetImage::CalculateCenterOfMassProcessing(), and Label().
void mitk::Label::SetColor | ( | const mitk::Color & | _color | ) |
Definition at line 203 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), mitk::ColorProperty::New(), mitk::ColorProperty::SetColor(), and SetProperty().
Referenced by Label(), mitk::DICOMSegmentationIO::Read(), mitk::LabelSet::RenameLabel(), and QmitkLabelSetWidget::~QmitkLabelSetWidget().
void mitk::Label::SetLayer | ( | unsigned int | layer | ) |
Definition at line 178 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), mitk::UIntProperty::New(), SetProperty(), and mitk::GenericProperty< T >::SetValue().
Referenced by Label().
void mitk::Label::SetLocked | ( | bool | locked | ) |
Definition at line 92 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), mitk::PropertyList::SetBoolProperty(), and mitk::GenericProperty< T >::SetValue().
Referenced by Label(), and QmitkLabelSetWidget::~QmitkLabelSetWidget().
void mitk::Label::SetName | ( | const std::string & | name | ) |
Definition at line 146 of file mitkLabel.cpp.
References mitk::PropertyList::SetStringProperty().
Referenced by Label(), mitk::DICOMSegmentationIO::Read(), and mitk::LabelSet::RenameLabel().
void mitk::Label::SetOpacity | ( | float | opacity | ) |
Definition at line 128 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), mitk::PropertyList::SetFloatProperty(), and mitk::GenericProperty< T >::SetValue().
Referenced by QmitkLabelSetWidget::GetLabelStringList(), and Label().
|
overridevirtual |
Add new or change existent property.
[in] | propertyKey | Key of property. |
[in] | property | The actual property. |
[in] | contextName | Optional, default is empty string (default context). Context in which the property is set. |
[in] | fallBackOnDefaultContext | Optional, default is false. Set property in default context if given context does not exist. |
Reimplemented from mitk::PropertyList.
Definition at line 83 of file mitkLabel.cpp.
References Modified().
Referenced by mitk::DICOMSegmentationIO::Read(), SetCenterOfMassCoordinates(), SetCenterOfMassIndex(), SetColor(), mitk::DICOMSegmentationPropertyHelper::SetDICOMSegmentProperties(), SetLayer(), and SetValue().
void mitk::Label::SetValue | ( | PixelType | pixelValue | ) |
Definition at line 158 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), mitk::UShortProperty::New(), SetProperty(), and mitk::GenericProperty< T >::SetValue().
Referenced by Label(), and mitk::DICOMSegmentationIO::Read().
void mitk::Label::SetVisible | ( | bool | visible | ) |
Definition at line 110 of file mitkLabel.cpp.
References mitk::PropertyList::GetProperty(), mitk::PropertyList::SetBoolProperty(), and mitk::GenericProperty< T >::SetValue().
Referenced by Label(), and QmitkLabelSetWidget::~QmitkLabelSetWidget().
|
static |
The maximum value a label can get: Since the value is of type unsigned short MAX_LABEL_VALUE = 65535.
Definition at line 41 of file mitkLabel.h.
Referenced by mitk::LabelSet::AddLabel(), and mitk::LabelSetImage::InitializeByLabeledImageProcessing().