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

Qt widget for editing a segment from a segmentation using Editor effects.Widget for editing segmentations that can be re-used in any module. More...

#include <Modules/Loadable/Segmentations/Widgets/qMRMLSegmentEditorWidget.h>

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

Public Types

typedef qMRMLWidget Superclass
 
- Public Types inherited from qMRMLWidget
typedef QWidget Superclass
 

Properties

bool autoShowMasterVolumeNode
 
QString defaultTerminologyEntry
 
QString defaultTerminologyEntrySettingsKey
 
Qt::ToolButtonStyle effectButtonStyle
 
int effectColumnCount
 
bool jumpToSelectedSegmentEnabled
 
bool masterVolumeNodeSelectorVisible
 
int maximumNumberOfUndoStates
 
bool readOnly
 
bool segmentationNodeSelectorVisible
 
bool switchToSegmentationsButtonVisible
 
bool undoEnabled
 
bool unorderedEffectsVisible
 

Public Slots

void hideLabelLayer ()
 Unselect labelmap layer in all slice views in the active layout. More...
 
void installKeyboardShortcuts (QWidget *parent=nullptr)
 
void jumpSlices ()
 Segment's center is determined as the center of bounding box. More...
 
void redo ()
 Restores next saved state of the segmentation. More...
 
void rotateSliceViewsToSegmentation ()
 
void saveStateForUndo ()
 
void selectNextSegment ()
 Select the segment below the currently selected one in the table (skipping segments that are not visible) More...
 
void selectPreviousSegment ()
 Select the segment above the currently selected one in the table (skipping segments that are not visible) More...
 
void selectSegmentAtOffset (int offset)
 
void setActiveEffectByName (QString effectName)
 Set active effect by name. More...
 
void setAutoShowMasterVolumeNode (bool)
 
void setCurrentSegmentID (const QString segmentID)
 Set selected segment by its ID. More...
 
void setEffectButtonStyle (Qt::ToolButtonStyle toolButtonStyle)
 
void setEffectColumnCount (int columnCount)
 Request displaying effects in the grid layout with the specified column count. More...
 
void setInteractionNode (vtkMRMLInteractionNode *interactionNode)
 
void setJumpToSelectedSegmentEnabled (bool enable)
 Enables automatic jumping to current segment when selection is changed. More...
 
void setMasterVolumeNode (vtkMRMLNode *node)
 
void setMasterVolumeNodeID (const QString &nodeID)
 Set master volume MRML node by its ID. More...
 
void setMasterVolumeNodeSelectorVisible (bool)
 Show/hide the master volume node selector widget. More...
 
void setMaximumNumberOfUndoStates (int)
 Set maximum number of saved undo/redo states. More...
 
void setMRMLScene (vtkMRMLScene *newScene) override
 Set the MRML scene associated with the widget. More...
 
void setMRMLSegmentEditorNode (vtkMRMLSegmentEditorNode *newSegmentEditorNode)
 Set the segment editor parameter set node. More...
 
void setReadOnly (bool aReadOnly)
 Set whether the widget is read-only. More...
 
void setSegmentationNode (vtkMRMLNode *node)
 Set segmentation MRML node. More...
 
void setSegmentationNodeID (const QString &nodeID)
 Set segmentation MRML node by its ID. More...
 
void setSegmentationNodeSelectorVisible (bool)
 Show/hide the segmentation node selector widget. More...
 
void setSwitchToSegmentationsButtonVisible (bool)
 Show/hide the switch to Segmentations module button. More...
 
void setUndoEnabled (bool)
 Undo/redo enabled. More...
 
void showMasterVolumeInSliceViewers (bool forceShowInBackground=false, bool fitSlice=false)
 
void toggleMasterVolumeIntensityMaskEnabled ()
 Enable/disable masking using master volume intensity. More...
 
bool turnOffLightboxes ()
 
void undo ()
 Restores previous saved state of the segmentation. More...
 
void uninstallKeyboardShortcuts ()
 Uninstall previously installed keyboard shortcuts. More...
 
void updateEffectList ()
 
void updateVolume (void *volumePtr, bool &success)
 Update modifierLabelmap, maskLabelmap, or alignedMasterVolumeNode. More...
 
virtual void updateWidgetFromMRML ()
 Update widget state from the MRML scene. More...
 
- Public Slots inherited from qMRMLWidget
virtual void setMRMLScene (vtkMRMLScene *newScene)
 Set the MRML scene associated with the widget. More...
 

Signals

void currentSegmentIDChanged (const QString &)
 Emitted if different segment is selected in the segment list. More...
 
void masterVolumeNodeChanged (vtkMRMLVolumeNode *)
 
void segmentationNodeChanged (vtkMRMLSegmentationNode *)
 
- Signals inherited from qMRMLWidget
void mrmlSceneChanged (vtkMRMLScene *)
 

Public Member Functions

Q_INVOKABLE qSlicerSegmentEditorAbstractEffectactiveEffect () const
 
bool autoShowMasterVolumeNode () const
 
