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

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

#include <mitkMultiLabelEvents.h>

Inheritance diagram for mitk::AnyGroupEvent:
Collaboration diagram for mitk::AnyGroupEvent:

Public Types

using GroupIndexType = std::size_t
 Type for group indices. More...
 
using Self = AnyGroupEvent
 
using Superclass = itk::ModifiedEvent
 

Public Member Functions

 AnyGroupEvent ()=default
 
 AnyGroupEvent (GroupIndexType groupID)
 Constructor with a specific group index. More...
 
 AnyGroupEvent (const Self &s)
 Copy constructor. More...
 
 ~AnyGroupEvent () 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 group index. More...
 
itk::EventObject * MakeObject () const override
 Creates a copy of this event. More...
 
void SetGroupID (GroupIndexType groupID)
 Sets the group index this event refers to. More...
 
GroupIndexType GetGroupID () const
 Returns the group index this event refers to. More...
 

Static Public Attributes

static const GroupIndexType ANY_GROUP
 Sentinel value indicating the event applies to any/all groups. More...
 

Detailed Description

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

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

See also
GroupAddedEvent, GroupModifiedEvent, GroupRemovedEvent, MultiLabelSegmentation

Definition at line 211 of file mitkMultiLabelEvents.h.

Member Typedef Documentation

◆ GroupIndexType

Type for group indices.

Definition at line 215 of file mitkMultiLabelEvents.h.

◆ Self

◆ Superclass

using mitk::AnyGroupEvent::Superclass = itk::ModifiedEvent

Definition at line 217 of file mitkMultiLabelEvents.h.

Constructor & Destructor Documentation

◆ AnyGroupEvent() [1/3]

mitk::AnyGroupEvent::AnyGroupEvent ( )
default

◆ AnyGroupEvent() [2/3]

mitk::AnyGroupEvent::AnyGroupEvent ( GroupIndexType  groupID)

Constructor with a specific group index.

Parameters
[in]groupIDThe group index this event refers to.

◆ AnyGroupEvent() [3/3]

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

Copy constructor.

◆ ~AnyGroupEvent()

mitk::AnyGroupEvent::~AnyGroupEvent ( )
override

Member Function Documentation

◆ CheckEvent()

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

Checks if a given event matches this event type and group index.

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

◆ GetEventName()

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

Returns the name of this event class.

◆ GetGroupID()

GroupIndexType mitk::AnyGroupEvent::GetGroupID ( ) const

Returns the group index this event refers to.

Returns
The group index, or ANY_GROUP if applicable to all groups.

◆ MakeObject()

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

Creates a copy of this event.

◆ SetGroupID()

void mitk::AnyGroupEvent::SetGroupID ( GroupIndexType  groupID)

Sets the group index this event refers to.

Parameters
[in]groupIDThe group index.

Member Data Documentation

◆ ANY_GROUP

const GroupIndexType mitk::AnyGroupEvent::ANY_GROUP
static

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

Definition at line 220 of file mitkMultiLabelEvents.h.


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