|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
A data structure describing a label in a multi-label segmentation. More...
#include <mitkLabel.h>


Public Types | |
| enum class | AlgorithmType { Undefined , MANUAL , SEMIAUTOMATIC , AUTOMATIC } |
| Enumeration describing how a label was created or refined. More... | |
| typedef unsigned short | PixelType |
| Pixel type used for label values (unsigned short). More... | |
Public Types inherited from mitk::PropertyList | |
| typedef std::map< std::string, BaseProperty::Pointer > | PropertyMap |
| typedef std::pair< std::string, BaseProperty::Pointer > | PropertyMapElementType |
Public Member Functions | |
| mitkClassMacro (Label, mitk::PropertyList) | |
| mitkNewMacro2Param (Self, PixelType, const std::string &) | |
| void | SetLocked (bool locked) |
| Sets the lock state of the label. More... | |
| bool | GetLocked () const |
| Returns the lock state of the label. More... | |
| void | SetVisible (bool visible) |
| Sets the visibility state of the label for rendering. More... | |
| bool | GetVisible () const |
| Returns the visibility state of the label. More... | |
| void | SetOpacity (float opacity) |
| Sets the opacity of the label for rendering. More... | |
| float | GetOpacity () const |
| Returns the opacity of the label. More... | |
| void | SetName (const std::string &name) |
| Sets the (class) name of the label. More... | |
| std::string | GetName () const |
| Returns the (class) name of the label. More... | |
| void | SetTrackingID (const std::string &trackingID) |
| Sets the DICOM tracking ID of the label. More... | |
| std::string | GetTrackingID () const |
| Returns the DICOM tracking ID of the label. More... | |
| bool | HasTrackingID () const |
| Returns whether a tracking ID property is set on the label. More... | |
| void | SetTrackingUID (const std::string &trackingUID) |
| Sets the DICOM tracking unique identifier (UID) of the label. More... | |
| std::string | GetTrackingUID () const |
| Returns the DICOM tracking unique identifier (UID) of the label. More... | |
| bool | HasTrackingUID () const |
| Returns whether a tracking UID property is set on the label. More... | |
| void | SetDescription (const std::string &description) |
| Sets a textual description for the label. More... | |
| std::string | GetDescription () const |
| Returns the textual description of the label. More... | |
| mitk::Point3D | GetCenterOfMassIndex () const |
| Returns the center of mass of the label as image index coordinates. More... | |
| mitk::Point3D | GetCenterOfMassCoordinates () const |
| Returns the center of mass of the label in world coordinates. More... | |
| void | ResetCenterOfMass () |
| Resets (clears) the center of mass properties. More... | |
| itk::ModifiedTimeType | GetCenterOfMassMTime () const |
| Returns the modification time of the last center of mass property update. More... | |
| void | UpdateCenterOfMass (const mitk::Point3D &index, const mitk::Point3D &coordinates) |
| Updates the center of mass with new index and world coordinates. More... | |
| void | SetColor (const mitk::Color &color) |
| Sets the display color of the label. More... | |
| const mitk::Color & | GetColor () const |
| Returns the display color of the label. More... | |
| void | SetValue (PixelType pixelValue) |
| Sets the pixel value that identifies this label in the segmentation image. More... | |
| PixelType | GetValue () const |
| Returns the pixel value that identifies this label in the segmentation image. More... | |
| void | SetAlgorithmType (AlgorithmType algoType) |
| Sets the algorithm type that was used to create or modify this label. More... | |
| void | SetAlgorithmTypeStr (const std::string &algoType) |
| Sets the algorithm type from a string representation. More... | |
| AlgorithmType | GetAlgorithmType () const |
| Returns the algorithm type used to create or modify this label. More... | |
| std::string | GetAlgorithmTypeStr () const |
| Returns the algorithm type as a string. More... | |
| void | SetAlgorithmName (const std::string &algoName) |
| Sets the name of the algorithm used to create or modify this label. More... | |
| std::string | GetAlgorithmName () const |
| Returns the name of the algorithm used to create or modify this label. More... | |
| bool | HasAlgorithmName () const |
| Returns whether an algorithm name property is set on the label. More... | |
| void | AddToolUse (AlgorithmType algoType, const std::string &algoName) |
| Records that a tool/operation contributed to this label, updating algorithm type and name. More... | |
| void | MergeToolUses (const Label *other) |
| Absorbs another label's recorded provenance (algorithm type and tool names) into this one. More... | |
| void | SetAnatomicRegion (const DICOMCodeSequenceWithModifiers &code, std::size_t index=0) |
| Sets an anatomic region code at the specified index. More... | |
| DICOMCodeSequenceWithModifiers | GetAnatomicRegion (std::size_t index=0) const |
| Gets an anatomic region code at the specified index. More... | |
| std::size_t | GetAnatomicRegionCount () const |
| Gets the number of anatomic region codes stored. More... | |
| void | RemoveAnatomicRegion (std::size_t index) |
| Removes an anatomic region code at the specified index. More... | |
| void | SetPrimaryAnatomicStructure (const DICOMCodeSequenceWithModifiers &code, std::size_t index=0) |
| Sets a primary anatomic structure code at the specified index. More... | |
| DICOMCodeSequenceWithModifiers | GetPrimaryAnatomicStructure (std::size_t index=0) const |
| Gets a primary anatomic structure code at the specified index. More... | |
| std::size_t | GetPrimaryAnatomicStructureCount () const |
| Gets the number of primary anatomic structure codes stored. More... | |
| void | RemovePrimaryAnatomicStructure (std::size_t index) |
| Removes a primary anatomic structure code at the specified index. More... | |
| void | SetSegmentedPropertyCategory (const DICOMCodeSequence &code) |
| Sets the segmented property category code. More... | |
| std::optional< DICOMCodeSequence > | GetSegmentedPropertyCategory () const |
| Gets the segmented property category code. More... | |
| void | SetSegmentedPropertyType (const DICOMCodeSequenceWithModifiers &code) |
| Sets the segmented property type code with optional modifiers. More... | |
| std::optional< DICOMCodeSequenceWithModifiers > | GetSegmentedPropertyType () const |
| Gets the segmented property type code with modifiers. More... | |
| void | SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
| Sets a property on this label. More... | |
| BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override |
| Returns a const pointer to the property with the given key. More... | |
| BaseProperty * | GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override |
| Returns a non-const pointer to the property with the given key. More... | |
| void | Modified () |
| Marks this label as modified. More... | |
| void | Update (const Label *templateLabel, bool updateLabelValue=false) |
| Function updates the property values of a label provided as templates. If a property exists in the destination label only the value will be updated (therefor observers and pointers stay valid). If the property does not exist, it will be cloned and added. No properties will be removed. More... | |
| Label () | |
| Default constructor. Creates a label with default properties. More... | |
| Label (PixelType value, const std::string &name) | |
| Constructor that creates a label with a specified pixel value and name. More... | |
| ~Label () override | |
| Destructor. More... | |
Public Member Functions inherited from mitk::PropertyList | |
| mitkClassMacroItkParent (PropertyList, itk::Object) | |
| Pointer | Clone () const |
| std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override |
| Retrieve all property keys. More... | |
| std::vector< std::string > | GetPropertyContextNames () const override |
| Return available property context names. More... | |
| void | RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
| Remove a property from the list by key. More... | |
| mitk::BaseProperty * | GetProperty (const std::string &propertyKey) const |
| Get a property by its name. More... | |
| void | ReplaceProperty (const std::string &propertyKey, BaseProperty *property) |
| Replace a property object in the list by a new one. More... | |
| void | ConcatenatePropertyList (PropertyList *pList, bool replace=false) |
| Merge another PropertyList into this one. More... | |
| template<typename T > | |
| bool | GetPropertyValue (const char *propertyKey, T &value) const |
| Convenience access method for GenericProperty<T> properties. 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 GetBoolProperty(). 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 SetBoolProperty(). 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 GetIntProperty(). 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 SetIntProperty(). 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 GetFloatProperty(). 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 SetFloatProperty(). 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 GetDoubleProperty(). 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 SetDoubleProperty(). 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 GetStringProperty(). 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 SetStringProperty() accepting a C-string. More... | |
| void | Set (const char *propertyKey, const std::string &stringValue) |
| Shortcut for SetStringProperty() accepting a std::string. More... | |
| itk::ModifiedTimeType | GetMTime () const override |
| Get the modification timestamp of the list. More... | |
| bool | DeleteProperty (const std::string &propertyKey) |
| Remove a property from the list/map by key. More... | |
| const PropertyMap * | GetMap () const |
| Get a read-only pointer to the internal property map. More... | |
| bool | IsEmpty () const |
| Check whether the property list contains no properties. More... | |
| virtual void | Clear () |
| Remove all properties from the list. More... | |
| void | ToJSON (nlohmann::json &j) const |
| Serialize the property list to JSON. More... | |
| void | FromJSON (const nlohmann::json &j) |
| Deserialize the property list from JSON. More... | |
Public Member Functions inherited from mitk::IPropertyOwner | |
| ~IPropertyOwner () override | |
| virtual bool | PropertyIsOwned (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const |
| Checks if a certain property exists. More... | |
Public Member Functions inherited from mitk::IPropertyProvider | |
| virtual | ~IPropertyProvider () |
| Virtual destructor. More... | |
Static Public Member Functions | |
| static Pointer | New () |
Static Public Member Functions inherited from mitk::PropertyList | |
| static Pointer | New () |
Static Public Attributes | |
| static const PixelType | MAX_LABEL_VALUE |
| The maximum value a label can have (65535 for unsigned short). More... | |
| static constexpr PixelType | UNLABELED_VALUE |
| Value indicating pixels that are not labeled at all (background). More... | |
Protected Member Functions | |
| void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
| Label (const Label &other) | |
| mitkCloneMacro (Label) | |
| void | SetCenterOfMassIndex (const mitk::Point3D ¢er) |
| void | SetCenterOfMassCoordinates (const mitk::Point3D ¢er) |
| mitk::BaseProperty * | GetProperty (const std::string &propertyKey) const |
| Get a property by its name. More... | |
Protected Member Functions inherited from mitk::PropertyList | |
| PropertyList () | |
| PropertyList (const Self &other) | |
| ~PropertyList () override | |
| mitkCloneMacro (Self) | |
Additional Inherited Members | |
Protected Attributes inherited from mitk::PropertyList | |
| PropertyMap | m_Properties |
| Map of properties. More... | |
A data structure describing a label in a multi-label segmentation.
Label is the central descriptor for labeled regions in a MultiLabelSegmentation. It stores metadata such as name, color, visibility, lock state, opacity, and DICOM code sequences (anatomic region, primary anatomic structure, segmented property category/type). Label inherits from PropertyList, so all metadata is stored as properties.
Each label has a unique pixel value (PixelType) that identifies it within the segmentation image. Labels can be locked to prevent overwriting and can be set visible/invisible for rendering.
Definition at line 100 of file mitkLabel.h.
| typedef unsigned short mitk::Label::PixelType |
Pixel type used for label values (unsigned short).
Definition at line 106 of file mitkLabel.h.
|
strong |
Enumeration describing how a label was created or refined.
| Enumerator | |
|---|---|
| Undefined | Undefined/unknown algorithm type. |
| MANUAL | Label created manually by user with simple tools (e.g. Add tool). |
| SEMIAUTOMATIC | Label created or refined with algorithmic assistance (e.g. nnInteractive). |
| AUTOMATIC | Label created fully automatically by an algorithm (e.g. nnUNet). |
Definition at line 282 of file mitkLabel.h.
| mitk::Label::Label | ( | ) |
Default constructor. Creates a label with default properties.
Defaults: locked=true, visible=true, opacity=0.6, color=white, name="Unknown label name", value=UNLABELED_VALUE.
| mitk::Label::Label | ( | PixelType | value, |
| const std::string & | name | ||
| ) |
Constructor that creates a label with a specified pixel value and name.
| [in] | value | The pixel value for this label. |
| [in] | name | The name for this label. |
|
override |
Destructor.
|
protected |
| void mitk::Label::AddToolUse | ( | AlgorithmType | algoType, |
| const std::string & | algoName | ||
| ) |
Records that a tool/operation contributed to this label, updating algorithm type and name.
Type: the first contribution to a still-Undefined label defines its type; any type already present (a genuine MANUAL loaded from a DICOM SEG, or a prior tool's type) is preserved, and a later tool of a different type mixes the result to SEMIAUTOMATIC. Name: for internally-created labels, algorithm_name starts with the "MITK Segmentation" prefix; the first dedicated tool is appended after ": " and further tools after "|" (e.g. "MITK Segmentation: nnUNet|Paint"). A name still equal to just the prefix means no dedicated tool has been recorded yet.
| std::string mitk::Label::GetAlgorithmName | ( | ) | const |
Returns the name of the algorithm used to create or modify this label.
| AlgorithmType mitk::Label::GetAlgorithmType | ( | ) | const |
Returns the algorithm type used to create or modify this label.
| std::string mitk::Label::GetAlgorithmTypeStr | ( | ) | const |
Returns the algorithm type as a string.
| DICOMCodeSequenceWithModifiers mitk::Label::GetAnatomicRegion | ( | std::size_t | index = 0 | ) | const |
Gets an anatomic region code at the specified index.
| index | The index of the code to retrieve (default: 0) |
| std::size_t mitk::Label::GetAnatomicRegionCount | ( | ) | const |
Gets the number of anatomic region codes stored.
| mitk::Point3D mitk::Label::GetCenterOfMassCoordinates | ( | ) | const |
Returns the center of mass of the label in world coordinates.
| mitk::Point3D mitk::Label::GetCenterOfMassIndex | ( | ) | const |
Returns the center of mass of the label as image index coordinates.
| itk::ModifiedTimeType mitk::Label::GetCenterOfMassMTime | ( | ) | const |
Returns the modification time of the last center of mass property update.
| const mitk::Color& mitk::Label::GetColor | ( | ) | const |
Returns the display color of the label.
|
overridevirtual |
Returns a const pointer to the property with the given key.
| [in] | propertyKey | The key of the property. |
| [in] | contextName | Optional context name (default: empty). |
| [in] | fallBackOnDefaultContext | If true, fall back to the default context (default: true). |
Reimplemented from mitk::PropertyList.
| std::string mitk::Label::GetDescription | ( | ) | const |
Returns the textual description of the label.
| bool mitk::Label::GetLocked | ( | ) | const |
Returns the lock state of the label.
| std::string mitk::Label::GetName | ( | ) | const |
Returns the (class) name of the label.
|
overridevirtual |
Returns a non-const pointer to the property with the given key.
| [in] | propertyKey | The key of the property. |
| [in] | contextName | Optional context name (default: empty). |
| [in] | fallBackOnDefaultContext | If true, fall back to the default context (default: true). |
Reimplemented from mitk::PropertyList.
| float mitk::Label::GetOpacity | ( | ) | const |
Returns the opacity of the label.
| DICOMCodeSequenceWithModifiers mitk::Label::GetPrimaryAnatomicStructure | ( | std::size_t | index = 0 | ) | const |
Gets a primary anatomic structure code at the specified index.
| index | The index of the code to retrieve (default: 0) |
| std::size_t mitk::Label::GetPrimaryAnatomicStructureCount | ( | ) | const |
Gets the number of primary anatomic structure codes stored.
|
protected |
Get a property by its name.
| [in] | propertyKey | The key identifying the property. |
nullptr if no property with the given key exists. | std::optional<DICOMCodeSequence> mitk::Label::GetSegmentedPropertyCategory | ( | ) | const |
Gets the segmented property category code.
| std::optional<DICOMCodeSequenceWithModifiers> mitk::Label::GetSegmentedPropertyType | ( | ) | const |
Gets the segmented property type code with modifiers.
| std::string mitk::Label::GetTrackingID | ( | ) | const |
Returns the DICOM tracking ID of the label.
| std::string mitk::Label::GetTrackingUID | ( | ) | const |
Returns the DICOM tracking unique identifier (UID) of the label.
| PixelType mitk::Label::GetValue | ( | ) | const |
Returns the pixel value that identifies this label in the segmentation image.
| bool mitk::Label::GetVisible | ( | ) | const |
Returns the visibility state of the label.
| bool mitk::Label::HasAlgorithmName | ( | ) | const |
Returns whether an algorithm name property is set on the label.
Distinguishes "property absent" from "property present" (GetAlgorithmName returns the "MITK Segmentation" fallback in the absent case, so it cannot make this distinction). Persistence readers and AddToolUse only set the property when there is a real name to record, so a false result means no algorithm name was ever recorded for this label.
| bool mitk::Label::HasTrackingID | ( | ) | const |
Returns whether a tracking ID property is set on the label.
Distinguishes "property absent" from "property present but empty". GetTrackingID returns "" in both cases. Persistence readers set the property only when the source carried a non-empty value, so a true result indicates a real tracking identifier on the source.
| bool mitk::Label::HasTrackingUID | ( | ) | const |
Returns whether a tracking UID property is set on the label.
Distinguishes "property absent" from "property present but empty" (see HasTrackingID). GetTrackingUID returns "" in both cases. Persistence readers set the property only when the source carried a non-empty value, so a true result indicates a real tracking UID on the source.
| void mitk::Label::MergeToolUses | ( | const Label * | other | ) |
Absorbs another label's recorded provenance (algorithm type and tool names) into this one.
Intended for content-merging operations (e.g. merging labels): the target should reflect that it now contains the source's algorithmically-derived content. The source's type is mixed into this label's type with the same rule as AddToolUse (a differing defined type yields SEMIAUTOMATIC), and each tool name recorded on the source is appended (de-duplicated) to this label's tool chain.
| [in] | other | The source label whose provenance is absorbed. Must not be null. |
| mitk::Label::mitkClassMacro | ( | Label | , |
| mitk::PropertyList | |||
| ) |
|
protected |
| mitk::Label::mitkNewMacro2Param | ( | Self | , |
| PixelType | , | ||
| const std::string & | |||
| ) |
|
inline |
Marks this label as modified.
Definition at line 475 of file mitkLabel.h.
|
static |
|
overrideprotected |
| void mitk::Label::RemoveAnatomicRegion | ( | std::size_t | index | ) |
Removes an anatomic region code at the specified index.
| index | The index of the code to remove |
| void mitk::Label::RemovePrimaryAnatomicStructure | ( | std::size_t | index | ) |
Removes a primary anatomic structure code at the specified index.
| index | The index of the code to remove |
| void mitk::Label::ResetCenterOfMass | ( | ) |
Resets (clears) the center of mass properties.
| void mitk::Label::SetAlgorithmName | ( | const std::string & | algoName | ) |
Sets the name of the algorithm used to create or modify this label.
| [in] | algoName | The algorithm name string. |
| void mitk::Label::SetAlgorithmType | ( | AlgorithmType | algoType | ) |
Sets the algorithm type that was used to create or modify this label.
| [in] | algoType | The algorithm type. |
| void mitk::Label::SetAlgorithmTypeStr | ( | const std::string & | algoType | ) |
Sets the algorithm type from a string representation.
| [in] | algoType | String representation ("MANUAL", "SEMIAUTOMATIC", "AUTOMATIC", or "Undefined"). |
| void mitk::Label::SetAnatomicRegion | ( | const DICOMCodeSequenceWithModifiers & | code, |
| std::size_t | index = 0 |
||
| ) |
Sets an anatomic region code at the specified index.
| code | The DICOMCodeSequenceWithModifiers representing the anatomic region |
| index | The index at which to store the code (default: 0) |
|
protected |
|
protected |
| void mitk::Label::SetColor | ( | const mitk::Color & | color | ) |
Sets the display color of the label.
| [in] | color | The RGB color to use for rendering this label. |
| void mitk::Label::SetDescription | ( | const std::string & | description | ) |
Sets a textual description for the label.
| [in] | description | The description string. |
| void mitk::Label::SetLocked | ( | bool | locked | ) |
Sets the lock state of the label.
| [in] | locked | If true, the label is locked and its pixels cannot be overwritten by other operations that respect locks. |
| void mitk::Label::SetName | ( | const std::string & | name | ) |
Sets the (class) name of the label.
| [in] | name | The name string, e.g. "Liver" or "Tumor". |
| void mitk::Label::SetOpacity | ( | float | opacity | ) |
Sets the opacity of the label for rendering.
| [in] | opacity | Opacity value in [0.0, 1.0]. Default is 0.6. |
| void mitk::Label::SetPrimaryAnatomicStructure | ( | const DICOMCodeSequenceWithModifiers & | code, |
| std::size_t | index = 0 |
||
| ) |
Sets a primary anatomic structure code at the specified index.
| code | The DICOMCodeSequenceWithModifiers representing the primary anatomic structure |
| index | The index at which to store the code (default: 0) |
|
overridevirtual |
Sets a property on this label.
| [in] | propertyKey | The key of the property. |
| [in] | property | Pointer to the property to set. |
| [in] | contextName | Optional context name (default: empty). |
| [in] | fallBackOnDefaultContext | If true, fall back to the default context (default: false). |
Reimplemented from mitk::PropertyList.
| void mitk::Label::SetSegmentedPropertyCategory | ( | const DICOMCodeSequence & | code | ) |
Sets the segmented property category code.
| code | The DICOMCodeSequence representing the segmented property category |
| void mitk::Label::SetSegmentedPropertyType | ( | const DICOMCodeSequenceWithModifiers & | code | ) |
Sets the segmented property type code with optional modifiers.
| code | The DICOMCodeSequenceWithModifiers representing the segmented property type |
| void mitk::Label::SetTrackingID | ( | const std::string & | trackingID | ) |
Sets the DICOM tracking ID of the label.
| [in] | trackingID | The tracking ID string. |
| void mitk::Label::SetTrackingUID | ( | const std::string & | trackingUID | ) |
Sets the DICOM tracking unique identifier (UID) of the label.
| [in] | trackingUID | The tracking UID string. |
| void mitk::Label::SetValue | ( | PixelType | pixelValue | ) |
Sets the pixel value that identifies this label in the segmentation image.
| [in] | pixelValue | The pixel value for this label. |
| void mitk::Label::SetVisible | ( | bool | visible | ) |
Sets the visibility state of the label for rendering.
| [in] | visible | If true, the label is rendered visibly. |
| void mitk::Label::Update | ( | const Label * | templateLabel, |
| bool | updateLabelValue = false |
||
| ) |
Function updates the property values of a label provided as templates. If a property exists in the destination label only the value will be updated (therefor observers and pointers stay valid). If the property does not exist, it will be cloned and added. No properties will be removed.
| templateLabel | Label instance that provides the new values for properties |
| updateLabelValue | Indicate if also the label value should be updated. |
| void mitk::Label::UpdateCenterOfMass | ( | const mitk::Point3D & | index, |
| const mitk::Point3D & | coordinates | ||
| ) |
Updates the center of mass with new index and world coordinates.
| [in] | index | The center of mass in image index coordinates. |
| [in] | coordinates | The center of mass in world coordinates. |
|
static |
The maximum value a label can have (65535 for unsigned short).
Definition at line 112 of file mitkLabel.h.
|
staticconstexpr |
Value indicating pixels that are not labeled at all (background).
Definition at line 115 of file mitkLabel.h.