Q_INVOKABLE QStringList availableEffectNames ()
 Get list of all registered effect names that can be displayed in the widget. More...
 
Q_INVOKABLE QString currentSegmentID () const
 Get segment ID of selected segment. More...
 
QString defaultTerminologyEntry ()
 
QString defaultTerminologyEntrySettingsKey () const
 
Qt::ToolButtonStyle effectButtonStyle () const
 
Q_INVOKABLE qSlicerSegmentEditorAbstractEffecteffectByIndex (int index)
 
Q_INVOKABLE qSlicerSegmentEditorAbstractEffecteffectByName (QString name)
 
int effectColumnCount () const
 
Q_INVOKABLE int effectCount ()
 
Q_INVOKABLE QStringList effectNameOrder () const
 
Q_INVOKABLE vtkMRMLInteractionNodeinteractionNode () const
 
bool jumpToSelectedSegmentEnabled () const
 Returns true if automatic jump to current segment is enabled. More...
 
Q_INVOKABLE vtkMRMLNodemasterVolumeNode () const
 Get currently selected master volume MRML node. More...
 
Q_INVOKABLE QString masterVolumeNodeID () const
 Get ID of currently selected master volume node. More...
 
Q_INVOKABLE void masterVolumeNodeSelectorAddAttribute (const QString &nodeType, const QString &attributeName, const QVariant &attributeValue=QVariant())
 
Q_INVOKABLE void masterVolumeNodeSelectorRemoveAttribute (const QString &nodeType, const QString &attributeName)
 
bool masterVolumeNodeSelectorVisible () const
 Show/hide the master volume node selector widget. More...
 
int maximumNumberOfUndoStates () const
 Get maximum number of saved undo/redo states. More...
 
Q_INVOKABLE vtkMRMLSegmentEditorNodemrmlSegmentEditorNode () const
 Get the segment editor parameter set node. More...
 
 qMRMLSegmentEditorWidget (QWidget *parent=nullptr)
 Constructor. More...
 
bool readOnly () const
 Get whether widget is read-only. More...
 
Q_INVOKABLE void removeViewObservations ()
 
Q_INVOKABLE vtkMRMLNodesegmentationNode () const
 Get currently selected segmentation MRML node. More...
 
Q_INVOKABLE QString segmentationNodeID () const
 Get ID of currently selected segmentation node. More...
 
Q_INVOKABLE void segmentationNodeSelectorAddAttribute (const QString &nodeType, const QString &attributeName, const QVariant &attributeValue=QVariant())
 
Q_INVOKABLE void segmentationNodeSelectorRemoveAttribute (const QString &nodeType, const QString &attributeName)
 
bool segmentationNodeSelectorVisible () const
 Show/hide the segmentation node selector widget. More...
 
Q_INVOKABLE void setActiveEffect (qSlicerSegmentEditorAbstractEffect *effect)
 
void setDefaultTerminologyEntry (const QString &terminologyEntry)
 
void setDefaultTerminologyEntrySettingsKey (const QString &terminologyEntrySettingsKey)
 
Q_INVOKABLE void setEffectNameOrder (const QStringList &effectNames)
 
void setUnorderedEffectsVisible (bool visible)
 
Q_INVOKABLE void setupViewObservations ()
 
bool switchToSegmentationsButtonVisible () const
 Show/hide the switch to Segmentations module button. More...
 
bool undoEnabled () const
 Undo/redo enabled. More...
 
bool unorderedEffectsVisible () const
 
 ~qMRMLSegmentEditorWidget () override
 Destructor. More...
 
