|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
nnInteractive interactor for drawing rectangular boxes. More...
#include <mitknnInteractiveBoxInteractor.h>


Public Member Functions | |
| BoxInteractor () | |
| Constructs a BoxInteractor with InteractionType::Box. More... | |
| ~BoxInteractor () override | |
| Destructor. Calls OnReset() to clean up data nodes. More... | |
| bool | HasInteractions () const override |
| Checks whether any boxes have been drawn. More... | |
| const PlanarFigure * | GetLastBox () const |
| Returns the most recently completed box for the current prompt type. More... | |
| void | RemoveLastInteraction (PromptType promptType) override |
| Removes the most recently completed box for the given prompt type. More... | |
Public Member Functions inherited from mitk::nnInteractive::Interactor | |
| virtual | ~Interactor () |
| Destructor. More... | |
| InteractionType | GetType () const |
| Returns the interaction type associated with this interactor. More... | |
| void | SetToolManager (ToolManager *toolManager) |
| Sets the ToolManager for this interactor. More... | |
| void | HandleEvent (InteractionEvent *event) |
| Handles an interaction event. More... | |
| void | Enable (PromptType promptType) |
| Enables the interactor for the given prompt type. More... | |
| void | Disable () |
| Disables the interactor. More... | |
| bool | IsEnabled () const |
| Checks whether the interactor is currently enabled. More... | |
| void | Reset () |
| Resets the interactor to its initial state. More... | |
| std::string | GetIcon () const |
| Retrieves the SVG icon as a string from module resources. More... | |
| std::string | GetCursor (PromptType promptType) const |
| Retrieves the SVG cursor as a string from module resources based on PromptType. More... | |
Additional Inherited Members | |
Public Attributes inherited from mitk::nnInteractive::Interactor | |
| Message1< bool > | UpdatePreviewEvent |
| Event triggered after an interaction has occurred. More... | |
Protected Member Functions inherited from mitk::nnInteractive::Interactor | |
| Interactor (InteractionType type) | |
| Constructs an interactor with a given type. More... | |
| virtual void | OnSetToolManager () |
| Called when a ToolManager is assigned. More... | |
| virtual void | OnHandleEvent (InteractionEvent *event) |
| Called when an interaction event is received. More... | |
| ToolManager * | GetToolManager () const |
| Returns the ToolManager associated with this interactor. More... | |
| DataStorage * | GetDataStorage () const |
| Convenience method for accessing the DataStorage. More... | |
| PromptType | GetCurrentPromptType () const |
| Returns the currently active prompt type. More... | |
nnInteractive interactor for drawing rectangular boxes.
Boxes are managed as a list of PlanarRectangle data nodes, organized by PromptType. The currently drawn PlanarRectangle is stored in a separate data node until it is completed.
Interaction is handled through the PlanarFigureInteractor. Left mouse button display interaction (crosshair navigation) is blocked while this interactor is enabled, allowing plain left clicks for box placement.
Definition at line 37 of file mitknnInteractiveBoxInteractor.h.
| mitk::nnInteractive::BoxInteractor::BoxInteractor | ( | ) |
Constructs a BoxInteractor with InteractionType::Box.
|
override |
Destructor. Calls OnReset() to clean up data nodes.
| const PlanarFigure* mitk::nnInteractive::BoxInteractor::GetLastBox | ( | ) | const |
Returns the most recently completed box for the current prompt type.
nullptr if no boxes have been completed for the current prompt type.
|
overridevirtual |
Checks whether any boxes have been drawn.
true if at least one completed box exists for any prompt type, false otherwise. Implements mitk::nnInteractive::Interactor.
|
overridevirtual |
Removes the most recently completed box for the given prompt type.
Removes the last box node of promptType from the data storage. A no-op if no completed box exists for that prompt type. The in-progress "next box" node is left untouched.
| [in] | promptType | The prompt type whose last box should be removed. |
Implements mitk::nnInteractive::Interactor.