Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitk::nnInteractive Namespace Reference

Classes

class  BoxInteractor
 nnInteractive interactor for drawing rectangular boxes. More...
 
class  Interactor
 Base class for all nnInteractive interactors. More...
 
class  LassoInteractor
 nnInteractive interactor for drawing contours. More...
 
class  PointInteractor
 nnInteractive interactor for placing individual points. More...
 
class  ScribbleInteractor
 nnInteractive interactor for freehand brushstrokes. More...
 

Enumerations

enum class  InteractionType { Point , Box , Scribble , Lasso }
 Specifies the types of interactions available. More...
 
enum class  InteractionMode { Default , BlockLMBDisplayInteraction }
 Specifies the interaction modes for interactors. More...
 
enum class  PromptType { Positive , Negative }
 Specifies the types of prompts used in nnInteractive. More...
 
enum class  Backend { CUDA , CPU }
 Specifies the computation backends available for nnInteractive. More...
 
enum class  ColorIntensity { Muted , Vibrant }
 Specifies the intensity of the colors used in an interaction. More...
 

Functions

MITKPYTHONSEGMENTATION_EXPORT const std::string & GetInteractionTypeAsString (InteractionType interactionType)
 Converts an InteractionType to a corresponding string representation. More...
 
MITKPYTHONSEGMENTATION_EXPORT const std::array< InteractionType, 4 > & GetAllInteractionTypes ()
 Returns all possible interaction types. More...
 
MITKPYTHONSEGMENTATION_EXPORT const std::string & GetPromptTypeAsString (PromptType promptType)
 Converts a PromptType to a corresponding string representation. More...
 
MITKPYTHONSEGMENTATION_EXPORT const std::array< PromptType, 2 > & GetAllPromptTypes ()
 Returns all possible prompt types. More...
 
MITKPYTHONSEGMENTATION_EXPORT const std::string & GetBackendAsString (Backend backend)
 Converts a Backend type to a corresponding string representation. More...
 
MITKPYTHONSEGMENTATION_EXPORT const std::array< Backend, 2 > & GetAllBackends ()
 Returns all possible backend types. More...
 
MITKPYTHONSEGMENTATION_EXPORT const ColorGetColor (PromptType promptType, ColorIntensity colorIntensity)
 Returns the color associated with a specific prompt type and color intensity. More...
 

Enumeration Type Documentation

◆ Backend

Specifies the computation backends available for nnInteractive.

Backends define the computational resources used, such as GPU (CUDA) or CPU for processing.

Note
Whenever modifying this enum class, make sure to also adapt its utility functions GetBackendAsString() and GetAllBackends().
See also
GetBackendAsString(), GetAllBackends()
Enumerator
CUDA 

CUDA backend for GPU computation (fast)

CPU 

Backend for CPU computation (slow)

Definition at line 96 of file mitknnInteractiveEnums.h.

◆ ColorIntensity

Specifies the intensity of the colors used in an interaction.

See also
GetColor()
Enumerator
Muted 

Muted color intensity

Vibrant 

Vibrant color intensity

Definition at line 114 of file mitknnInteractiveEnums.h.

◆ InteractionMode

Specifies the interaction modes for interactors.

Interaction modes define specific behaviors during interactions, such as blocking left mouse button display interactions resp. crosshair navigation.

Enumerator
Default 

Default interaction mode

BlockLMBDisplayInteraction 

Block left mouse button display interaction

Definition at line 55 of file mitknnInteractiveEnums.h.

◆ InteractionType

Specifies the types of interactions available.

Interaction types represent the different modes of interaction for prompting available in nnInteractive, each corresponding to a specific user action.

Note
Whenever modifying this enum class, make sure to also adapt its utility functions GetInteractionTypeAsString() and GetAllInteractionTypes().
See also
Interactor::Interactor(), GetInteractionTypeAsString(), GetAllInteractionTypes()
Enumerator
Point 

Interaction for placing individual points

Box 

Interaction for drawing rectangular boxes

Scribble 

Interaction for freehand brushstrokes

Lasso 

Interaction for drawing contours

Definition at line 34 of file mitknnInteractiveEnums.h.

◆ PromptType

Specifies the types of prompts used in nnInteractive.

Prompt types distinguish between positive and negative prompts, e.g., should the labeled region by an interaction be included in or excluded from the resulting segmentation.

Note
Whenever modifying this enum class, make sure to also adapt its utility functions GetPromptTypeAsString() and GetAllPromptTypes().
See also
GetPromptTypeAsString(), GetAllPromptTypes()
Enumerator
Positive 

Include region in segmentation

Negative 

Exclude region from segmentation

Definition at line 72 of file mitknnInteractiveEnums.h.

Function Documentation

◆ GetAllBackends()

MITKPYTHONSEGMENTATION_EXPORT const std::array<Backend, 2>& mitk::nnInteractive::GetAllBackends ( )

Returns all possible backend types.

◆ GetAllInteractionTypes()

MITKPYTHONSEGMENTATION_EXPORT const std::array<InteractionType, 4>& mitk::nnInteractive::GetAllInteractionTypes ( )

Returns all possible interaction types.

◆ GetAllPromptTypes()

MITKPYTHONSEGMENTATION_EXPORT const std::array<PromptType, 2>& mitk::nnInteractive::GetAllPromptTypes ( )

Returns all possible prompt types.

◆ GetBackendAsString()

MITKPYTHONSEGMENTATION_EXPORT const std::string& mitk::nnInteractive::GetBackendAsString ( Backend  backend)

Converts a Backend type to a corresponding string representation.

◆ GetColor()

MITKPYTHONSEGMENTATION_EXPORT const Color& mitk::nnInteractive::GetColor ( PromptType  promptType,
ColorIntensity  colorIntensity 
)

Returns the color associated with a specific prompt type and color intensity.

Use this function for color lookup to ensure a coherent color scheme across different interactors.

◆ GetInteractionTypeAsString()

MITKPYTHONSEGMENTATION_EXPORT const std::string& mitk::nnInteractive::GetInteractionTypeAsString ( InteractionType  interactionType)

Converts an InteractionType to a corresponding string representation.

◆ GetPromptTypeAsString()

MITKPYTHONSEGMENTATION_EXPORT const std::string& mitk::nnInteractive::GetPromptTypeAsString ( PromptType  promptType)

Converts a PromptType to a corresponding string representation.