![]() |
Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Modules/Loadable/Segmentations/Widgets/qMRMLSegmentsTableView.h>
Public Types | |
typedef qMRMLWidget | Superclass |
![]() | |
typedef QWidget | Superclass |
Properties | |
bool | colorColumnVisible |
bool | filterBarVisible |
bool | headerVisible |
bool | jumpToSelectedSegmentEnabled |
bool | layerColumnVisible |
bool | opacityColumnVisible |
bool | readOnly |
int | segmentCount |
int | selectionMode |
bool | statusColumnVisible |
bool | terminologySelectorAutoDisable |
bool | terminologySelectorOptionVisible |
QString | textFilter |
bool | useTerminologySelector |
QString | useTerminologySelectorSettingsKey |
bool | visibilityColumnVisible |
Public Slots | |
void | clearSelectedSegments () |
Erase the contents of the selected segments and set the status to "Not started". | |
void | jumpSlices () |
bool | jumpToSelectedSegmentEnabled () const |
Returns true if automatic jump to current segment is enabled. | |
void | moveSelectedSegmentsDown () |
Move selected segments down in the list. | |
void | moveSelectedSegmentsUp () |
Move selected segments up in the list. | |
void | setColorColumnVisible (bool visible) |
void | setFilterBarVisible (bool visible) |
void | setHeaderVisible (bool visible) |
void | setJumpToSelectedSegmentEnabled (bool enable) |
Enables automatic jumping to current segment when selection is changed. | |
void | setLayerColumnVisible (bool visible) |
void | setMRMLScene (vtkMRMLScene *newScene) override |
Set MRML scene. | |
void | setOpacityColumnVisible (bool visible) |
void | setReadOnly (bool aReadOnly) |
void | setSegmentationNode (vtkMRMLNode *node) |
Set segmentation MRML node. | |
void | setSelectedSegmentsStatus (int status=-1) |
Set the status of the selected segments. | |
void | setSelectionMode (int mode) |
void | setStatusColumnVisible (bool visible) |
void | setStatusShown (int status, bool shown) |
void | setTerminologySelectorAutoDisable (bool autoDisable) |
Offer automatic disable of using standard terminologies selector if custom segment names or colors are used frequently. | |
void | setTerminologySelectorOptionVisible (bool visible) |
Set if the user can choose between the standard terminologies selector or the simple selectors for segment name and color. | |
void | setTextFilter (QString textFilter) |
void | setUseTerminologySelector (bool useTerminologySelector) |
Set if standard terminologies are used for choosing segment name and color. | |
void | setUseTerminologySelectorSettingsKey (QString settingsKey) |
void | setVisibilityColumnVisible (bool visible) |
void | showOnlySelectedSegments () |
Show only selected segments. | |
void | toggleSelectedSegmentsVisibility () |
Toggle visibility for the selected segments. | |
![]() | |
virtual void | setMRMLScene (vtkMRMLScene *newScene) |
Set the MRML scene associated with the widget. | |
Signals | |
void | segmentAboutToBeModified (const QString &segmentID) |
void | selectionChanged (const QItemSelection &selected, const QItemSelection &deselected) |
Emitted if selection changes. | |
![]() | |
void | mrmlSceneChanged (vtkMRMLScene *) |
Public Member Functions | |
Q_INVOKABLE void | clearSelection () |
Clear segment selection. | |
bool | colorColumnVisible () |
Q_INVOKABLE QStringList | displayedSegmentIDs () const |
Return list of visible segment IDs. | |
bool | filterBarVisible () |
bool | headerVisible () |
Q_INVOKABLE QStringList | hideSegments () const |
bool | layerColumnVisible () |
Q_INVOKABLE qMRMLSegmentsModel * | model () const |
bool | opacityColumnVisible () |
qMRMLSegmentsTableView (QWidget *parent=nullptr) | |
Constructor. | |
bool | readOnly () |
Q_INVOKABLE int | rowForSegmentID (QString segmentID) |
Get the row for the specified segment ID. | |
Q_INVOKABLE vtkMRMLNode * | segmentationNode () |
Get segmentation MRML node. | |
int | segmentCount () const |
Return number of segments (rows) in the table. | |
Q_INVOKABLE QString | segmentIDForRow (int row) |
Get the segment ID for the specified row. | |
Q_INVOKABLE QStringList | selectedSegmentIDs () |
Get the segment IDs of selected segments. | |
int | selectionMode () |
Q_INVOKABLE void | setHideSegments (const QStringList &segmentIDs) |
Q_INVOKABLE void | setSelectedSegmentIDs (QStringList segmentIDs) |
Select segments with specified IDs. | |
Q_INVOKABLE qMRMLSortFilterSegmentsProxyModel * | sortFilterProxyModel () const |
bool | statusColumnVisible () |
Q_INVOKABLE bool | statusShown (int status) |
Q_INVOKABLE QTableView * | tableWidget () |
Get access to the table widget to allow low-level customization. | |
bool | terminologySelectorAutoDisable () const |
Offer automatic disable of using standard terminologies selector if custom segment names or colors are used frequently. | |
bool | terminologySelectorOptionVisible () const |
Returns true if the user can choose between the standard terminologies selector or the simple selectors for segment name and color. | |
QString | textFilter () |
bool | useTerminologySelector () const |
QString | useTerminologySelectorSettingsKey () const |
bool | visibilityColumnVisible () |
~qMRMLSegmentsTableView () override | |
Destructor. | |
![]() | |
Q_INVOKABLE vtkMRMLScene * | mrmlScene () const |
Return a pointer on the current MRML scene. | |
qMRMLWidget (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags()) | |
~qMRMLWidget () override | |
Static Public Member Functions | |
static Q_INVOKABLE QString | terminologyTooltipForSegment (vtkSegment *segment) |
Assemble terminology info string (for tooltips) from a segment's terminology tags. | |
![]() | |
static Q_INVOKABLE QPixmap | pixmapFromIcon (const QIcon &icon) |
static Q_INVOKABLE void | postInitializeApplication () |
Initialization that needs to be performed after application object is created. | |
static Q_INVOKABLE void | preInitializeApplication () |
Protected Slots | |
void | endProcessing () |
Handle MRML scene event. | |
void | modelAboutToBeReset () |
Signals to save/restore segment ID selection when the model is reset. | |
void | modelReset () |
void | onSegmentAddedOrRemoved () |
void | onSegmentSelectionChanged (const QItemSelection &selected, const QItemSelection &deselected) |
Forwards selection changed events. In case of batch update of items, selected and deselected are empty. | |
void | onSegmentsFilterModified () |
Handles when the filters on underlying sort model are modified. | |
void | onSegmentsTableClicked (const QModelIndex &modelIndex) |
Handles clicks on a table cell (visibility + state) | |
void | onSegmentsTableDoubleClicked (const QModelIndex &modelIndex) |
Handles clicks on a table cell (name + color change / terminology change) | |
void | onShowStatusButtonClicked () |
Handles clicks on the show status buttons. | |
void | onUseTerminologyActionToggled (bool useTerminology) |
Toggle using standard terminology for this segments table. | |
void | onVisibility2DFillActionToggled (bool visible) |
void | onVisibility2DOutlineActionToggled (bool visible) |
void | onVisibility3DActionToggled (bool visible) |
Handles actions on table cell (visibility) | |
void | updateMRMLFromFilterParameters () |
Update the filter parameters in the vtkMRMLSegmentationNode. | |
void | updateWidgetFromMRML () |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *event) override |
Handle context menu events. | |
bool | eventFilter (QObject *target, QEvent *event) override |
To prevent accidentally moving out of the widget when pressing up/down arrows. | |
void | setSegmentVisibility (QObject *senderObject, int visible, int visible3D, int visible2DFill, int visible2DOutline) |
void | setSegmentVisibility (QString segmentId, int visible, int visible3D, int visible2DFill, int visible2DOutline) |
bool | userSetCustomNameOrColor () |
Protected Attributes | |
QScopedPointer< qMRMLSegmentsTableViewPrivate > | d_ptr |
![]() | |
QScopedPointer< qMRMLWidgetPrivate > | d_ptr |
Definition at line 48 of file qMRMLSegmentsTableView.h.
Definition at line 71 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 57 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 62 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 55 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 64 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 60 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 58 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 61 of file qMRMLSegmentsTableView.h.
|
read |
Definition at line 65 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 54 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 59 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 69 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 68 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 63 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 67 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 66 of file qMRMLSegmentsTableView.h.
|
readwrite |
Definition at line 56 of file qMRMLSegmentsTableView.h.
|
explicit |
Constructor.
|
override |
Destructor.
|
slot |
Erase the contents of the selected segments and set the status to "Not started".
Q_INVOKABLE void qMRMLSegmentsTableView::clearSelection | ( | ) |
Clear segment selection.
bool qMRMLSegmentsTableView::colorColumnVisible | ( | ) |
|
overrideprotected |
Handle context menu events.
Q_INVOKABLE QStringList qMRMLSegmentsTableView::displayedSegmentIDs | ( | ) | const |
Return list of visible segment IDs.
|
protectedslot |
Handle MRML scene event.
|
overrideprotected |
To prevent accidentally moving out of the widget when pressing up/down arrows.
bool qMRMLSegmentsTableView::filterBarVisible | ( | ) |
bool qMRMLSegmentsTableView::headerVisible | ( | ) |
Q_INVOKABLE QStringList qMRMLSegmentsTableView::hideSegments | ( | ) | const |
|
slot |
Jump position of all slice views to show the segment's center. Segment's center is determined as the center of bounding box.
|
slot |
Returns true if automatic jump to current segment is enabled.
bool qMRMLSegmentsTableView::layerColumnVisible | ( | ) |
Q_INVOKABLE qMRMLSegmentsModel * qMRMLSegmentsTableView::model | ( | ) | const |
|
protectedslot |
Signals to save/restore segment ID selection when the model is reset.
|
protectedslot |
|
slot |
Move selected segments down in the list.
|
slot |
Move selected segments up in the list.
|
protectedslot |
|
protectedslot |
Forwards selection changed events. In case of batch update of items, selected and deselected are empty.
|
protectedslot |
Handles when the filters on underlying sort model are modified.
|
protectedslot |
Handles clicks on a table cell (visibility + state)
|
protectedslot |
Handles clicks on a table cell (name + color change / terminology change)
|
protectedslot |
Handles clicks on the show status buttons.
|
protectedslot |
Toggle using standard terminology for this segments table.
|
protectedslot |
|
protectedslot |
|
protectedslot |
Handles actions on table cell (visibility)
bool qMRMLSegmentsTableView::opacityColumnVisible | ( | ) |
bool qMRMLSegmentsTableView::readOnly | ( | ) |
Q_INVOKABLE int qMRMLSegmentsTableView::rowForSegmentID | ( | QString | segmentID | ) |
Get the row for the specified segment ID.
|
signal |
Emitted when a segment property (e.g., name) is about to be changed. Can be used for capturing the current state of the segment, before it is modified.
Q_INVOKABLE vtkMRMLNode * qMRMLSegmentsTableView::segmentationNode | ( | ) |
Get segmentation MRML node.
int qMRMLSegmentsTableView::segmentCount | ( | ) | const |
Return number of segments (rows) in the table.
Q_INVOKABLE QString qMRMLSegmentsTableView::segmentIDForRow | ( | int | row | ) |
Get the segment ID for the specified row.
Q_INVOKABLE QStringList qMRMLSegmentsTableView::selectedSegmentIDs | ( | ) |
Get the segment IDs of selected segments.
|
signal |
Emitted if selection changes.
int qMRMLSegmentsTableView::selectionMode | ( | ) |
|
slot |
|
slot |
|
slot |
Q_INVOKABLE void qMRMLSegmentsTableView::setHideSegments | ( | const QStringList & | segmentIDs | ) |
Segments that have their ID listed in hideSegments are not shown in the table.
|
slot |
Enables automatic jumping to current segment when selection is changed.
|
slot |
|
overrideslot |
Set MRML scene.
|
slot |
|
slot |
|
slot |
Set segmentation MRML node.
|
protected |
Convenience function to set segment visibility options from event handlers
visible | Visibility of the segment referenced from senderObject. If 0, then hide, if 1 then show, otherwise don't change |
visible3D | Visibility of the segment referenced from senderObject in 3D. If 0, then hide, if 1 then show, otherwise don't change |
visible2DFill | Visibility of the segment referenced from senderObject for 2D fill. If 0, then hide, if 1 then show, otherwise don't change |
visible2DOutline | Visibility of the segment referenced from senderObject for 2D outline. If 0, then hide, if 1 then show, otherwise don't change |
|
protected |
Q_INVOKABLE void qMRMLSegmentsTableView::setSelectedSegmentIDs | ( | QStringList | segmentIDs | ) |
Select segments with specified IDs.
|
slot |
Set the status of the selected segments.
|
slot |
Set selection mode in the table. Input value is int for Python compatibility. Actual values are defined in QAbstractItemView::SelectionMode. For example, QAbstractItemView::NoSelection, QAbstractItemView::SingleSelection, QAbstractItemView::ExtendedSelection.
|
slot |
|
slot |
Set if the specified status should be shown in the table
|
slot |
Offer automatic disable of using standard terminologies selector if custom segment names or colors are used frequently.
|
slot |
Set if the user can choose between the standard terminologies selector or the simple selectors for segment name and color.
|
slot |
Set the text used to filter the segments in the table
|
slot |
Set if standard terminologies are used for choosing segment name and color.
|
slot |
Set the settings key used to specify whether standard terminologies are used for name and color.
|
slot |
|
slot |
Show only selected segments.
Q_INVOKABLE qMRMLSortFilterSegmentsProxyModel * qMRMLSegmentsTableView::sortFilterProxyModel | ( | ) | const |
bool qMRMLSegmentsTableView::statusColumnVisible | ( | ) |
Q_INVOKABLE bool qMRMLSegmentsTableView::statusShown | ( | int | status | ) |
Q_INVOKABLE QTableView * qMRMLSegmentsTableView::tableWidget | ( | ) |
Get access to the table widget to allow low-level customization.
bool qMRMLSegmentsTableView::terminologySelectorAutoDisable | ( | ) | const |
Offer automatic disable of using standard terminologies selector if custom segment names or colors are used frequently.
bool qMRMLSegmentsTableView::terminologySelectorOptionVisible | ( | ) | const |
Returns true if the user can choose between the standard terminologies selector or the simple selectors for segment name and color.
|
static |
Assemble terminology info string (for tooltips) from a segment's terminology tags.
QString qMRMLSegmentsTableView::textFilter | ( | ) |
The text used to filter the segments in the table
|
slot |
Toggle visibility for the selected segments.
|
protectedslot |
Update the filter parameters in the vtkMRMLSegmentationNode.
|
protectedslot |
Update the widget form the MRML node Called when the segmentation node is modified
|
protected |
bool qMRMLSegmentsTableView::useTerminologySelector | ( | ) | const |
Returns true if standard terminologies are used for choosing segment name and color. If false then simple selectors are used.
QString qMRMLSegmentsTableView::useTerminologySelectorSettingsKey | ( | ) | const |
The settings key used to specify whether standard terminologies or simple selectors are used for choosing segment name and color. Default value is "Segmentations/UseTerminologySelector". If set to empty then the option will not be saved to and loaded from application settings.
bool qMRMLSegmentsTableView::visibilityColumnVisible | ( | ) |
|
protected |
Definition at line 275 of file qMRMLSegmentsTableView.h.