Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
qSlicerSegmentationsModuleWidget Class Reference

#include <Modules/Loadable/Segmentations/qSlicerSegmentationsModuleWidget.h>

Inheritance diagram for qSlicerSegmentationsModuleWidget:
Inheritance graph
[legend]
Collaboration diagram for qSlicerSegmentationsModuleWidget:
Collaboration graph
[legend]

Public Types

typedef qSlicerAbstractModuleWidget Superclass
 
- Public Types inherited from qSlicerAbstractModuleRepresentation
typedef qSlicerObject Superclass
 

Public Slots

void selectSegmentationNode (vtkMRMLSegmentationNode *segmentationNode)
 Select segmentation node in module (workaround for issue that newly added nodes are not selected in the module) More...
 
void updateWidgetFromMRML ()
 Update widget GUI from parameter node. More...
 
- Public Slots inherited from qSlicerWidget
void setMRMLScene (vtkMRMLScene *scene) override
 

Public Member Functions

void enter () override
 
void exit () override
 
 qSlicerSegmentationsModuleWidget (QWidget *parent=nullptr)
 
bool setEditedNode (vtkMRMLNode *node, QString role=QString(), QString context=QString()) override
 Support of node editing. Selects node in user interface that the user wants to edit. More...
 
void setTerminologiesLogic (vtkSlicerTerminologiesModuleLogic *logic)
 Set Terminologies module logic. More...
 
 ~qSlicerSegmentationsModuleWidget () override
 
- Public Member Functions inherited from qSlicerAbstractModuleWidget
bool isEntered () const
 
Q_INVOKABLE double nodeEditable (vtkMRMLNode *node) override
 
 qSlicerAbstractModuleWidget (QWidget *parent=nullptr)
 
 ~qSlicerAbstractModuleWidget () override
 
