Medical Imaging Interaction Toolkit
2016.11.0
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 Attributes | |
Message | NodePropertiesChanged |
Message | NewNodesGenerated |
Message1< DataVectorType * > | NewNodeObjectsGenerated |
Message | ActiveToolChanged |
Message | ReferenceDataChanged |
Message | WorkingDataChanged |
Message | RoiDataChanged |
Message1< std::string > | ToolErrorMessage |
Message1< std::string > | GeneralToolMessage |
Protected Member Functions | |
ToolManager (DataStorage *storage) | |
virtual | ~ToolManager () |
void | OnNodeRemoved (const mitk::DataNode *node) |
Callback for NodeRemove events. More... | |
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 86 of file mitkToolManager.h.
typedef std::vector<DataNode *> mitk::ToolManager::DataVectorType |
Definition at line 91 of file mitkToolManager.h.
typedef std::map<DataNode *, unsigned long> mitk::ToolManager::NodeTagMapType |
Definition at line 92 of file mitkToolManager.h.
typedef std::vector<Tool::Pointer> mitk::ToolManager::ToolVectorType |
Definition at line 89 of file mitkToolManager.h.
typedef std::vector<Tool::ConstPointer> mitk::ToolManager::ToolVectorTypeConst |
Definition at line 90 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".
Definition at line 31 of file mitkToolManager.cpp.
References mitk::CoreObjectFactory::GetInstance(), and InitializeTools().
|
protectedvirtual |
Definition at line 39 of file mitkToolManager.cpp.
References GetDataStorage(), and OnNodeRemoved().
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). |
Definition at line 123 of file mitkToolManager.cpp.
References GetData(), GetDataStorage(), us::GetModuleContext(), OnNodeRemoved(), and ModuleContext::RegisterService().
Referenced by QmitkSurfaceStampWidget::OnStamp(), QmitkMaskStampWidget::QmitkMaskStampWidget(), and QmitkSurfaceStampWidget::QmitkSurfaceStampWidget().
mitk::Tool * mitk::ToolManager::GetActiveTool | ( | ) |
Definition at line 450 of file mitkToolManager.cpp.
int mitk::ToolManager::GetActiveToolID | ( | ) |
Definition at line 445 of file mitkToolManager.cpp.
mitk::DataStorage * mitk::ToolManager::GetDataStorage | ( | ) |
Definition at line 416 of file mitkToolManager.cpp.
References m_DataStorage.
mitk::ToolManager::DataVectorType mitk::ToolManager::GetReferenceData | ( | ) |
Definition at line 377 of file mitkToolManager.cpp.
mitk::DataNode * mitk::ToolManager::GetReferenceData | ( | int | idx | ) |
Definition at line 382 of file mitkToolManager.cpp.
mitk::ToolManager::DataVectorType mitk::ToolManager::GetRoiData | ( | ) |
Definition at line 399 of file mitkToolManager.cpp.
mitk::DataNode * mitk::ToolManager::GetRoiData | ( | int | idx | ) |
Definition at line 404 of file mitkToolManager.cpp.
mitk::Tool * mitk::ToolManager::GetToolById | ( | int | id | ) |
Definition at line 111 of file mitkToolManager.cpp.
Referenced by QmitkSurfaceBasedInterpolatorWidget::OnShowMarkers(), and QmitkSurfaceBasedInterpolatorWidget::OnToggleWidgetActivation().
int mitk::ToolManager::GetToolID | ( | const Tool * | tool | ) |
Definition at line 485 of file mitkToolManager.cpp.
|
inline |
Definition at line 131 of file mitkToolManager.h.
const mitk::ToolManager::ToolVectorTypeConst mitk::ToolManager::GetTools | ( | ) |
Gives you a list of all tools. This is const on purpose.
Definition at line 99 of file mitkToolManager.cpp.
Referenced by QmitkSurfaceBasedInterpolatorWidget::OnShowMarkers(), QmitkSurfaceBasedInterpolatorWidget::OnToggleWidgetActivation(), and QmitkSliceBasedInterpolatorWidget::OnToggleWidgetActivation().
mitk::ToolManager::DataVectorType mitk::ToolManager::GetWorkingData | ( | ) |
Definition at line 394 of file mitkToolManager.cpp.
Referenced by mitk::SegmentationInteractor::ChangeActiveLabel(), QmitkSurfaceStampWidget::OnStamp(), QmitkMaskStampWidget::OnStamp(), QmitkSurfaceBasedInterpolatorWidget::OnToggleWidgetActivation(), QmitkSliceBasedInterpolatorWidget::OnToggleWidgetActivation(), QmitkSurfaceBasedInterpolatorWidget::OnToolManagerWorkingDataModified(), QmitkSliceBasedInterpolatorWidget::OnToolManagerWorkingDataModified(), and QmitkLabelSetWidget::UpdateControls().
mitk::DataNode * mitk::ToolManager::GetWorkingData | ( | int | idx | ) |
Definition at line 433 of file mitkToolManager.cpp.
void mitk::ToolManager::InitializeTools | ( | ) |
Initialize all classes derived from mitk::Tool by itkObjectFactoy.
Definition at line 66 of file mitkToolManager.cpp.
References OnGeneralToolMessage(), and OnToolErrorMessage().
Referenced by ToolManager().
mitk::ToolManager::mitkClassMacroItkParent | ( | ToolManager | , |
itk::Object | |||
) |
mitk::ToolManager::mitkNewMacro1Param | ( | ToolManager | , |
DataStorage * | |||
) |
void mitk::ToolManager::OnGeneralToolMessage | ( | std::string | s | ) |
Definition at line 94 of file mitkToolManager.cpp.
Referenced by InitializeTools().
|
protected |
Callback for NodeRemove events.
Definition at line 498 of file mitkToolManager.cpp.
Referenced by ActivateTool(), and ~ToolManager().
void mitk::ToolManager::OnOneOfTheReferenceDataDeleted | ( | itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
Definition at line 212 of file mitkToolManager.cpp.
Referenced by SetReferenceData().
void mitk::ToolManager::OnOneOfTheReferenceDataDeletedConst | ( | const itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
Definition at line 207 of file mitkToolManager.cpp.
Referenced by SetReferenceData().
void mitk::ToolManager::OnOneOfTheRoiDataDeleted | ( | itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
Definition at line 359 of file mitkToolManager.cpp.
Referenced by SetRoiData().
void mitk::ToolManager::OnOneOfTheRoiDataDeletedConst | ( | const itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
Definition at line 354 of file mitkToolManager.cpp.
Referenced by SetRoiData().
void mitk::ToolManager::OnOneOfTheWorkingDataDeleted | ( | itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
Definition at line 282 of file mitkToolManager.cpp.
Referenced by SetWorkingData().
void mitk::ToolManager::OnOneOfTheWorkingDataDeletedConst | ( | const itk::Object * | caller, |
const itk::EventObject & | e | ||
) |
Definition at line 277 of file mitkToolManager.cpp.
Referenced by SetWorkingData().
void mitk::ToolManager::OnToolErrorMessage | ( | std::string | s | ) |
Definition at line 89 of file mitkToolManager.cpp.
Referenced by InitializeTools().
void mitk::ToolManager::RegisterClient | ( | ) |
Definition at line 455 of file mitkToolManager.cpp.
References us::GetModuleContext(), and ModuleContext::RegisterService().
void mitk::ToolManager::SetDataStorage | ( | DataStorage & | storage | ) |
Definition at line 428 of file mitkToolManager.cpp.
References m_DataStorage.
void mitk::ToolManager::SetReferenceData | ( | DataVectorType | data | ) |
Definition at line 175 of file mitkToolManager.cpp.
References mitk::New(), OnOneOfTheReferenceDataDeleted(), and OnOneOfTheReferenceDataDeletedConst().
void mitk::ToolManager::SetReferenceData | ( | DataNode * | data | ) |
Definition at line 230 of file mitkToolManager.cpp.
void mitk::ToolManager::SetRoiData | ( | DataVectorType | data | ) |
Definition at line 312 of file mitkToolManager.cpp.
References mitk::New(), OnOneOfTheRoiDataDeleted(), and OnOneOfTheRoiDataDeletedConst().
void mitk::ToolManager::SetRoiData | ( | DataNode * | data | ) |
Definition at line 343 of file mitkToolManager.cpp.
void mitk::ToolManager::SetWorkingData | ( | DataVectorType | data | ) |
Definition at line 240 of file mitkToolManager.cpp.
References mitk::New(), OnOneOfTheWorkingDataDeleted(), and OnOneOfTheWorkingDataDeletedConst().
void mitk::ToolManager::SetWorkingData | ( | DataNode * | data | ) |
Definition at line 300 of file mitkToolManager.cpp.
void mitk::ToolManager::UnregisterClient | ( | ) |
Definition at line 469 of file mitkToolManager.cpp.
Message mitk::ToolManager::ActiveToolChanged |
Definition at line 98 of file mitkToolManager.h.
Message1<std::string> mitk::ToolManager::GeneralToolMessage |
Definition at line 104 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 267 of file mitkToolManager.h.
|
protected |
Definition at line 280 of file mitkToolManager.h.
|
protected |
Definition at line 269 of file mitkToolManager.h.
|
protected |
Definition at line 270 of file mitkToolManager.h.
|
protected |
Definition at line 278 of file mitkToolManager.h.
|
protected |
Definition at line 275 of file mitkToolManager.h.
|
protected |
Definition at line 276 of file mitkToolManager.h.
|
protected |
Definition at line 263 of file mitkToolManager.h.
|
protected |
Definition at line 272 of file mitkToolManager.h.
|
protected |
Definition at line 273 of file mitkToolManager.h.
Message1<DataVectorType *> mitk::ToolManager::NewNodeObjectsGenerated |
Definition at line 96 of file mitkToolManager.h.
Message mitk::ToolManager::NewNodesGenerated |
Definition at line 95 of file mitkToolManager.h.
Message mitk::ToolManager::NodePropertiesChanged |
Definition at line 94 of file mitkToolManager.h.
Message mitk::ToolManager::ReferenceDataChanged |
Definition at line 99 of file mitkToolManager.h.
Message mitk::ToolManager::RoiDataChanged |
Definition at line 101 of file mitkToolManager.h.
Message1<std::string> mitk::ToolManager::ToolErrorMessage |
Definition at line 103 of file mitkToolManager.h.
Message mitk::ToolManager::WorkingDataChanged |
Definition at line 100 of file mitkToolManager.h.
Referenced by QmitkSliceBasedInterpolatorWidget::QmitkSliceBasedInterpolatorWidget(), QmitkSurfaceBasedInterpolatorWidget::QmitkSurfaceBasedInterpolatorWidget(), QmitkSliceBasedInterpolatorWidget::~QmitkSliceBasedInterpolatorWidget(), and QmitkSurfaceBasedInterpolatorWidget::~QmitkSurfaceBasedInterpolatorWidget().