Medical Imaging Interaction Toolkit
2023.12.00
Medical Imaging Interaction Toolkit
|
Manages and coordinates instances of mitk::Tool. More...
#include <mitkToolManager.h>
Public Types | |
typedef std::vector< Tool::Pointer > | ToolVectorType |
typedef std::vector< Tool::ConstPointer > | ToolVectorTypeConst |
typedef std::vector< DataNode * > | DataVectorType |
typedef std::map< DataNode *, unsigned long > | NodeTagMapType |
Public Member Functions | |
mitkClassMacroItkParent (ToolManager, itk::Object) | |
mitkNewMacro1Param (ToolManager, DataStorage *) | |
const ToolVectorTypeConst | GetTools () |
Gives you a list of all tools. This is const on purpose. More... | |
int | GetToolID (const Tool *tool) |
Tool * | GetToolById (int id) |
bool | ActivateTool (int id) |
template<class T > | |
int | GetToolIdByToolType () |
int | GetActiveToolID () |
Tool * | GetActiveTool () |
void | SetReferenceData (DataVectorType) |
Set a list of data/images as reference objects. More... | |
void | SetReferenceData (DataNode *) |
Set single data item/image as reference object. More... | |
void | SetWorkingData (DataVectorType) |
Set a list of data/images as working objects. More... | |
void | SetWorkingData (DataNode *) |
Set single data item/image as working object. More... | |
void | SetRoiData (DataVectorType) |
Set a list of data/images as roi objects. More... | |
void | SetRoiData (DataNode *) |
Set a single data item/image as roi object. More... | |
DataVectorType | GetReferenceData () |
Get the list of reference data. More... | |
DataNode * | GetReferenceData (int) |
Get the current reference data. More... | |
DataVectorType | GetWorkingData () |
Get the list of working data. More... | |
DataNode * | GetWorkingData (unsigned int) |
Get the current working data. More... | |
DataVectorType | GetRoiData () |
Get the current roi data. More... | |
DataNode * | GetRoiData (int idx) |
Get the roi data at position idx. More... | |
DataStorage::Pointer | GetDataStorage () const |
void | SetDataStorage (DataStorage &storage) |
TimePointType | GetCurrentTimePoint () const |
void | RegisterClient () |
Tell that someone is using tools. GUI elements should call this when they become active. This method increases an internal "client count". More... | |
void | UnregisterClient () |
Tell that someone is NOT using tools. GUI elements should call this when they become active. This method increases an internal "client count". More... | |
void | InitializeTools () |
Initialize all classes derived from mitk::Tool by itkObjectFactoy. More... | |
void | OnOneOfTheReferenceDataDeletedConst (const itk::Object *caller, const itk::EventObject &e) |
void | OnOneOfTheReferenceDataDeleted (itk::Object *caller, const itk::EventObject &e) |
void | OnOneOfTheWorkingDataDeletedConst (const itk::Object *caller, const itk::EventObject &e) |
void | OnOneOfTheWorkingDataDeleted (itk::Object *caller, const itk::EventObject &e) |
void | OnOneOfTheRoiDataDeletedConst (const itk::Object *caller, const itk::EventObject &e) |
void | OnOneOfTheRoiDataDeleted (itk::Object *caller, const itk::EventObject &e) |
void | OnToolErrorMessage (std::string s) |
Connected to tool's messages. More... | |
void | OnGeneralToolMessage (std::string s) |
Public Attributes | |
Message | NodePropertiesChanged |
Message | NewNodesGenerated |
Message1< DataVectorType * > | NewNodeObjectsGenerated |
Message | ActiveToolChanged |
Message | ReferenceDataChanged |
Message | WorkingDataChanged |
Message | RoiDataChanged |
Message | SelectedTimePointChanged |
Message1< std::string > | ToolErrorMessage |
Message1< std::string > | GeneralToolMessage |
Protected Member Functions | |
ToolManager (DataStorage *storage) | |
~ToolManager () override | |
void | OnNodeRemoved (const mitk::DataNode *node) |
Callback for NodeRemove events. More... | |
void | OnTimeChangedConst (const itk::Object *caller, const itk::EventObject &e) |
void | OnTimeChanged (itk::Object *caller, const itk::EventObject &e) |
void | EnsureTimeObservation () |
void | StopTimeObservation () |
Manages and coordinates instances of mitk::Tool.
There is a separate page describing the general design of QmitkSegmentationView: Technical design of QmitkSegmentation
This class creates and manages several instances of mitk::Tool.
Design descisions:
$Author$
Definition at line 80 of file mitkToolManager.h.
typedef std::vector<DataNode *> mitk::ToolManager::DataVectorType |
Definition at line 85 of file mitkToolManager.h.
typedef std::map<DataNode *, unsigned long> mitk::ToolManager::NodeTagMapType |
Definition at line 86 of file mitkToolManager.h.
typedef std::vector<Tool::Pointer> mitk::ToolManager::ToolVectorType |
Definition at line 83 of file mitkToolManager.h.
typedef std::vector<Tool::ConstPointer> mitk::ToolManager::ToolVectorTypeConst |
Definition at line 84 of file mitkToolManager.h.
|
protected |
You may specify a list of tool "groups" that should be available for this ToolManager. Every Tool can report its group as a string. This constructor will try to find the tool's group inside the supplied string. If there is a match, the tool is accepted. Effectively, you can provide a human readable list like "default, lymphnodevolumetry, oldERISstuff".
|
overrideprotected |
bool mitk::ToolManager::ActivateTool | ( | int | id | ) |
id | The tool to activate. Provide -1 for disabling any tools. Counting starts with 0. Registeres a listner for NodeRemoved event at DataStorage (see mitk::ToolManager::OnNodeRemoved). |
|
protected |
Tool* mitk::ToolManager::GetActiveTool | ( | ) |
int mitk::ToolManager::GetActiveToolID | ( | ) |
TimePointType mitk::ToolManager::GetCurrentTimePoint | ( | ) | const |
Get the current selected time point of the RenderManager
DataStorage::Pointer mitk::ToolManager::GetDataStorage | ( | ) | const |
DataVectorType mitk::ToolManager::GetReferenceData | ( | ) |
Get the list of reference data.
DataNode* mitk::ToolManager::GetReferenceData | ( | int | ) |
Get the current reference data.
DataVectorType mitk::ToolManager::GetRoiData | ( | ) |
Get the current roi data.
DataNode* mitk::ToolManager::GetRoiData | ( | int | idx | ) |
Get the roi data at position idx.
Tool* mitk::ToolManager::GetToolById | ( | int | id | ) |
id | The tool of interest. Counting starts with 0. |
int mitk::ToolManager::GetToolID | ( | const Tool * | tool | ) |
|
inline |
Definition at line 126 of file mitkToolManager.h.
const ToolVectorTypeConst mitk::ToolManager::GetTools | ( | ) |
Gives you a list of all tools. This is const on purpose.
DataVectorType mitk::ToolManager::GetWorkingData | ( | ) |
Get the list of working data.
DataNode* mitk::ToolManager::GetWorkingData | ( | unsigned int | ) |
Get the current working data.
void mitk::ToolManager::InitializeTools | ( | ) |
Initialize all classes derived from mitk::Tool by itkObjectFactoy.
mitk::ToolManager::mitkClassMacroItkParent | ( | ToolManager | , |
itk::Object | |||
) |
mitk::ToolManager::mitkNewMacro1Param | ( | ToolManager | , |
DataStorage * | |||
) |
void mitk::ToolManager::OnGeneralToolMessage | ( | std::string | s | ) |
|
protected |
Callback for NodeRemove events.
void mitk::ToolManager::OnOneOfTheReferenceDataDeleted | ( | itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
void mitk::ToolManager::OnOneOfTheReferenceDataDeletedConst | ( | const itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
void mitk::ToolManager::OnOneOfTheRoiDataDeleted | ( | itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
void mitk::ToolManager::OnOneOfTheRoiDataDeletedConst | ( | const itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
void mitk::ToolManager::OnOneOfTheWorkingDataDeleted | ( | itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
void mitk::ToolManager::OnOneOfTheWorkingDataDeletedConst | ( | const itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
|
protected |
|
protected |
Callback for time changed events
void mitk::ToolManager::OnToolErrorMessage | ( | std::string | s | ) |
Connected to tool's messages.
This method just resends error messages coming from any of the tools. This way clients (GUIs) only have to observe one message.
void mitk::ToolManager::RegisterClient | ( | ) |
Tell that someone is using tools. GUI elements should call this when they become active. This method increases an internal "client count".
void mitk::ToolManager::SetDataStorage | ( | DataStorage & | storage | ) |
void mitk::ToolManager::SetReferenceData | ( | DataNode * | ) |
Set single data item/image as reference object.
void mitk::ToolManager::SetReferenceData | ( | DataVectorType | ) |
Set a list of data/images as reference objects.
void mitk::ToolManager::SetRoiData | ( | DataNode * | ) |
Set a single data item/image as roi object.
void mitk::ToolManager::SetRoiData | ( | DataVectorType | ) |
Set a list of data/images as roi objects.
void mitk::ToolManager::SetWorkingData | ( | DataNode * | ) |
Set single data item/image as working object.
void mitk::ToolManager::SetWorkingData | ( | DataVectorType | ) |
Set a list of data/images as working objects.
|
protected |
void mitk::ToolManager::UnregisterClient | ( | ) |
Tell that someone is NOT using tools. GUI elements should call this when they become active. This method increases an internal "client count".
Message mitk::ToolManager::ActiveToolChanged |
Definition at line 92 of file mitkToolManager.h.
Message1<std::string> mitk::ToolManager::GeneralToolMessage |
Definition at line 99 of file mitkToolManager.h.
|
protected |
Definition at line 264 of file mitkToolManager.h.
|
protected |
Definition at line 265 of file mitkToolManager.h.
|
protected |
Definition at line 266 of file mitkToolManager.h.
|
protected |
Definition at line 279 of file mitkToolManager.h.
|
protected |
Definition at line 268 of file mitkToolManager.h.
|
protected |
Definition at line 269 of file mitkToolManager.h.
|
protected |
Definition at line 277 of file mitkToolManager.h.
|
protected |
Definition at line 274 of file mitkToolManager.h.
|
protected |
Definition at line 275 of file mitkToolManager.h.
|
protected |
Definition at line 262 of file mitkToolManager.h.
|
protected |
Definition at line 271 of file mitkToolManager.h.
|
protected |
Definition at line 272 of file mitkToolManager.h.
Message1<DataVectorType *> mitk::ToolManager::NewNodeObjectsGenerated |
Definition at line 90 of file mitkToolManager.h.
Message mitk::ToolManager::NewNodesGenerated |
Definition at line 89 of file mitkToolManager.h.
Message mitk::ToolManager::NodePropertiesChanged |
Definition at line 88 of file mitkToolManager.h.
Message mitk::ToolManager::ReferenceDataChanged |
Definition at line 93 of file mitkToolManager.h.
Message mitk::ToolManager::RoiDataChanged |
Definition at line 95 of file mitkToolManager.h.
Message mitk::ToolManager::SelectedTimePointChanged |
Definition at line 96 of file mitkToolManager.h.
Message1<std::string> mitk::ToolManager::ToolErrorMessage |
Definition at line 98 of file mitkToolManager.h.
Message mitk::ToolManager::WorkingDataChanged |
Definition at line 94 of file mitkToolManager.h.