Slicer  4.10
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
 
Qt::ToolButtonStyle effectButtonStyle
 
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=NULL)
 
void redo ()
 Restores next saved state of the segmentation. More...
 
void rotateSliceViewsToSegmentation ()
 
void saveStateForUndo ()
 
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 setInteractionNode (vtkMRMLInteractionNode *interactionNode)
 
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...
 
virtual void setMRMLScene (vtkMRMLScene *newScene)
 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 updateEffectLayouts ()
 Perform updates to prevent layout collapse. 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...
 
Qt::ToolButtonStyle effectButtonStyle () const
 
Q_INVOKABLE qSlicerSegmentEditorAbstractEffecteffectByIndex (int index)
 
Q_INVOKABLE qSlicerSegmentEditorAbstractEffecteffectByName (QString name)
 
Q_INVOKABLE int effectCount ()
 
Q_INVOKABLE QStringList effectNameOrder () const
 
Q_INVOKABLE vtkMRMLInteractionNodeinteractionNode () const
 
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=0)
 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)
 
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
 
virtual ~qMRMLSegmentEditorWidget ()
 Destructor. More...
 
- Public Member Functions inherited from qMRMLWidget
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 Return a pointer on the current MRML scene. More...
 
 qMRMLWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 
virtual ~qMRMLWidget ()
 

Protected Slots

void anchorClicked (const QUrl &url)
 Update layout after expanding/collapsing the help text browser. More...
 
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 onEnableSurfaceSmoothingToggled (bool enabled)
 Enable/disable surface smoothing. 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 overwriteable 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 onSurfaceSmoothingFactorChanged (double newSmoothingFactor)
 
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...
 

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
 

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 80 of file qMRMLSegmentEditorWidget.h.

Property Documentation

◆ autoShowMasterVolumeNode

bool qMRMLSegmentEditorWidget::autoShowMasterVolumeNode
readwrite

Definition at line 71 of file qMRMLSegmentEditorWidget.h.

◆ effectButtonStyle

Qt::ToolButtonStyle qMRMLSegmentEditorWidget::effectButtonStyle
readwrite

Definition at line 76 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 77 of file qMRMLSegmentEditorWidget.h.

Constructor & Destructor Documentation

◆ qMRMLSegmentEditorWidget()

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

Constructor.

◆ ~qMRMLSegmentEditorWidget()

virtual qMRMLSegmentEditorWidget::~qMRMLSegmentEditorWidget ( )
virtual

Destructor.

Member Function Documentation

◆ activeEffect()

Q_INVOKABLE qSlicerSegmentEditorAbstractEffect* qMRMLSegmentEditorWidget::activeEffect ( ) const

Return active effect if selected, NULL otherwise

See also
m_ActiveEffect, setActiveEffect()

◆ anchorClicked

void qMRMLSegmentEditorWidget::anchorClicked ( const QUrl &  url)
protectedslot

Update layout after expanding/collapsing the help text browser.

◆ 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.

◆ 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, NULL otherwise

◆ effectByName()

Q_INVOKABLE qSlicerSegmentEditorAbstractEffect* qMRMLSegmentEditorWidget::effectByName ( QString  name)

Get an effect object by name

Returns
The effect instance if exists, NULL otherwise

◆ 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 = NULL)
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()

◆ 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.

◆ onEnableSurfaceSmoothingToggled

void qMRMLSegmentEditorWidget::onEnableSurfaceSmoothingToggled ( bool  enabled)
protectedslot

Enable/disable surface smoothing.

◆ 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 overwriteable 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.

◆ onSurfaceSmoothingFactorChanged

void qMRMLSegmentEditorWidget::onSurfaceSmoothingFactorChanged ( double  newSmoothingFactor)
protectedslot

◆ 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.

◆ 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.

◆ 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.

◆ 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()

◆ 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

virtual void qMRMLSegmentEditorWidget::setMRMLScene ( vtkMRMLScene newScene)
virtualslot

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

◆ updateEffectLayouts

void qMRMLSegmentEditorWidget::updateEffectLayouts ( )
slot

Perform updates to prevent layout collapse.

◆ 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.

◆ 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 405 of file qMRMLSegmentEditorWidget.h.


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