Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::AnyLabelEvent Class Reference

Base event class for all label-related events in a MultiLabelSegmentation. More...

#include <mitkMultiLabelEvents.h>

Inheritance diagram for mitk::AnyLabelEvent:
Collaboration diagram for mitk::AnyLabelEvent:

Public Types

using Self = AnyLabelEvent
 
using Superclass = itk::ModifiedEvent
 

Public Member Functions

 AnyLabelEvent ()=default
 
 AnyLabelEvent (Label::PixelType labelValue)
 Constructor with a specific label value. More...
 
 AnyLabelEvent (const Self &s)
 Copy constructor. More...
 
 ~AnyLabelEvent () override
 
const char * GetEventName () const override
 Returns the name of this event class. More...
 
bool CheckEvent (const itk::EventObject *e) const override
 Checks if a given event matches this event type and label value. More...
 
itk::EventObject * MakeObject () const override
 Creates a copy of this event. More...
 
void SetLabelValue (Label::PixelType labelValue)
 Sets the label value this event refers to. More...
 
Label::PixelType GetLabelValue () const
 Returns the label value this event refers to. More...
 

Static Public Attributes

static const mitk::Label::PixelType ANY_LABEL
 Sentinel value indicating the event applies to any/all labels. More...
 

Detailed Description

Base event class for all label-related events in a MultiLabelSegmentation.

This event carries a label value identifying which label the event refers to. Use the special ANY_LABEL value when adding an observer that should react to events for any label, not just a specific one.

See also
LabelAddedEvent, LabelModifiedEvent, LabelRemovedEvent, MultiLabelSegmentation

Definition at line 69 of file mitkMultiLabelEvents.h.

Member Typedef Documentation

◆ Self

◆ Superclass

using mitk::AnyLabelEvent::Superclass = itk::ModifiedEvent

Definition at line 73 of file mitkMultiLabelEvents.h.

Constructor & Destructor Documentation

◆ AnyLabelEvent() [1/3]

mitk::AnyLabelEvent::AnyLabelEvent ( )
default

◆ AnyLabelEvent() [2/3]

mitk::AnyLabelEvent::AnyLabelEvent ( Label::PixelType  labelValue)

Constructor with a specific label value.

Parameters
[in]labelValueThe label value this event refers to.

◆ AnyLabelEvent() [3/3]

mitk::AnyLabelEvent::AnyLabelEvent ( const Self &  s)

Copy constructor.

◆ ~AnyLabelEvent()

mitk::AnyLabelEvent::~AnyLabelEvent ( )
override

Member Function Documentation

◆ CheckEvent()

bool mitk::AnyLabelEvent::CheckEvent ( const itk::EventObject *  e) const
override

Checks if a given event matches this event type and label value.

Parameters
[in]eThe event to check against.
Returns
true if the event matches.

◆ GetEventName()

const char* mitk::AnyLabelEvent::GetEventName ( ) const
override

Returns the name of this event class.

◆ GetLabelValue()

Label::PixelType mitk::AnyLabelEvent::GetLabelValue ( ) const

Returns the label value this event refers to.

Returns
The label value, or ANY_LABEL if applicable to all labels.

◆ MakeObject()

itk::EventObject* mitk::AnyLabelEvent::MakeObject ( ) const
override

Creates a copy of this event.

◆ SetLabelValue()

void mitk::AnyLabelEvent::SetLabelValue ( Label::PixelType  labelValue)

Sets the label value this event refers to.

Parameters
[in]labelValueThe label value.

Member Data Documentation

◆ ANY_LABEL

const mitk::Label::PixelType mitk::AnyLabelEvent::ANY_LABEL
static

Sentinel value indicating the event applies to any/all labels.

Definition at line 76 of file mitkMultiLabelEvents.h.


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