- Public Member Functions inherited from qSlicerWidget
 qSlicerWidget (QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
 
 ~qSlicerWidget () override
 
- Public Member Functions inherited from qSlicerObject
vtkMRMLScenemrmlScene () const
 Return a pointer on the MRML scene. More...
 
 qSlicerObject ()
 
virtual void setMRMLScene (vtkMRMLScene *)
 Set the current MRML scene to the widget. More...
 
virtual ~qSlicerObject ()
 
- Public Member Functions inherited from qSlicerAbstractModuleRepresentation
qSlicerAbstractCoreModulemodule () const
 
QString moduleName () const
 Set/Get module name. More...
 
 qSlicerAbstractModuleRepresentation ()
 
 ~qSlicerAbstractModuleRepresentation () override
 

Protected Slots

void collapseLabelmapLayers ()
 
void onAddSegment ()
 
void onCopyFromCurrentSegmentation ()
 
void onCopyToCurrentSegmentation ()
 
void onEditSelectedSegment ()
 
void onImportExportApply ()
 
void onImportExportClearSelection ()
 
void onMoveFromCurrentSegmentation ()
 
void onMoveToCurrentSegmentation ()
 
void onMRMLSceneEndBatchProcessEvent ()
 
void onMRMLSceneEndCloseEvent ()
 
void onMRMLSceneEndImportEvent ()
 
void onMRMLSceneEndRestoreEvent ()
 
void onRemoveSelectedSegments ()
 
void onSegmentationNodeChanged (vtkMRMLNode *node)
 Handle change of selected segmentation node. More...
 
void onSegmentationNodeReferenceChanged ()
 Populate master volume label and combobox for export. More...
 
void onSegmentSelectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
 Callback function for selection changes in the main segment table view. More...
 
void setOtherSegmentationOrRepresentationNode (vtkMRMLNode *node)
 Handle change of selection for the "other" node in copy/move/import/export. More...
 
void updateCopyMoveButtonStates ()
 Update copy/move/import/export buttons based on selection. More...
 
void updateImportExportWidgets ()
 
void updateLayerWidgets ()
 

Protected Member Functions

bool copySegmentBetweenSegmentations (vtkSegmentation *fromSegmentation, vtkSegmentation *toSegmentation, QString segmentId, bool removeFromSource=false)
 
bool copySegmentsBetweenSegmentations (bool copyFromCurrentSegmentation, bool removeFromSource=false)
 
bool exportFromCurrentSegmentation ()
 
bool importToCurrentSegmentation ()
 
void init ()
 Initialization function to enable automatic testing. More...
 
void onEnter ()
 
vtkMRMLSegmentationDisplayNodesegmentationDisplayNode (bool create=false)
 
void setup () override
 
- Protected Member Functions inherited from qSlicerAbstractModuleRepresentation
vtkMRMLAbstractLogiclogic () const
 

Protected Attributes

QScopedPointer< qSlicerSegmentationsModuleWidgetPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerAbstractModuleWidget
QScopedPointer< qSlicerAbstractModuleWidgetPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerWidget
QScopedPointer< qSlicerWidgetPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerObject
QScopedPointer< qSlicerObjectPrivate > d_ptr
 
- Protected Attributes inherited from qSlicerAbstractModuleRepresentation
QScopedPointer< qSlicerAbstractModuleRepresentationPrivate > d_ptr
 

Additional Inherited Members

- Properties inherited from qSlicerAbstractModuleWidget
bool isEntered
 
- Signals inherited from qSlicerWidget
void mrmlSceneChanged (vtkMRMLScene *)
 

Detailed Description

Definition at line 46 of file qSlicerSegmentationsModuleWidget.h.

Member Typedef Documentation

◆ Superclass

Definition at line 53 of file qSlicerSegmentationsModuleWidget.h.

Constructor & Destructor Documentation

◆ qSlicerSegmentationsModuleWidget()

qSlicerSegmentationsModuleWidget::qSlicerSegmentationsModuleWidget ( QWidget *  parent = nullptr)

◆ ~qSlicerSegmentationsModuleWidget()

qSlicerSegmentationsModuleWidget::~qSlicerSegmentationsModuleWidget ( )
override

Member Function Documentation

◆ collapseLabelmapLayers

void qSlicerSegmentationsModuleWidget::collapseLabelmapLayers ( )
protectedslot

◆ copySegmentBetweenSegmentations()

bool qSlicerSegmentationsModuleWidget::copySegmentBetweenSegmentations ( vtkSegmentation fromSegmentation,
vtkSegmentation toSegmentation,
QString  segmentId,
bool  removeFromSource = false 
)
protected

Copy segment from one segmentation to another

Parameters
fromSegmentationSource segmentation
toSegmentationTarget segmentation
segmentIdID of segment to copy
removeFromSourceIf true, then delete segment from source segmentation after copying. Default value is false.
Returns
Success flag

◆ copySegmentsBetweenSegmentations()

bool qSlicerSegmentationsModuleWidget::copySegmentsBetweenSegmentations ( bool  copyFromCurrentSegmentation,
bool  removeFromSource = false 
)
protected

Copy segments to/from current segmentation from/to other segmentation.

Parameters
copyFromCurrentSegmentationIf true, then copy current->other; otherwise other->current.
removeFromSourceIf true, then delete segment from source segmentation after copying. Default value is false.
Returns
Success flag

◆ enter()

void qSlicerSegmentationsModuleWidget::enter ( )
overridevirtual

The enter and exit methods are called when the module panel changes. These give the module a chance to do any setup or shutdown operations as it becomes active and inactive. It is the responsibility of the module's manager to call the methods. enter() and exit() must be called when reimplementing these methods in order to have isEntered() valid.

Reimplemented from qSlicerAbstractModuleWidget.

◆ exit()

void qSlicerSegmentationsModuleWidget::exit ( )
overridevirtual

Reimplemented from qSlicerAbstractModuleWidget.

◆ exportFromCurrentSegmentation()

bool qSlicerSegmentationsModuleWidget::exportFromCurrentSegmentation ( )
protected

◆ importToCurrentSegmentation()

bool qSlicerSegmentationsModuleWidget::importToCurrentSegmentation ( )
protected

◆ init()

void qSlicerSegmentationsModuleWidget::init ( )
protected

Initialization function to enable automatic testing.

◆ onAddSegment

void qSlicerSegmentationsModuleWidget::onAddSegment ( )
protectedslot

◆ onCopyFromCurrentSegmentation

void qSlicerSegmentationsModuleWidget::onCopyFromCurrentSegmentation ( )
protectedslot

◆ onCopyToCurrentSegmentation

void qSlicerSegmentationsModuleWidget::onCopyToCurrentSegmentation ( )
protectedslot

◆ onEditSelectedSegment

void qSlicerSegmentationsModuleWidget::onEditSelectedSegment ( )
protectedslot

◆ onEnter()

void qSlicerSegmentationsModuleWidget::onEnter ( )
protected

◆ onImportExportApply

void qSlicerSegmentationsModuleWidget::onImportExportApply ( )
protectedslot

◆ onImportExportClearSelection

void qSlicerSegmentationsModuleWidget::onImportExportClearSelection ( )
protectedslot

◆ onMoveFromCurrentSegmentation

void qSlicerSegmentationsModuleWidget::onMoveFromCurrentSegmentation ( )
protectedslot

◆ onMoveToCurrentSegmentation

void qSlicerSegmentationsModuleWidget::onMoveToCurrentSegmentation ( )
protectedslot

◆ onMRMLSceneEndBatchProcessEvent

void qSlicerSegmentationsModuleWidget::onMRMLSceneEndBatchProcessEvent ( )
protectedslot

◆ onMRMLSceneEndCloseEvent

void qSlicerSegmentationsModuleWidget::onMRMLSceneEndCloseEvent ( )
protectedslot

◆ onMRMLSceneEndImportEvent

void qSlicerSegmentationsModuleWidget::onMRMLSceneEndImportEvent ( )
protectedslot

◆ onMRMLSceneEndRestoreEvent

void qSlicerSegmentationsModuleWidget::onMRMLSceneEndRestoreEvent ( )
protectedslot

◆ onRemoveSelectedSegments

void qSlicerSegmentationsModuleWidget::onRemoveSelectedSegments ( )
protectedslot

◆ onSegmentationNodeChanged

void qSlicerSegmentationsModuleWidget::onSegmentationNodeChanged ( vtkMRMLNode node)
protectedslot

Handle change of selected segmentation node.

◆ onSegmentationNodeReferenceChanged

void qSlicerSegmentationsModuleWidget::onSegmentationNodeReferenceChanged ( )
protectedslot

Populate master volume label and combobox for export.

◆ onSegmentSelectionChanged

void qSlicerSegmentationsModuleWidget::onSegmentSelectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
)
protectedslot

