Medical Imaging Interaction Toolkit  2024.12.99-ffdb615f
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  InteractionType { InteractionType::Point, InteractionType::Box, InteractionType::Scribble, InteractionType::Lasso }
 Specifies the types of interactions available. More...
 
enum  InteractionMode { InteractionMode::Default, InteractionMode::BlockLMBDisplayInteraction }
 Specifies the interaction modes for interactors. More...
 
enum  PromptType { PromptType::Positive, PromptType::Negative }
 Specifies the types of prompts used in nnInteractive. More...
 
enum  Backend { Backend::CUDA, Backend::CPU }
 Specifies the computation backends available for nnInteractive. More...
 
enum  ColorIntensity { ColorIntensity::Muted, ColorIntensity::Vibrant }
 Specifies the intensity of the colors used in an interaction. More...
 

Functions

const MITKPYTHONSEGMENTATION_EXPORT std::string & GetInteractionTypeAsString (InteractionType interactionType)
 Converts an InteractionType to a corresponding string representation. More...
 
const MITKPYTHONSEGMENTATION_EXPORT std::array< InteractionType, 4 > & GetAllInteractionTypes ()
 Returns all possible interaction types. More...
 
const MITKPYTHONSEGMENTATION_EXPORT std::string & GetPromptTypeAsString (PromptType promptType)
 Converts a PromptType to a corresponding string representation. More...
 
const MITKPYTHONSEGMENTATION_EXPORT std::array< PromptType, 2 > & GetAllPromptTypes ()
 Returns all possible prompt types. More...
 
const MITKPYTHONSEGMENTATION_EXPORT std::string & GetBackendAsString (Backend backend)
 Converts a Backend type to a corresponding string representation. More...
 
const MITKPYTHONSEGMENTATION_EXPORT std::array< Backend, 2 > & GetAllBackends ()
 Returns all possible backend types. More...
 
const MITKPYTHONSEGMENTATION_EXPORT 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()

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

Returns all possible backend types.

◆ GetAllInteractionTypes()

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

Returns all possible interaction types.

◆ GetAllPromptTypes()

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

Returns all possible prompt types.

◆ GetBackendAsString()

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

Converts a Backend type to a corresponding string representation.

◆ GetColor()

const MITKPYTHONSEGMENTATION_EXPORT 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()

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

Converts an InteractionType to a corresponding string representation.

◆ GetPromptTypeAsString()

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

Converts a PromptType to a corresponding string representation.