- Public Member Functions inherited from qMRMLWidget
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 Return a pointer on the current MRML scene. More...
 
 qMRMLWidget (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
 
 ~qMRMLWidget () override
 

Protected Slots

void initializeParameterSetNode ()
 Set default parameters in parameter set node (after setting or closing scene) More...
 
void onAddSegment ()
 Add empty segment. More...
 
void onCreateSurfaceToggled (bool on)
 Create/remove closed surface model for the segmentation that is automatically updated when editing. More...
 
void onEffectButtonClicked (QAbstractButton *button)
 Activate effect on clicking its button. More...
 
void onExportToFilesActionClicked ()
 Open Export to files dialog. More...
 
void onImportExportActionClicked ()
 Switch to Segmentations module and jump to Import/Export section. More...
 
void onInteractionNodeModified ()
 Handles mouse mode changes (view / place markups) More...
 
void onLayoutChanged (int layoutIndex)
 Handle layout changes. More...
 
void onMaskModeChanged (int)
 Changed selected editable segment area. More...
 
void onMasterVolumeImageDataModified ()
 Called if master volume image data is changed. More...
 
void onMasterVolumeIntensityMaskChecked (bool checked)
 Enable/disable threshold when checkbox is toggled. More...
 
void onMasterVolumeIntensityMaskRangeChanged (double low, double high)
 Handles threshold values changed event. More...
 
void onMasterVolumeNodeChanged (vtkMRMLNode *node)
 Handles changing of the current master volume MRML node. More...
 
void onMRMLSceneEndCloseEvent ()
 Clean up when scene is closed. More...
 
void onOverwriteModeChanged (int)
 Changed selected overwritable segments. More...
 
void onRemoveSegment ()
 Remove selected segment. More...
 
void onSegmentAddedRemoved ()
 Called if a segment or representation is added or removed. More...
 
void onSegmentationDisplayModified ()
 Handle display node view ID changes. More...
 
void onSegmentationHistoryChanged ()
 Update GUI if segmentation history is changed (e.g., undo/redo button states) More...
 
void onSegmentationNodeChanged (vtkMRMLNode *node)
 Handles changing of current segmentation MRML node. More...
 
void onSegmentSelectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
 Handles segment selection changes. More...
 
void onSelectEffectShortcut ()
 
void onSelectSegmentShortcut ()
 Segment selection shortcut is activated. More...
 
void onSwitchToSegmentations ()
 Edit segmentation properties in Segmentations module. More...
 
void showSegmentationGeometryDialog ()
 Show segmentation geometry dialog to specify labelmap geometry. More...
 
void updateMaskingSection ()
 Update masking section on the UI. More...
 
void updateSliceRotateWarningButtonVisibility ()
 Show slice rotation warning button if slice views are rotated, hide otherwise. More...
 
void updateUndoRedoButtonsState ()
 Update undo/redo button states. More...
 

Protected Member Functions

bool setMasterRepresentationToBinaryLabelmap ()
 
qSlicerAbstractModuleWidgetswitchToSegmentationsModule ()
 Switches to Segmentations module and returns the module widget. More...
 
void updateEffectsSectionFromMRML ()
 
void updateWidgetFromMasterVolumeNode ()
 
void updateWidgetFromSegmentationNode ()
 

Static Protected Member Functions

static void processEvents (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 Callback function invoked when interaction happens. More...
 

Protected Attributes

QScopedPointer< qMRMLSegmentEditorWidgetPrivate > d_ptr
 
- Protected Attributes inherited from qMRMLWidget
QScopedPointer< qMRMLWidgetPrivate > d_ptr
 

Additional Inherited Members

- Static Public Member Functions inherited from qMRMLWidget
static Q_INVOKABLE QPixmap pixmapFromIcon (const QIcon &icon)
 
static Q_INVOKABLE void postInitializeApplication ()
 Initialization that needs to be performed after application object is created. More...
 
static Q_INVOKABLE void preInitializeApplication ()
 

Detailed Description

Qt widget for editing a segment from a segmentation using Editor effects.

Widget for editing segmentations that can be re-used in any module.

IMPORTANT: The embedding module is responsible for setting the MRML scene and the management of the

See also
vtkMRMLSegmentEditorNode parameter set node. The empty parameter set node should be set before the MRML scene, so that the default selections can be stored in the parameter set node. Also, re-creation of the parameter set node needs to be handled after scene close, and usage of occasional existing parameter set nodes after scene import.

Definition at line 65 of file qMRMLSegmentEditorWidget.h.

Member Typedef Documentation

◆ Superclass

Definition at line 84 of file qMRMLSegmentEditorWidget.h.

Property Documentation

◆ autoShowMasterVolumeNode

bool qMRMLSegmentEditorWidget::autoShowMasterVolumeNode
readwrite

Definition at line 71 of file qMRMLSegmentEditorWidget.h.

◆ defaultTerminologyEntry

QString qMRMLSegmentEditorWidget::defaultTerminologyEntry
readwrite

Definition at line 80 of file qMRMLSegmentEditorWidget.h.

◆ defaultTerminologyEntrySettingsKey

QString qMRMLSegmentEditorWidget::defaultTerminologyEntrySettingsKey
readwrite

Definition at line 79 of file qMRMLSegmentEditorWidget.h.

◆ effectButtonStyle

Qt::ToolButtonStyle qMRMLSegmentEditorWidget::effectButtonStyle
readwrite

Definition at line 76 of file qMRMLSegmentEditorWidget.h.

◆ effectColumnCount

int qMRMLSegmentEditorWidget::effectColumnCount
readwrite

Definition at line 77 of file qMRMLSegmentEditorWidget.h.

◆ jumpToSelectedSegmentEnabled

bool qMRMLSegmentEditorWidget::jumpToSelectedSegmentEnabled
readwrite

Definition at line 81 of file qMRMLSegmentEditorWidget.h.

◆ masterVolumeNodeSelectorVisible

bool qMRMLSegmentEditorWidget::masterVolumeNodeSelectorVisible
readwrite

Definition at line 70 of file qMRMLSegmentEditorWidget.h.

◆ maximumNumberOfUndoStates

int qMRMLSegmentEditorWidget::maximumNumberOfUndoStates
readwrite

Definition at line 74 of file qMRMLSegmentEditorWidget.h.

◆ readOnly

bool qMRMLSegmentEditorWidget::readOnly
readwrite

Definition at line 75 of file qMRMLSegmentEditorWidget.h.

◆ segmentationNodeSelectorVisible

bool qMRMLSegmentEditorWidget::segmentationNodeSelectorVisible
readwrite

Definition at line 69 of file qMRMLSegmentEditorWidget.h.

◆ switchToSegmentationsButtonVisible

bool qMRMLSegmentEditorWidget::switchToSegmentationsButtonVisible
readwrite

Definition at line 72 of file qMRMLSegmentEditorWidget.h.

◆ undoEnabled

bool qMRMLSegmentEditorWidget::undoEnabled
readwrite

Definition at line 73 of file qMRMLSegmentEditorWidget.h.

◆ unorderedEffectsVisible

bool qMRMLSegmentEditorWidget::unorderedEffectsVisible
readwrite

Definition at line 78 of file qMRMLSegmentEditorWidget.h.

Constructor & Destructor Documentation

◆ qMRMLSegmentEditorWidget()

qMRMLSegmentEditorWidget::qMRMLSegmentEditorWidget ( QWidget *  parent = nullptr)
explicit

Constructor.

◆ ~qMRMLSegmentEditorWidget()

qMRMLSegmentEditorWidget::~qMRMLSegmentEditorWidget ( )
override

Destructor.

Member Function Documentation

◆ activeEffect()

Q_INVOKABLE qSlicerSegmentEditorAbstractEffect* qMRMLSegmentEditorWidget::activeEffect ( ) const

Return active effect if selected, nullptr otherwise

See also
m_ActiveEffect, setActiveEffect()

◆ autoShowMasterVolumeNode()

bool qMRMLSegmentEditorWidget::autoShowMasterVolumeNode ( ) const

If autoShowMasterVolumeNode is enabled then master volume is automatically displayed in slice views when a new master volume is selected or layout is changed. Enabled by default.

◆ availableEffectNames()

Q_INVOKABLE QStringList qMRMLSegmentEditorWidget::availableEffectNames ( )

Get list of all registered effect names that can be displayed in the widget.

◆ currentSegmentID()

Q_INVOKABLE QString qMRMLSegmentEditorWidget::currentSegmentID ( ) const

Get segment ID of selected segment.

◆ currentSegmentIDChanged

void qMRMLSegmentEditorWidget::currentSegmentIDChanged ( const QString &  )
signal

Emitted if different segment is selected in the segment list.

◆ defaultTerminologyEntry()

QString qMRMLSegmentEditorWidget::defaultTerminologyEntry ( )

Get terminology entry string that is used for the first segment by default. The value is read from application settings, if defaultTerminologyEntrySettingsKey is not empty.

◆ defaultTerminologyEntrySettingsKey()

QString qMRMLSegmentEditorWidget::defaultTerminologyEntrySettingsKey ( ) const

Get settings key that stores defaultTerminologyEntry.

See also
setDefaultTerminologyEntrySettingsKey

◆ effectButtonStyle()

Qt::ToolButtonStyle qMRMLSegmentEditorWidget::effectButtonStyle ( ) const

Get appearance of effect buttons. Showing text may make it easier to find an effect but uses more space.

◆ effectByIndex()

Q_INVOKABLE qSlicerSegmentEditorAbstractEffect* qMRMLSegmentEditorWidget::effectByIndex ( int  index)

Get n-th effect shown in the widget. n>=0 and n<effectCount().

Returns
The effect instance if exists, nullptr otherwise

◆ effectByName()

Q_INVOKABLE qSlicerSegmentEditorAbstractEffect* qMRMLSegmentEditorWidget::effectByName ( QString  name)

Get an effect object by name

Returns
The effect instance if exists, nullptr otherwise

◆ effectColumnCount()

int qMRMLSegmentEditorWidget::effectColumnCount ( ) const

Get number of columns being used by the effects.

Returns
Number of columns being used for effects.

◆ effectCount()

Q_INVOKABLE int qMRMLSegmentEditorWidget::effectCount ( )

Get number of displayed effects

Returns
Number of effects shown in the widget

◆ effectNameOrder()

Q_INVOKABLE QStringList qMRMLSegmentEditorWidget::effectNameOrder ( ) const

Get requested order of effects. Actually displayed effects can be retrieved by using

See also
effectCount and
effectByIndex.
Returns
List of effect names to be shown in the widget.

◆ hideLabelLayer

void qMRMLSegmentEditorWidget::hideLabelLayer ( )
slot

Unselect labelmap layer in all slice views in the active layout.

◆ initializeParameterSetNode

void qMRMLSegmentEditorWidget::initializeParameterSetNode ( )
protectedslot

Set default parameters in parameter set node (after setting or closing scene)

◆ installKeyboardShortcuts

void qMRMLSegmentEditorWidget::installKeyboardShortcuts ( QWidget *  parent = nullptr)
slot

Install keyboard shortcuts to allow quick selection of effects and segments. If parent is not specified then the main window will be used as parent. Previous keyboard shortcuts will be uninstalled.

◆ interactionNode()

Q_INVOKABLE vtkMRMLInteractionNode* qMRMLSegmentEditorWidget::interactionNode ( ) const

Get current interaction node.

See also
SetInteractionNode()

◆ jumpSlices

void qMRMLSegmentEditorWidget::jumpSlices ( )
slot

Segment's center is determined as the center of bounding box.

Jump position of all slice views to show the segment's center.

◆ jumpToSelectedSegmentEnabled()

bool qMRMLSegmentEditorWidget::jumpToSelectedSegmentEnabled ( ) const

Returns true if automatic jump to current segment is enabled.

◆ masterVolumeNode()

Q_INVOKABLE vtkMRMLNode* qMRMLSegmentEditorWidget::masterVolumeNode ( ) const

Get currently selected master volume MRML node.

◆ masterVolumeNodeChanged

void qMRMLSegmentEditorWidget::masterVolumeNodeChanged ( vtkMRMLVolumeNode )
signal

Emitted when the user selects a different master volume (or any time master volume selection is changed in the segment editor parameter node).

◆ masterVolumeNodeID()

Q_INVOKABLE QString qMRMLSegmentEditorWidget::masterVolumeNodeID ( ) const

Get ID of currently selected master volume node.

◆ masterVolumeNodeSelectorAddAttribute()

Q_INVOKABLE void qMRMLSegmentEditorWidget::masterVolumeNodeSelectorAddAttribute ( const QString &  nodeType,
const QString &  attributeName,
const QVariant &  attributeValue = QVariant() 
)

Add node type attribute that filter the master volume nodes to display.

See also
qMRMLNodeComboBox::addAttribute

◆ masterVolumeNodeSelectorRemoveAttribute()

Q_INVOKABLE void qMRMLSegmentEditorWidget::masterVolumeNodeSelectorRemoveAttribute ( const QString &  nodeType,
const QString &  attributeName 
)

Remove node type attribute filtering the displayed master volume nodes.

See also
qMRMLNodeComboBox::addAttribute

◆ masterVolumeNodeSelectorVisible()

bool qMRMLSegmentEditorWidget::masterVolumeNodeSelectorVisible ( ) const

Show/hide the master volume node selector widget.

◆ maximumNumberOfUndoStates()

int qMRMLSegmentEditorWidget::maximumNumberOfUndoStates ( ) const

Get maximum number of saved undo/redo states.

◆ mrmlSegmentEditorNode()

Q_INVOKABLE vtkMRMLSegmentEditorNode* qMRMLSegmentEditorWidget::mrmlSegmentEditorNode ( ) const

Get the segment editor parameter set node.

◆ onAddSegment

void qMRMLSegmentEditorWidget::onAddSegment ( )
protectedslot

Add empty segment.

◆ onCreateSurfaceToggled

void qMRMLSegmentEditorWidget::onCreateSurfaceToggled ( bool  on)
protectedslot

Create/remove closed surface model for the segmentation that is automatically updated when editing.

◆ onEffectButtonClicked

void qMRMLSegmentEditorWidget::onEffectButtonClicked ( QAbstractButton *  button)
protectedslot

Activate effect on clicking its button.

◆ onExportToFilesActionClicked

void qMRMLSegmentEditorWidget::onExportToFilesActionClicked ( )
protectedslot

Open Export to files dialog.

◆ onImportExportActionClicked

void qMRMLSegmentEditorWidget::onImportExportActionClicked ( )
protectedslot

Switch to Segmentations module and jump to Import/Export section.

◆ onInteractionNodeModified

void qMRMLSegmentEditorWidget::onInteractionNodeModified ( )
protectedslot

Handles mouse mode changes (view / place markups)

◆ onLayoutChanged

void qMRMLSegmentEditorWidget::onLayoutChanged ( int  layoutIndex)
protectedslot

Handle layout changes.

◆ onMaskModeChanged

void qMRMLSegmentEditorWidget::onMaskModeChanged ( int  )
protectedslot

Changed selected editable segment area.

◆ onMasterVolumeImageDataModified

void qMRMLSegmentEditorWidget::onMasterVolumeImageDataModified ( )
protectedslot

Called if master volume image data is changed.

◆ onMasterVolumeIntensityMaskChecked

void qMRMLSegmentEditorWidget::onMasterVolumeIntensityMaskChecked ( bool  checked)
protectedslot

Enable/disable threshold when checkbox is toggled.

◆ onMasterVolumeIntensityMaskRangeChanged

void qMRMLSegmentEditorWidget::onMasterVolumeIntensityMaskRangeChanged ( double  low,
double  high 
)
protectedslot

Handles threshold values changed event.

◆ onMasterVolumeNodeChanged

void qMRMLSegmentEditorWidget::onMasterVolumeNodeChanged ( vtkMRMLNode node)
protectedslot

Handles changing of the current master volume MRML node.

◆ onMRMLSceneEndCloseEvent

void qMRMLSegmentEditorWidget::onMRMLSceneEndCloseEvent ( )
protectedslot

Clean up when scene is closed.

◆ onOverwriteModeChanged

void qMRMLSegmentEditorWidget::onOverwriteModeChanged ( int  )
protectedslot

Changed selected overwritable segments.

◆ onRemoveSegment

void qMRMLSegmentEditorWidget::onRemoveSegment ( )
protectedslot

Remove selected segment.

◆ onSegmentAddedRemoved

void qMRMLSegmentEditorWidget::onSegmentAddedRemoved ( )
protectedslot

Called if a segment or representation is added or removed.

◆ onSegmentationDisplayModified

void qMRMLSegmentEditorWidget::onSegmentationDisplayModified ( )
protectedslot

Handle display node view ID changes.

◆ onSegmentationHistoryChanged

void qMRMLSegmentEditorWidget::onSegmentationHistoryChanged ( )
protectedslot

Update GUI if segmentation history is changed (e.g., undo/redo button states)

◆ onSegmentationNodeChanged

void qMRMLSegmentEditorWidget::onSegmentationNodeChanged ( vtkMRMLNode node)
protectedslot

Handles changing of current segmentation MRML node.

◆ onSegmentSelectionChanged

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

Handles segment selection changes.

◆ onSelectEffectShortcut

void qMRMLSegmentEditorWidget::onSelectEffectShortcut ( )
protectedslot

Effect selection shortcut is activated. 0 means deselect active effect. -1 toggles between no effect/last active effect.

◆ onSelectSegmentShortcut

void qMRMLSegmentEditorWidget::onSelectSegmentShortcut ( )
protectedslot

Segment selection shortcut is activated.

◆ onSwitchToSegmentations

void qMRMLSegmentEditorWidget::onSwitchToSegmentations ( )
protectedslot

Edit segmentation properties in Segmentations module.

◆ processEvents()

static void qMRMLSegmentEditorWidget::processEvents ( vtkObject *  caller,
unsigned long  eid,
void *  clientData,
void *  callData 
)
staticprotected

Callback function invoked when interaction happens.

◆ readOnly()

bool qMRMLSegmentEditorWidget::readOnly ( ) const

Get whether widget is read-only.

◆ redo

void qMRMLSegmentEditorWidget::redo ( )
slot

Restores next saved state of the segmentation.

◆ removeViewObservations()

Q_INVOKABLE void qMRMLSegmentEditorWidget::removeViewObservations ( )

Remove observations NOTE: This method should be called from the exit function of the embedding module widget so that events are not processed unnecessarily.

◆ rotateSliceViewsToSegmentation

void qMRMLSegmentEditorWidget::rotateSliceViewsToSegmentation ( )
slot

Rotate slice views to be aligned with segmentation node's internal labelmap representation axes.

◆ saveStateForUndo

void qMRMLSegmentEditorWidget::saveStateForUndo ( )
slot

Save current segmentation before performing an edit operation to allow reverting to the current state by using undo

◆ segmentationNode()

Q_INVOKABLE vtkMRMLNode* qMRMLSegmentEditorWidget::segmentationNode ( ) const

Get currently selected segmentation MRML node.

◆ segmentationNodeChanged

void qMRMLSegmentEditorWidget::segmentationNodeChanged ( vtkMRMLSegmentationNode )
signal

Emitted when the user selects a different segmentation node (or any time segmentation node selection is changed in the segment editor parameter node).

◆ segmentationNodeID()

Q_INVOKABLE QString qMRMLSegmentEditorWidget::segmentationNodeID ( ) const

Get ID of currently selected segmentation node.

◆ segmentationNodeSelectorAddAttribute()

Q_INVOKABLE void qMRMLSegmentEditorWidget::segmentationNodeSelectorAddAttribute ( const QString &  nodeType,
const QString &  attributeName,
const QVariant &  attributeValue = QVariant() 
)

Add node type attribute that filter the segmentation nodes to display.

See also
qMRMLNodeComboBox::addAttribute

◆ segmentationNodeSelectorRemoveAttribute()

Q_INVOKABLE void qMRMLSegmentEditorWidget::segmentationNodeSelectorRemoveAttribute ( const QString &  nodeType,
const QString &  attributeName 
)

Remove node type attribute filtering the displayed segmentation nodes.

See also
qMRMLNodeComboBox::addAttribute

◆ segmentationNodeSelectorVisible()

bool qMRMLSegmentEditorWidget::segmentationNodeSelectorVisible ( ) const

Show/hide the segmentation node selector widget.

◆ selectNextSegment

void qMRMLSegmentEditorWidget::selectNextSegment ( )
slot

Select the segment below the currently selected one in the table (skipping segments that are not visible)

◆ selectPreviousSegment

void qMRMLSegmentEditorWidget::selectPreviousSegment ( )
slot

Select the segment above the currently selected one in the table (skipping segments that are not visible)

◆ selectSegmentAtOffset

void qMRMLSegmentEditorWidget::selectSegmentAtOffset ( int  offset)
slot

Select the segment offset from the currently selected one in the table (skipping segments that are not visible) Positive offset will move down the table Negative offset will move up the table

◆ setActiveEffect()

Q_INVOKABLE void qMRMLSegmentEditorWidget::setActiveEffect ( qSlicerSegmentEditorAbstractEffect effect)

Set active effect

See also
m_ActiveEffect, activeEffect()

◆ setActiveEffectByName

void qMRMLSegmentEditorWidget::setActiveEffectByName ( QString  effectName)
slot

Set active effect by name.

◆ setAutoShowMasterVolumeNode

void qMRMLSegmentEditorWidget::setAutoShowMasterVolumeNode ( bool  )
slot

If autoShowMasterVolumeNode is enabled then master volume is automatically displayed in slice views when a new master volume is selected or layout is changed. Enabled by default.

◆ setCurrentSegmentID

void qMRMLSegmentEditorWidget::setCurrentSegmentID ( const QString  segmentID)
slot

Set selected segment by its ID.

◆ setDefaultTerminologyEntry()

void qMRMLSegmentEditorWidget::setDefaultTerminologyEntry ( const QString &  terminologyEntry)

Set terminology entry string that is used for the first segment by default. The value is also written to application settings, if defaultTerminologyEntrySettingsKey is not empty.

◆ setDefaultTerminologyEntrySettingsKey()

void qMRMLSegmentEditorWidget::setDefaultTerminologyEntrySettingsKey ( const QString &  terminologyEntrySettingsKey)

Set settings key that stores defaultTerminologyEntry. If set to empty string then the defaultTerminologyEntry is not saved to/loaded from application settings. By default it is set to "Segmentations/DefaultTerminologyEntry". If settings key is changed then the current default terminology entry is not written into application settings (as it would overwrite its current value in the settings, which is usually not the expected behavior).

◆ setEffectButtonStyle

void qMRMLSegmentEditorWidget::setEffectButtonStyle ( Qt::ToolButtonStyle  toolButtonStyle)
slot

Set appearance of effect buttons. Showing text may make it easier to find an effect but uses more space.

◆ setEffectColumnCount

void qMRMLSegmentEditorWidget::setEffectColumnCount ( int  columnCount)
slot

Request displaying effects in the grid layout with the specified column count.

◆ setEffectNameOrder()

Q_INVOKABLE void qMRMLSegmentEditorWidget::setEffectNameOrder ( const QStringList &  effectNames)

Request displaying effects in the specified order. Effects that are not listed will be hidden if

See also
unorderedEffectsVisible is false.

◆ setInteractionNode

void qMRMLSegmentEditorWidget::setInteractionNode ( vtkMRMLInteractionNode interactionNode)
slot

Set node used to notify active effect about interaction node changes.

See also
interactionNode()

◆ setJumpToSelectedSegmentEnabled

void qMRMLSegmentEditorWidget::setJumpToSelectedSegmentEnabled ( bool  enable)
slot

Enables automatic jumping to current segment when selection is changed.

◆ setMasterRepresentationToBinaryLabelmap()

bool qMRMLSegmentEditorWidget::setMasterRepresentationToBinaryLabelmap ( )
protected

Switches the master representation to binary labelmap. If the master representation cannot be set to binary labelmap (e.g., the user does not allow it) then false is returned.

◆ setMasterVolumeNode

void qMRMLSegmentEditorWidget::setMasterVolumeNode ( vtkMRMLNode node)
slot

Set master volume MRML node. If master volume has multiple scalar components then only the first scalar component is used.

◆ setMasterVolumeNodeID

void qMRMLSegmentEditorWidget::setMasterVolumeNodeID ( const QString &  nodeID)
slot

Set master volume MRML node by its ID.

◆ setMasterVolumeNodeSelectorVisible

void qMRMLSegmentEditorWidget::setMasterVolumeNodeSelectorVisible ( bool  )
slot

Show/hide the master volume node selector widget.

◆ setMaximumNumberOfUndoStates

void qMRMLSegmentEditorWidget::setMaximumNumberOfUndoStates ( int  )
slot

Set maximum number of saved undo/redo states.

◆ setMRMLScene

void qMRMLSegmentEditorWidget::setMRMLScene ( vtkMRMLScene newScene)
overrideslot

Set the MRML scene associated with the widget.

◆ setMRMLSegmentEditorNode

void qMRMLSegmentEditorWidget::setMRMLSegmentEditorNode ( vtkMRMLSegmentEditorNode newSegmentEditorNode)
slot

Set the segment editor parameter set node.

◆ setReadOnly

void qMRMLSegmentEditorWidget::setReadOnly ( bool  aReadOnly)
slot

Set whether the widget is read-only.

◆ setSegmentationNode

void qMRMLSegmentEditorWidget::setSegmentationNode ( vtkMRMLNode node)
slot

Set segmentation MRML node.

◆ setSegmentationNodeID

void qMRMLSegmentEditorWidget::setSegmentationNodeID ( const QString &  nodeID)
slot

Set segmentation MRML node by its ID.

◆ setSegmentationNodeSelectorVisible

void qMRMLSegmentEditorWidget::setSegmentationNodeSelectorVisible ( bool  )
slot

Show/hide the segmentation node selector widget.

◆ setSwitchToSegmentationsButtonVisible

void qMRMLSegmentEditorWidget::setSwitchToSegmentationsButtonVisible ( bool  )
slot

Show/hide the switch to Segmentations module button.

◆ setUndoEnabled

void qMRMLSegmentEditorWidget::setUndoEnabled ( bool  )
slot

Undo/redo enabled.

◆ setUnorderedEffectsVisible()

void qMRMLSegmentEditorWidget::setUnorderedEffectsVisible ( bool  visible)

Show/hide effect names that are not listed in

See also
effectNameOrder(). True by default to make effects registered by extensions show up by default. This can be used to simplify the editor widget to show only a limited number of effects.

◆ setupViewObservations()

Q_INVOKABLE void qMRMLSegmentEditorWidget::setupViewObservations ( )

Create observations between slice view interactor and the widget. The captured events are propagated to the active effect if any. NOTE: This method should be called from the enter function of the embedding module widget so that the events are correctly processed.

◆ showMasterVolumeInSliceViewers

void qMRMLSegmentEditorWidget::showMasterVolumeInSliceViewers ( bool  forceShowInBackground = false,
bool  fitSlice = false 
)
slot

Show master volume in slice views by hiding foreground and label volumes.

Parameters
forceShowInBackgroundIf set to false then views will only change if master volume is not selected as either foreground or background volume.
fitSliceReset field of view to include all volumes.

◆ showSegmentationGeometryDialog

void qMRMLSegmentEditorWidget::showSegmentationGeometryDialog ( )
protectedslot

Show segmentation geometry dialog to specify labelmap geometry.

◆ switchToSegmentationsButtonVisible()

bool qMRMLSegmentEditorWidget::switchToSegmentationsButtonVisible ( ) const

Show/hide the switch to Segmentations module button.

◆ switchToSegmentationsModule()

qSlicerAbstractModuleWidget* qMRMLSegmentEditorWidget::switchToSegmentationsModule ( )
protected

Switches to Segmentations module and returns the module widget.

◆ toggleMasterVolumeIntensityMaskEnabled

void qMRMLSegmentEditorWidget::toggleMasterVolumeIntensityMaskEnabled ( )
slot

Enable/disable masking using master volume intensity.

◆ turnOffLightboxes

bool qMRMLSegmentEditorWidget::turnOffLightboxes ( )
slot

Convenience method to turn off lightbox view in all slice viewers. Segment editor is not compatible with lightbox view layouts. Returns true if there were lightbox views.

◆ undo

void qMRMLSegmentEditorWidget::undo ( )
slot

Restores previous saved state of the segmentation.

◆ undoEnabled()

bool qMRMLSegmentEditorWidget::undoEnabled ( ) const

Undo/redo enabled.

◆ uninstallKeyboardShortcuts

void qMRMLSegmentEditorWidget::uninstallKeyboardShortcuts ( )
slot

Uninstall previously installed keyboard shortcuts.

◆ unorderedEffectsVisible()

bool qMRMLSegmentEditorWidget::unorderedEffectsVisible ( ) const

Get visibility status of effect names that are not listed in effectNameOrder().

See also
setEffectNameOrder

◆ updateEffectList

void qMRMLSegmentEditorWidget::updateEffectList ( )
slot

Update list of effect buttons. It adds all effects registered with the effect factory (and not filtered by unorderedEffectsVisible).

◆ updateEffectsSectionFromMRML()

void qMRMLSegmentEditorWidget::updateEffectsSectionFromMRML ( )
protected

◆ updateMaskingSection

void qMRMLSegmentEditorWidget::updateMaskingSection ( )
protectedslot

Update masking section on the UI.

◆ updateSliceRotateWarningButtonVisibility

void qMRMLSegmentEditorWidget::updateSliceRotateWarningButtonVisibility ( )
protectedslot

Show slice rotation warning button if slice views are rotated, hide otherwise.

◆ updateUndoRedoButtonsState

void qMRMLSegmentEditorWidget::updateUndoRedoButtonsState ( )
protectedslot

Update undo/redo button states.

◆ updateVolume

void qMRMLSegmentEditorWidget::updateVolume ( void *  volumePtr,
bool &  success 
)
slot

Update modifierLabelmap, maskLabelmap, or alignedMasterVolumeNode.

◆ updateWidgetFromMasterVolumeNode()

void qMRMLSegmentEditorWidget::updateWidgetFromMasterVolumeNode ( )
protected

◆ updateWidgetFromMRML

virtual void qMRMLSegmentEditorWidget::updateWidgetFromMRML ( )
virtualslot

Update widget state from the MRML scene.

◆ updateWidgetFromSegmentationNode()

void qMRMLSegmentEditorWidget::updateWidgetFromSegmentationNode ( )
protected

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLSegmentEditorWidgetPrivate> qMRMLSegmentEditorWidget::d_ptr
protected

Definition at line 449 of file qMRMLSegmentEditorWidget.h.


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