Singleton class managing Subject Hierarchy plugins.
More...
#include <Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyPluginHandler.h>
Singleton class managing Subject Hierarchy plugins.
In Widgets, not Plugins because the paths and libs need to be exported to extensions
Definition at line 54 of file qSlicerSubjectHierarchyPluginHandler.h.
◆ autoDeleteSubjectHierarchyChildren
bool qSlicerSubjectHierarchyPluginHandler::autoDeleteSubjectHierarchyChildren |
|
readwrite |
Flag determining whether children of subject hierarchy nodes are automatically deleted upon deleting a parent subject hierarchy node. By default, a pop-up question asking the user to confirm the deletion of children nodes will be shown.
Definition at line 62 of file qSlicerSubjectHierarchyPluginHandler.h.
◆ displayPatientBirthDateInSubjectHierarchyItemName
bool qSlicerSubjectHierarchyPluginHandler::displayPatientBirthDateInSubjectHierarchyItemName |
|
readwrite |
Flag determining whether the patient birth date tag is included in the name of the patient subject hierarchy item name after loading from DICOM. False by default
Definition at line 70 of file qSlicerSubjectHierarchyPluginHandler.h.
◆ displayPatientIDInSubjectHierarchyItemName
bool qSlicerSubjectHierarchyPluginHandler::displayPatientIDInSubjectHierarchyItemName |
|
readwrite |
Flag determining whether the patient ID tag is included in the name of the patient subject hierarchy item name after loading from DICOM. True by default
Definition at line 66 of file qSlicerSubjectHierarchyPluginHandler.h.
◆ displayStudyDateInSubjectHierarchyItemName
bool qSlicerSubjectHierarchyPluginHandler::displayStudyDateInSubjectHierarchyItemName |
|
readwrite |
Flag determining whether the study date tag is included in the name of the study subject hierarchy item name after loading from DICOM. True by default
Definition at line 78 of file qSlicerSubjectHierarchyPluginHandler.h.
◆ displayStudyIDInSubjectHierarchyItemName
bool qSlicerSubjectHierarchyPluginHandler::displayStudyIDInSubjectHierarchyItemName |
|
readwrite |
Flag determining whether the study ID tag is included in the name of the study subject hierarchy item name after loading from DICOM. False by default
Definition at line 74 of file qSlicerSubjectHierarchyPluginHandler.h.
◆ qSlicerSubjectHierarchyPluginHandler()
qSlicerSubjectHierarchyPluginHandler::qSlicerSubjectHierarchyPluginHandler |
( |
QObject * |
parent = NULL | ) |
|
Private constructor made public to enable python wrapping IMPORTANT: Should not be used for creating plugin handler! Use instance() instead.
◆ ~qSlicerSubjectHierarchyPluginHandler()
virtual qSlicerSubjectHierarchyPluginHandler::~qSlicerSubjectHierarchyPluginHandler |
( |
| ) |
|
|
virtual |
Private destructor made public to enable python wrapping.
◆ allPlugins()
Returns all plugins (registered plugins and default plugin)
◆ autoDeleteSubjectHierarchyChildren()
Q_INVOKABLE bool qSlicerSubjectHierarchyPluginHandler::autoDeleteSubjectHierarchyChildren |
( |
| ) |
const |
◆ currentItem()
Q_INVOKABLE vtkIdType qSlicerSubjectHierarchyPluginHandler::currentItem |
( |
| ) |
|
Get current subject hierarchy item (single selection only). This function is called from the plugins when exposing and performing the supported actions. As the plugin actions are not aggregated on multi-selection, this function is never called from plugins in that case (and thus invalid ID is returned). IMPORTANT NOTE: This function is solely used for plugin-provided context menus. This is NOT to be used for getting the selected item of individual widgets (tree views, comboboxes).
- Returns
- Current item if only one is selected, otherwise INVALID_ITEM_ID
◆ currentItems()
Q_INVOKABLE QList<vtkIdType> qSlicerSubjectHierarchyPluginHandler::currentItems |
( |
| ) |
|
Get current subject hierarchy items in case of multi-selection IMPORTANT NOTE: This function is solely used for plugin-provided context menus. This is NOT to be used for getting the selected items of individual widgets (tree views, comboboxes).
◆ defaultPlugin()
Get default plugin instance.
◆ displayPatientBirthDateInSubjectHierarchyItemName()
Q_INVOKABLE bool qSlicerSubjectHierarchyPluginHandler::displayPatientBirthDateInSubjectHierarchyItemName |
( |
| ) |
const |
◆ displayPatientIDInSubjectHierarchyItemName()
Q_INVOKABLE bool qSlicerSubjectHierarchyPluginHandler::displayPatientIDInSubjectHierarchyItemName |
( |
| ) |
const |
◆ displayStudyDateInSubjectHierarchyItemName()
Q_INVOKABLE bool qSlicerSubjectHierarchyPluginHandler::displayStudyDateInSubjectHierarchyItemName |
( |
| ) |
const |
◆ displayStudyIDInSubjectHierarchyItemName()
Q_INVOKABLE bool qSlicerSubjectHierarchyPluginHandler::displayStudyIDInSubjectHierarchyItemName |
( |
| ) |
const |
◆ findAndSetOwnerPluginForSubjectHierarchyItem()
Find and set plugin that is most suitable to own a subject hierarchy item The best plugins are found based on the confidence numbers they return for the inputs.
- Parameters
-
◆ findOwnerPluginForSubjectHierarchyItem()
Find plugin that is most suitable to own a subject hierarchy item. This method does not set it to the item! The best plugins are found based on the confidence numbers they return for the inputs.
- Parameters
-
◆ getOwnerPluginForSubjectHierarchyItem()
Get plugin owning a certain subject hierarchy item. This function doesn't try to find a suitable plugin, it just returns the one already assigned.
◆ instance()
Instance getter for the singleton class
- Returns
- Instance object
◆ mrmlScene()
Q_INVOKABLE vtkMRMLScene* qSlicerSubjectHierarchyPluginHandler::mrmlScene |
( |
| ) |
const |
◆ onSubjectHierarchyNodeEvent()
static void qSlicerSubjectHierarchyPluginHandler::onSubjectHierarchyNodeEvent |
( |
vtkObject * |
caller, |
|
|
unsigned long |
event, |
|
|
void * |
clientData, |
|
|
void * |
callData |
|
) |
| |
|
staticprotected |
Handle subject hierarchy node events.
◆ pluginByName()
Get a plugin by name
- Returns
- The plugin instance if exists, NULL otherwise
◆ pluginLogic()
◆ pluginsForAddingNodeToSubjectHierarchy()
Returns the plugin that can handle a node the best for adding it from outside to inside the subject hierarchy The best plugins are found based on the confidence numbers they return for the inputs.
- Parameters
-
node | Node to be added to the hierarchy |
parentItemID | Prospective parent of the node to add. Default value is invalid. In that case the parent will be ignored, the confidence numbers are got based on the to-be child node alone. |
- Returns
- The most suitable plugins if found, empty list otherwise
◆ pluginsForReparentingItemInSubjectHierarchy()
Returns the plugin that can handle an item the best for reparenting it inside the subject hierarchy The best plugins are found based on the confidence numbers they return for the inputs.
- Parameters
-
itemID | Item to be reparented in the hierarchy |
parentItemID | Prospective parent of the item to reparent. |
- Returns
- The most suitable plugins if found, empty list otherwise
◆ registeredPlugins()
◆ registerPlugin()
Register a plugin
- Returns
- True if plugin registered successfully, false otherwise
◆ selectPluginFromDialog()
Used when multiple plugins are found with the same confidence number for an item. Pops up a simple dialog asking to choose one plugin from a list. Note: This should happen very rarely. If happens frequently, then confidence numbers returned by plugins need review.
- Parameters
-
textToDisplay | Text assembled by the caller displaying the reason and basis (items) of the choice |
candidatePlugins | List of plugins to choose from |
- Returns
- Plugin chosen by the user
◆ setAutoDeleteSubjectHierarchyChildren()
Q_INVOKABLE void qSlicerSubjectHierarchyPluginHandler::setAutoDeleteSubjectHierarchyChildren |
( |
bool |
flag | ) |
|
◆ setCurrentItem()
Q_INVOKABLE void qSlicerSubjectHierarchyPluginHandler::setCurrentItem |
( |
vtkIdType |
itemID | ) |
|
Set current subject hierarchy item (single selection only) IMPORTANT NOTE: This function will not change the selection in individual widgets (tree views, comboboxes). This is solely used for plugin-provided context menus.
◆ setCurrentItems()
Q_INVOKABLE void qSlicerSubjectHierarchyPluginHandler::setCurrentItems |
( |
QList< vtkIdType > |
items | ) |
|
Set current subject hierarchy items in case of multi-selection IMPORTANT NOTE: This function will not change the selection in individual widgets (tree views, comboboxes). This is solely used for plugin-provided context menus.
◆ setDisplayPatientBirthDateInSubjectHierarchyItemName()
Q_INVOKABLE void qSlicerSubjectHierarchyPluginHandler::setDisplayPatientBirthDateInSubjectHierarchyItemName |
( |
bool |
on | ) |
|
◆ setDisplayPatientIDInSubjectHierarchyItemName()
Q_INVOKABLE void qSlicerSubjectHierarchyPluginHandler::setDisplayPatientIDInSubjectHierarchyItemName |
( |
bool |
on | ) |
|
◆ setDisplayStudyDateInSubjectHierarchyItemName()
Q_INVOKABLE void qSlicerSubjectHierarchyPluginHandler::setDisplayStudyDateInSubjectHierarchyItemName |
( |
bool |
on | ) |
|
◆ setDisplayStudyIDInSubjectHierarchyItemName()
Q_INVOKABLE void qSlicerSubjectHierarchyPluginHandler::setDisplayStudyIDInSubjectHierarchyItemName |
( |
bool |
on | ) |
|
◆ setInstance()
Allows cleanup of the singleton at application exit.
◆ setMRMLScene()
void qSlicerSubjectHierarchyPluginHandler::setMRMLScene |
( |
vtkMRMLScene * |
scene | ) |
|
◆ setPluginLogic()
◆ setSubjectHierarchyNode()
Set subject hierarchy node.
◆ subjectHierarchyNode()
Get subject hierarchy node.
◆ qSlicerSubjectHierarchyPluginHandlerCleanup
friend class qSlicerSubjectHierarchyPluginHandlerCleanup |
|
friend |
◆ m_CallBack
vtkSmartPointer<vtkCallbackCommand> qSlicerSubjectHierarchyPluginHandler::m_CallBack |
|
protected |
◆ m_CurrentItems
QList<vtkIdType> qSlicerSubjectHierarchyPluginHandler::m_CurrentItems |
|
protected |
◆ m_DefaultPlugin
Instance of the default plugin to access it if there is no suitable plugin found (the default plugin instance cannot be in the registered list, as then it would never be returned)
Definition at line 205 of file qSlicerSubjectHierarchyPluginHandler.h.
◆ m_MRMLScene
vtkWeakPointer<vtkMRMLScene> qSlicerSubjectHierarchyPluginHandler::m_MRMLScene |
|
protected |
◆ m_PluginLogic
◆ m_RegisteredPlugins
◆ m_SubjectHierarchyNode
The documentation for this class was generated from the following file: