Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkLabelSet.h>
Public Types | |
typedef mitk::Label::PixelType | PixelType |
typedef std::map< PixelType, Label::Pointer > | LabelContainerType |
typedef LabelContainerType::const_iterator | LabelContainerConstIteratorType |
typedef LabelContainerType::iterator | LabelContainerIteratorType |
Public Member Functions | |
mitkClassMacroItkParent (LabelSet, itk::Object) | |
LabelContainerConstIteratorType | IteratorConstBegin () const |
Returns a const iterator poiting to the begining of the container. More... | |
LabelContainerConstIteratorType | IteratorConstEnd () const |
Returns a const iterator pointing to the end of the container. More... | |
LabelContainerIteratorType | IteratorBegin () |
Returns a iterator poiting to the begining of the container. More... | |
LabelContainerIteratorType | IteratorEnd () |
Returns a iterator pointing to the end of the container. More... | |
void | OnLabelModified () |
Recall itk::Object::Modified event from a label and send a ModifyLabelEvent. More... | |
void | SetLayer (unsigned int) |
void | SetActiveLabel (PixelType) |
void | RemoveLabel (PixelType) |
bool | ExistLabel (PixelType) |
void | AddLabel (mitk::Label *label) |
void | AddLabel (const std::string &name, const Color &color) |
void | RenameLabel (PixelType, const std::string &, const Color &) |
unsigned int | GetNumberOfLabels () const |
void | SetAllLabelsVisible (bool) |
void | SetAllLabelsLocked (bool) |
void | RemoveAllLabels () |
void | SetNextActiveLabel () |
Label * | GetActiveLabel () |
const Label * | GetActiveLabel () const |
Label * | GetLabel (PixelType pixelValue) |
const Label * | GetLabel (PixelType pixelValue) const |
virtual int | GetLayer () |
virtual int | GetLayer () const |
itkGetModifiableObjectMacro (LookupTable, mitk::LookupTable) | |
void | SetLookupTable (LookupTable *lut) |
void | UpdateLookupTable (PixelType pixelValue) |
Static Public Member Functions | |
static Pointer | New () |
Public Attributes | |
Message | AddLabelEvent |
AddLabelEvent is emitted whenever a new label has been added to the LabelSet. More... | |
Message | RemoveLabelEvent |
RemoveLabelEvent is emitted whenever a new label has been removed from the LabelSet. More... | |
Message | ModifyLabelEvent |
ModifyLabelEvent is emitted whenever a label has been modified from the LabelSet. More... | |
Message1< PixelType > | ActiveLabelEvent |
ActiveLabelEvent is emitted whenever a label has been set as active in the LabelSet. More... | |
Message | AllLabelsModifiedEvent |
AllLabelsModifiedEvent is emitted whenever a new label has been removed from the LabelSet. More... | |
Protected Member Functions | |
LabelSet () | |
LabelSet (const LabelSet &) | |
mitkCloneMacro (Self) | |
~LabelSet () override | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Protected Attributes | |
LabelContainerType | m_LabelContainer |
LookupTable::Pointer | m_LookupTable |
PixelType | m_ActiveLabelValue |
unsigned int | m_Layer |
Definition at line 33 of file mitkLabelSet.h.
typedef LabelContainerType::const_iterator mitk::LabelSet::LabelContainerConstIteratorType |
Definition at line 42 of file mitkLabelSet.h.
typedef LabelContainerType::iterator mitk::LabelSet::LabelContainerIteratorType |
Definition at line 43 of file mitkLabelSet.h.
typedef std::map<PixelType, Label::Pointer> mitk::LabelSet::LabelContainerType |
Definition at line 41 of file mitkLabelSet.h.
Definition at line 37 of file mitkLabelSet.h.
|
protected |
Definition at line 18 of file mitkLabelSet.cpp.
References m_LookupTable, mitk::LookupTable::MULTILABEL, and mitk::LookupTable::New().
|
protected |
Definition at line 29 of file mitkLabelSet.cpp.
References IteratorConstBegin(), IteratorConstEnd(), m_LabelContainer, and OnLabelModified().
|
overrideprotected |
Definition at line 24 of file mitkLabelSet.cpp.
References m_LabelContainer.
void mitk::LabelSet::AddLabel | ( | mitk::Label * | label | ) |
Definition at line 97 of file mitkLabelSet.cpp.
References AddLabelEvent, mitk::PropertyList::Clone(), m_LabelContainer, m_Layer, mitk::Label::MAX_LABEL_VALUE, OnLabelModified(), mitk::Message< A >::Send(), SetActiveLabel(), mitk::DICOMSegmentationPropertyHelper::SetDICOMSegmentProperties(), and UpdateLookupTable().
Referenced by AddLabel(), mitk::LabelSetImage::Concatenate(), and mitk::LabelSetImage::InitializeByLabeledImageProcessing().
void mitk::LabelSet::AddLabel | ( | const std::string & | name, |
const Color & | color | ||
) |
Definition at line 145 of file mitkLabelSet.cpp.
References AddLabel(), m_LabelContainer, and mitk::Label::New().
bool mitk::LabelSet::ExistLabel | ( | PixelType | pixelValue | ) |
Definition at line 91 of file mitkLabelSet.cpp.
References m_LabelContainer.
Referenced by RemoveLabel().
|
inline |
Definition at line 172 of file mitkLabelSet.h.
Referenced by mitk::Equal().
|
inline |
Definition at line 175 of file mitkLabelSet.h.
References mitkCloneMacro.
mitk::Label * mitk::LabelSet::GetLabel | ( | PixelType | pixelValue | ) |
Definition at line 277 of file mitkLabelSet.cpp.
References m_LabelContainer.
Referenced by mitk::LabelSetImage::CalculateCenterOfMassProcessing(), RenameLabel(), and UpdateLookupTable().
const mitk::Label * mitk::LabelSet::GetLabel | ( | PixelType | pixelValue | ) | const |
Definition at line 284 of file mitkLabelSet.cpp.
References m_LabelContainer.
|
virtual |
Referenced by mitk::Equal().
|
virtual |
unsigned int mitk::LabelSet::GetNumberOfLabels | ( | ) | const |
Definition at line 73 of file mitkLabelSet.cpp.
References m_LabelContainer.
Referenced by mitk::Equal().
mitk::LabelSet::LabelContainerIteratorType mitk::LabelSet::IteratorBegin | ( | ) |
Returns a iterator poiting to the begining of the container.
Definition at line 68 of file mitkLabelSet.cpp.
References m_LabelContainer.
Referenced by RemoveAllLabels().
mitk::LabelSet::LabelContainerConstIteratorType mitk::LabelSet::IteratorConstBegin | ( | ) | const |
Returns a const iterator poiting to the begining of the container.
Definition at line 58 of file mitkLabelSet.cpp.
References m_LabelContainer.
Referenced by mitk::LabelSetImage::Concatenate(), mitk::DICOMSegmentationPropertyHelper::DeriveDICOMSegmentationProperties(), mitk::Equal(), LabelSet(), mitk::DICOMSegmentationIO::Read(), QmitkLabelSetWidget::ResetAllTableWidgetItems(), and mitk::DICOMSegmentationIO::Write().
mitk::LabelSet::LabelContainerConstIteratorType mitk::LabelSet::IteratorConstEnd | ( | ) | const |
Returns a const iterator pointing to the end of the container.
Definition at line 53 of file mitkLabelSet.cpp.
References m_LabelContainer.
Referenced by mitk::LabelSetImage::Concatenate(), mitk::DICOMSegmentationPropertyHelper::DeriveDICOMSegmentationProperties(), mitk::Equal(), LabelSet(), mitk::DICOMSegmentationIO::Read(), RemoveAllLabels(), QmitkLabelSetWidget::ResetAllTableWidgetItems(), and mitk::DICOMSegmentationIO::Write().
mitk::LabelSet::LabelContainerIteratorType mitk::LabelSet::IteratorEnd | ( | ) |
Returns a iterator pointing to the end of the container.
Definition at line 63 of file mitkLabelSet.cpp.
References m_LabelContainer.
mitk::LabelSet::itkGetModifiableObjectMacro | ( | LookupTable | , |
mitk::LookupTable | |||
) |
mitk::LabelSet::mitkClassMacroItkParent | ( | LabelSet | , |
itk::Object | |||
) |
|
protected |
|
static |
void mitk::LabelSet::OnLabelModified | ( | ) |
Recall itk::Object::Modified event from a label and send a ModifyLabelEvent.
Definition at line 47 of file mitkLabelSet.cpp.
References ModifyLabelEvent, and mitk::Message< A >::Send().
Referenced by AddLabel(), and LabelSet().
|
overrideprotected |
Definition at line 172 of file mitkLabelSet.cpp.
void mitk::LabelSet::RemoveAllLabels | ( | ) |
Definition at line 205 of file mitkLabelSet.cpp.
References AllLabelsModifiedEvent, IteratorBegin(), IteratorConstEnd(), m_LabelContainer, RemoveLabelEvent, and mitk::Message< A >::Send().
void mitk::LabelSet::RemoveLabel | ( | PixelType | pixelValue | ) |
Definition at line 176 of file mitkLabelSet.cpp.
References ExistLabel(), m_ActiveLabelValue, m_LabelContainer, RemoveLabelEvent, mitk::Message< A >::Send(), and SetActiveLabel().
Referenced by mitk::LabelSetImage::RemoveLabels(), and QmitkLabelSetWidget::~QmitkLabelSetWidget().
void mitk::LabelSet::RenameLabel | ( | PixelType | pixelValue, |
const std::string & | name, | ||
const Color & | color | ||
) |
Definition at line 156 of file mitkLabelSet.cpp.
References GetLabel(), mitk::Label::SetColor(), mitk::DICOMSegmentationPropertyHelper::SetDICOMSegmentProperties(), and mitk::Label::SetName().
Referenced by QmitkLabelSetWidget::~QmitkLabelSetWidget().
void mitk::LabelSet::SetActiveLabel | ( | PixelType | pixelValue | ) |
Definition at line 84 of file mitkLabelSet.cpp.
References ActiveLabelEvent, m_ActiveLabelValue, and mitk::Message1< T, A >::Send().
Referenced by AddLabel(), mitk::LabelSetImage::MergeLabel(), mitk::LabelSetImage::MergeLabels(), RemoveLabel(), QmitkLabelSetWidget::SetDataStorage(), SetNextActiveLabel(), and QmitkLabelSetWidget::SetOrganColors().
void mitk::LabelSet::SetAllLabelsLocked | ( | bool | value | ) |
Definition at line 238 of file mitkLabelSet.cpp.
References AllLabelsModifiedEvent, m_LabelContainer, and mitk::Message< A >::Send().
Referenced by QmitkLabelSetWidget::~QmitkLabelSetWidget().
void mitk::LabelSet::SetAllLabelsVisible | ( | bool | value | ) |
Definition at line 248 of file mitkLabelSet.cpp.
References AllLabelsModifiedEvent, m_LabelContainer, mitk::Message< A >::Send(), and UpdateLookupTable().
Referenced by QmitkLabelSetWidget::~QmitkLabelSetWidget().
void mitk::LabelSet::SetLayer | ( | unsigned int | layer | ) |
Definition at line 78 of file mitkLabelSet.cpp.
References m_Layer.
void mitk::LabelSet::SetLookupTable | ( | mitk::LookupTable * | lut | ) |
Definition at line 166 of file mitkLabelSet.cpp.
References m_LookupTable.
void mitk::LabelSet::SetNextActiveLabel | ( | ) |
Definition at line 216 of file mitkLabelSet.cpp.
References m_ActiveLabelValue, m_LabelContainer, and SetActiveLabel().
void mitk::LabelSet::UpdateLookupTable | ( | PixelType | pixelValue | ) |
Definition at line 261 of file mitkLabelSet.cpp.
References mitk::Label::GetColor(), GetLabel(), mitk::Label::GetOpacity(), and m_LookupTable.
Referenced by AddLabel(), QmitkLabelSetWidget::GetLabelStringList(), SetAllLabelsVisible(), and QmitkLabelSetWidget::~QmitkLabelSetWidget().
ActiveLabelEvent is emitted whenever a label has been set as active in the LabelSet.
Definition at line 87 of file mitkLabelSet.h.
Referenced by SetActiveLabel().
Message mitk::LabelSet::AddLabelEvent |
AddLabelEvent is emitted whenever a new label has been added to the LabelSet.
Observers should register to this event by calling myLabelSet->AddLabelEvent.AddListener(myObject, MyObject::MyMethod). After registering, myObject->MyMethod() will be called every time a new label has been added to the LabelSet. Observers should unregister by calling myLabelSet->AddLabelEvent.RemoveListener(myObject, MyObject::MyMethod).
member variable is not needed to be locked in multi-threaded scenarios since the LabelSetEvent is a typedef for a Message1 object which is thread safe
Definition at line 56 of file mitkLabelSet.h.
Referenced by AddLabel().
Message mitk::LabelSet::AllLabelsModifiedEvent |
AllLabelsModifiedEvent is emitted whenever a new label has been removed from the LabelSet.
Observers should register to this event by calling myLabelSet->AllLabelsModifiedEvent.AddListener(myObject, MyObject::MyMethod). After registering, myObject->MyMethod() will be called every time a new label has been removed from the LabelSet. Observers should unregister by calling myLabelSet->AllLabelsModifiedEvent.RemoveListener(myObject, MyObject::MyMethod).
member variable is not needed to be locked in multi-threaded scenarios since the LabelSetEvent is a typedef for a Message object which is thread safe
Definition at line 101 of file mitkLabelSet.h.
Referenced by RemoveAllLabels(), SetAllLabelsLocked(), and SetAllLabelsVisible().
|
protected |
Definition at line 212 of file mitkLabelSet.h.
Referenced by RemoveLabel(), SetActiveLabel(), and SetNextActiveLabel().
|
protected |
Definition at line 208 of file mitkLabelSet.h.
Referenced by AddLabel(), ExistLabel(), GetLabel(), GetNumberOfLabels(), IteratorBegin(), IteratorConstBegin(), IteratorConstEnd(), IteratorEnd(), LabelSet(), RemoveAllLabels(), RemoveLabel(), SetAllLabelsLocked(), SetAllLabelsVisible(), SetNextActiveLabel(), and ~LabelSet().
|
protected |
Definition at line 214 of file mitkLabelSet.h.
Referenced by AddLabel(), and SetLayer().
|
protected |
Definition at line 210 of file mitkLabelSet.h.
Referenced by LabelSet(), SetLookupTable(), and UpdateLookupTable().
Message mitk::LabelSet::ModifyLabelEvent |
ModifyLabelEvent is emitted whenever a label has been modified from the LabelSet.
Observers should register to this event by calling myLabelSet->ModifyLabelEvent.AddListener(myObject, MyObject::MyMethod). After registering, myObject->MyMethod() will be called every time a new label has been removed from the LabelSet. Observers should unregister by calling myLabelSet->ModifyLabelEvent.RemoveListener(myObject, MyObject::MyMethod).
member variable is not needed to be locked in multi-threaded scenarios since the LabelSetEvent is a typedef for a Message object which is thread safe
Definition at line 82 of file mitkLabelSet.h.
Referenced by OnLabelModified().
Message mitk::LabelSet::RemoveLabelEvent |
RemoveLabelEvent is emitted whenever a new label has been removed from the LabelSet.
Observers should register to this event by calling myLabelSet->RemoveLabelEvent.AddListener(myObject, MyObject::MyMethod). After registering, myObject->MyMethod() will be called every time a new label has been removed from the LabelSet. Observers should unregister by calling myLabelSet->RemoveLabelEvent.RemoveListener(myObject, MyObject::MyMethod).
member variable is not needed to be locked in multi-threaded scenarios since the LabelSetEvent is a typedef for a Message object which is thread safe
Definition at line 69 of file mitkLabelSet.h.
Referenced by RemoveAllLabels(), and RemoveLabel().