Slicer
4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Abstract plugin for handling Subject Hierarchy items. More...
#include <Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyAbstractPlugin.h>
Public Types | |
typedef QObject | Superclass |
Properties | |
QString | name |
Signals | |
void | requestExpandItem (vtkIdType itemID) |
Signal requesting expanding of the subject hierarchy tree item belonging to an item. More... | |
void | requestInvalidateFilter () const |
Public Member Functions | |
virtual bool | addNodeToSubjectHierarchy (vtkMRMLNode *node, vtkIdType parentItemID) |
virtual double | canAddNodeToSubjectHierarchy (vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const |
virtual Q_INVOKABLE double | canOwnSubjectHierarchyItem (vtkIdType itemID) const |
virtual double | canReparentItemInsideSubjectHierarchy (vtkIdType itemID, vtkIdType parentItemID) const |
virtual QString | displayedItemName (vtkIdType itemID) const |
virtual Q_INVOKABLE void | editProperties (vtkIdType itemID) |
Open module belonging to item and set inputs in opened module. More... | |
virtual Q_INVOKABLE int | getDisplayVisibility (vtkIdType itemID) const |
virtual const QString | helpText () const |
Get help text for plugin to be added in subject hierarchy module widget help box. More... | |
virtual QIcon | icon (vtkIdType itemID) |
Q_INVOKABLE bool | isThisPluginOwnerOfItem (vtkIdType itemID) const |
Determines if the item is owned by this plugin. More... | |
virtual Q_INVOKABLE QList< QAction * > | itemContextMenuActions () const |
virtual QString | name () const |
Get the name of the plugin. More... | |
qSlicerSubjectHierarchyAbstractPlugin (QObject *parent=NULL) | |
virtual bool | reparentItemInsideSubjectHierarchy (vtkIdType itemID, vtkIdType parentItemID) |
virtual Q_INVOKABLE const QString | roleForPlugin () const |
virtual Q_INVOKABLE QList< QAction * > | sceneContextMenuActions () const |
virtual Q_INVOKABLE void | setDisplayVisibility (vtkIdType itemID, int visible) |
Set display visibility of a owned subject hierarchy item. More... | |
virtual void | setName (QString name) |
virtual Q_INVOKABLE void | showContextMenuActionsForItem (vtkIdType itemID) |
virtual Q_INVOKABLE void | showVisibilityContextMenuActionsForItem (vtkIdType itemID) |
virtual Q_INVOKABLE QString | tooltip (vtkIdType itemID) const |
Generate tooltip for a owned subject hierarchy item. More... | |
virtual Q_INVOKABLE QList< QAction * > | visibilityContextMenuActions () const |
virtual Q_INVOKABLE QIcon | visibilityIcon (int visible) |
Get visibility icon for a visibility state. More... | |
virtual | ~qSlicerSubjectHierarchyAbstractPlugin () |
Static Public Member Functions | |
static Q_INVOKABLE qSlicerAbstractModuleWidget * | switchToModule (QString moduleName) |
Protected Member Functions | |
void | hideAllContextMenuActions () const |
Protected Attributes | |
QString | m_Name |
Name of the plugin. More... | |
Friends | |
class | qMRMLSubjectHierarchyTreeView |
Abstract plugin for handling Subject Hierarchy items.
In Widgets, not Plugins because the paths and libs need to be exported to extensions This class provides an interface and some default implementations for the common operations on subject hierarchy items. To exercise the default implementations, a Default plugin
Note about confidence values (
Plugin subclass naming convention:
Definition at line 62 of file qSlicerSubjectHierarchyAbstractPlugin.h.
typedef QObject qSlicerSubjectHierarchyAbstractPlugin::Superclass |
Definition at line 72 of file qSlicerSubjectHierarchyAbstractPlugin.h.
|
readwrite |
This property stores the name of the plugin Cannot be empty.
Definition at line 69 of file qSlicerSubjectHierarchyAbstractPlugin.h.
qSlicerSubjectHierarchyAbstractPlugin::qSlicerSubjectHierarchyAbstractPlugin | ( | QObject * | parent = NULL | ) |
|
virtual |
|
virtual |
Add a node to subject hierarchy under a specified parent. This is basically a convenience function to call
node | Node to add to subject hierarchy |
parentItemID | Parent item of the added node |
Reimplemented in qSlicerSubjectHierarchyFolderPlugin, and qSlicerSubjectHierarchySegmentationsPlugin.
|
virtual |
Determines if a data node can be placed in the hierarchy using the actual plugin, and gets a confidence value for a certain MRML node (usually the type and possibly attributes are checked). Most plugins do not perform steps additional to the default, so the default implementation returns a 0 confidence value, which can be overridden in plugins that do handle special cases.
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. |
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyTransformsPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchyTablesPlugin, qSlicerSubjectHierarchySceneViewsPlugin, qSlicerSubjectHierarchyChartsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyMarkupsPlugin, qSlicerSubjectHierarchyModelsPlugin, qSlicerSubjectHierarchyPlotChartPlugin, and qSlicerSubjectHierarchySegmentationsPlugin.
|
virtual |
Determines if the actual plugin can handle a subject hierarchy item. The plugin with the highest confidence number will "own" the item in the subject hierarchy (set icon, tooltip, set context menu etc.)
item | Item to handle in the subject hierarchy tree |
Reimplemented in qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyTransformsPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchyTablesPlugin, qSlicerSubjectHierarchySceneViewsPlugin, qSlicerSubjectHierarchyChartsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyMarkupsPlugin, qSlicerSubjectHierarchyModelsPlugin, qSlicerSubjectHierarchyPlotChartPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchySegmentationsPlugin, and qSlicerSubjectHierarchyDefaultPlugin.
|
virtual |
Determines if a subject hierarchy item can be reparented in the hierarchy using the current plugin, and gets a confidence value for the reparented item. Most plugins do not perform steps additional to the default, so the default implementation returns a 0 confidence value, which can be overridden in plugins that do handle special cases.
itemID | Item to be reparented in the hierarchy |
parentItemID | Prospective parent of the item to reparent. |
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyTransformsPlugin, and qSlicerSubjectHierarchySegmentsPlugin.
|
virtual |
Generate displayed name for the owned subject hierarchy item corresponding to its role. The default implementation returns the associated data node's name if any, otherwise the item name
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin.
|
virtual |
Open module belonging to item and set inputs in opened module.
Reimplemented in qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyChartsPlugin, qSlicerSubjectHierarchySegmentsPlugin, and qSlicerSubjectHierarchyPlotChartPlugin.
|
virtual |
Get display visibility of a owned subject hierarchy item
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchyChartsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyTablesPlugin, qSlicerSubjectHierarchyPlotChartPlugin, and qSlicerSubjectHierarchySegmentationsPlugin.
|
virtual |
Get help text for plugin to be added in subject hierarchy module widget help box.
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchySegmentationsPlugin, qSlicerSubjectHierarchySegmentsPlugin, and qSlicerSubjectHierarchyDefaultPlugin.
|
protected |
Hide all context menu actions offered by the plugin. This method must be called as a first step in
|
virtual |
Get icon of an owned subject hierarchy item
Reimplemented in qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyTransformsPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchyTablesPlugin, qSlicerSubjectHierarchySceneViewsPlugin, qSlicerSubjectHierarchyChartsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyMarkupsPlugin, qSlicerSubjectHierarchyModelsPlugin, qSlicerSubjectHierarchySegmentationsPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchyPlotChartPlugin, and qSlicerSubjectHierarchyDefaultPlugin.
Q_INVOKABLE bool qSlicerSubjectHierarchyAbstractPlugin::isThisPluginOwnerOfItem | ( | vtkIdType | itemID | ) | const |
Determines if the item is owned by this plugin.
|
virtual |
Get item context menu item actions to add to tree view. These item context menu actions can be shown in the implementations of
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchyTransformsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchySegmentationsPlugin, qSlicerSubjectHierarchySceneViewsPlugin, qSlicerSubjectHierarchyCloneNodePlugin, and qSlicerSubjectHierarchyRegisterPlugin.
|
virtual |
Get the name of the plugin.
|
virtual |
Reparent an item that was already in the subject hierarchy under a new parent.
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyTransformsPlugin, and qSlicerSubjectHierarchySegmentsPlugin.
|
signal |
Signal requesting expanding of the subject hierarchy tree item belonging to an item.
|
signal |
Signal requesting invalidating the filter model for the tree view (e.g. when an item is added or removed by the plugin)
|
virtual |
Get role that the plugin assigns to the subject hierarchy item. Each plugin should provide only one role.
Reimplemented in qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyTransformsPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchyTablesPlugin, qSlicerSubjectHierarchySceneViewsPlugin, qSlicerSubjectHierarchyChartsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyMarkupsPlugin, qSlicerSubjectHierarchyModelsPlugin, qSlicerSubjectHierarchyPlotChartPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchySegmentationsPlugin, and qSlicerSubjectHierarchyDefaultPlugin.
|
virtual |
Get scene context menu item actions to add to tree view. Also provides actions for right-click on empty area These context menu actions are shown for the scene in the implementations of
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyFolderPlugin, and qSlicerSubjectHierarchyParseLocalDataPlugin.
|
virtual |
Set display visibility of a owned subject hierarchy item.
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchyChartsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyTablesPlugin, qSlicerSubjectHierarchyPlotChartPlugin, and qSlicerSubjectHierarchySegmentationsPlugin.
|
virtual |
Set the name of the plugin NOTE: name must be defined in constructor in C++ plugins, this can only be used in python scripted ones
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin.
|
inlinevirtual |
Show context menu actions valid for a given subject hierarchy item.
itemID | Subject Hierarchy item to show the context menu items for |
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchyTransformsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchySegmentationsPlugin, qSlicerSubjectHierarchySceneViewsPlugin, qSlicerSubjectHierarchyCloneNodePlugin, qSlicerSubjectHierarchyParseLocalDataPlugin, and qSlicerSubjectHierarchyRegisterPlugin.
Definition at line 132 of file qSlicerSubjectHierarchyAbstractPlugin.h.
|
inlinevirtual |
Show visibility context menu actions valid for a given subject hierarchy item.
itemID | Subject Hierarchy item to show the visibility context menu items for |
Reimplemented in qSlicerSubjectHierarchySegmentationsPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyDefaultPlugin, and qSlicerSubjectHierarchyVolumeRenderingPlugin.
Definition at line 140 of file qSlicerSubjectHierarchyAbstractPlugin.h.
|
static |
Switch to module with given name
|
virtual |
Generate tooltip for a owned subject hierarchy item.
Reimplemented in qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyTransformsPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyModelsPlugin, and qSlicerSubjectHierarchySegmentationsPlugin.
|
virtual |
Get visibility context menu item actions to add to tree view. These item visibility context menu actions can be shown in the implementations of
Reimplemented in qSlicerSubjectHierarchySegmentationsPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyDefaultPlugin, and qSlicerSubjectHierarchyVolumeRenderingPlugin.
|
virtual |
Get visibility icon for a visibility state.
Reimplemented in qSlicerSubjectHierarchyFolderPlugin, qSlicerSubjectHierarchyScriptedPlugin, qSlicerSubjectHierarchyTransformsPlugin, qSlicerSubjectHierarchyVolumesPlugin, qSlicerSubjectHierarchyTablesPlugin, qSlicerSubjectHierarchyChartsPlugin, qSlicerSubjectHierarchyDiffusionTensorVolumesPlugin, qSlicerSubjectHierarchyLabelMapsPlugin, qSlicerSubjectHierarchyMarkupsPlugin, qSlicerSubjectHierarchyModelsPlugin, qSlicerSubjectHierarchySegmentationsPlugin, qSlicerSubjectHierarchySegmentsPlugin, qSlicerSubjectHierarchyPlotChartPlugin, and qSlicerSubjectHierarchyDefaultPlugin.
|
friend |
Definition at line 216 of file qSlicerSubjectHierarchyAbstractPlugin.h.
|
protected |
Name of the plugin.
Definition at line 211 of file qSlicerSubjectHierarchyAbstractPlugin.h.