Callback function for selection changes in the main segment table view.

◆ segmentationDisplayNode()

vtkMRMLSegmentationDisplayNode* qSlicerSegmentationsModuleWidget::segmentationDisplayNode ( bool  create = false)
protected

Get display node of current segmentation node

Parameters
createIf on, then create a default display node if missing. False by default

◆ selectSegmentationNode

void qSlicerSegmentationsModuleWidget::selectSegmentationNode ( vtkMRMLSegmentationNode segmentationNode)
slot

Select segmentation node in module (workaround for issue that newly added nodes are not selected in the module)

◆ setEditedNode()

bool qSlicerSegmentationsModuleWidget::setEditedNode ( vtkMRMLNode node,
QString  role = QString(),
QString  context = QString() 
)
overridevirtual

Support of node editing. Selects node in user interface that the user wants to edit.

Reimplemented from qSlicerAbstractModuleWidget.

◆ setOtherSegmentationOrRepresentationNode

void qSlicerSegmentationsModuleWidget::setOtherSegmentationOrRepresentationNode ( vtkMRMLNode node)
protectedslot

Handle change of selection for the "other" node in copy/move/import/export.

◆ setTerminologiesLogic()

void qSlicerSegmentationsModuleWidget::setTerminologiesLogic ( vtkSlicerTerminologiesModuleLogic logic)

Set Terminologies module logic.

◆ setup()

void qSlicerSegmentationsModuleWidget::setup ( )
overrideprotectedvirtual

All initialization code (typically setupUi()) must be done in setup() The module and the logic are accessible.

Reimplemented from qSlicerAbstractModuleWidget.

◆ updateCopyMoveButtonStates

void qSlicerSegmentationsModuleWidget::updateCopyMoveButtonStates ( )
protectedslot

Update copy/move/import/export buttons based on selection.

◆ updateImportExportWidgets

void qSlicerSegmentationsModuleWidget::updateImportExportWidgets ( )
protectedslot

◆ updateLayerWidgets

void qSlicerSegmentationsModuleWidget::updateLayerWidgets ( )
protectedslot

◆ updateWidgetFromMRML

void qSlicerSegmentationsModuleWidget::updateWidgetFromMRML ( )
slot

Update widget GUI from parameter node.

Member Data Documentation

◆ d_ptr

QScopedPointer<qSlicerSegmentationsModuleWidgetPrivate> qSlicerSegmentationsModuleWidget::d_ptr
protected

Definition at line 140 of file qSlicerSegmentationsModuleWidget.h.


The documentation for this class was generated from the following file: