Item model for segments.
More...
#include <Modules/Loadable/Segmentations/Widgets/qMRMLSegmentsModel.h>
|
virtual int | maxColumnId () const |
| Must be reimplemented in subclasses that add new column types.
|
|
virtual void | onDisplayNodeModified () |
| Called when the vtkMRMLSegmentationDisplayNode is modified.
|
|
virtual void | onSegmentAdded (QString segmentID) |
| Called when a segment is added to the segmentation node.
|
|
virtual void | onSegmentModified (QString segmentID) |
| Called when a segment is modified in the segmentation node.
|
|
virtual void | onSegmentOrderModified () |
| Called when a the order of segment in the segmentation node is modified.
|
|
virtual void | onSegmentRemoved (QString segmentID) |
| Called when a segment is removed from the segmentation node.
|
|
| qMRMLSegmentsModel (qMRMLSegmentsModelPrivate *pimpl, QObject *parent=nullptr) |
|
virtual void | rebuildFromSegments () |
| Removes all items and regenerates the model from the segments in the segmentation node.
|
|
void | reorderItems () |
| Rearrange the order of the rows to match the indices of the segments in the MRML node.
|
|
virtual Qt::ItemFlags | segmentFlags (QString segmentID, int column) const |
|
virtual void | updateFromSegments () |
| Updates all items from the segments in the segmentation model.
|
|
virtual void | updateItemDataFromSegment (QStandardItem *item, QString segmentID, int column) |
| Update QStandardItem data associated using segmentID and column.
|
|
virtual void | updateItemFromSegment (QStandardItem *item, QString segmentID, int column) |
| Update QStandardItem associated using segmentID and column.
|
|
void | updateItemsFromColumnIndex (int column) |
| Update all of the the QStandardItem associated with a column.
|
|
void | updateItemsFromSegmentID (QString segmentID) |
| Update all of the the QStandardItem associated with a segment ID.
|
|
virtual void | updateSegmentFromItem (QString segmentID, QStandardItem *item) |
| Update a segment in the MRML node using the associated QStandardItem.
|
|
virtual void | updateSegmentFromItemData (QString segmentID, QStandardItem *item) |
| Update a segment in the MRML node using the associated QStandardItem data.
|
|
|
static void | onEvent (vtkObject *caller, unsigned long event, void *clientData, void *callData) |
|
|
QScopedPointer< qMRMLSegmentsModelPrivate > | d_ptr |
|
Item model for segments.
Associated with a vtkMRMLSegmentation node. This model creates one model item for each segment in the vtkSegmentation. Individual segment items are updated only if the associated segment is updated (vtkSegmentation::SegmentModified)
Definition at line 46 of file qMRMLSegmentsModel.h.
◆ Superclass
◆ SegmentTableItemDataRole
Enumerator |
---|
SegmentIDRole | |
IndexRole | |
VisibilityRole | |
StatusRole | |
Definition at line 68 of file qMRMLSegmentsModel.h.
◆ colorColumn
int qMRMLSegmentsModel::colorColumn |
|
readwrite |
◆ layerColumn
int qMRMLSegmentsModel::layerColumn |
|
readwrite |
Control in which column the segment layer is displayed (qMRMLSegmentsModel::LayerRole).
Definition at line 64 of file qMRMLSegmentsModel.h.
◆ nameColumn
QVTK_OBJECT int qMRMLSegmentsModel::nameColumn |
|
readwrite |
◆ opacityColumn
int qMRMLSegmentsModel::opacityColumn |
|
readwrite |
Control in which column the segment opacity is displayed (Qt::EditRole).
Definition at line 60 of file qMRMLSegmentsModel.h.
◆ statusColumn
int qMRMLSegmentsModel::statusColumn |
|
readwrite |
◆ visibilityColumn
int qMRMLSegmentsModel::visibilityColumn |
|
readwrite |
Control in which column the segment visibility is displayed (Qt::DecorationRole). A value of -1 (default) hides the column
Definition at line 55 of file qMRMLSegmentsModel.h.
◆ qMRMLSegmentsModel() [1/2]
qMRMLSegmentsModel::qMRMLSegmentsModel |
( |
QObject * | parent = nullptr | ) |
|
◆ ~qMRMLSegmentsModel()
qMRMLSegmentsModel::~qMRMLSegmentsModel |
( |
| ) |
|
|
override |
◆ qMRMLSegmentsModel() [2/2]
qMRMLSegmentsModel::qMRMLSegmentsModel |
( |
qMRMLSegmentsModelPrivate * | pimpl, |
|
|
QObject * | parent = nullptr ) |
|
protected |
◆ colorColumn()
int qMRMLSegmentsModel::colorColumn |
( |
| ) |
const |
◆ indexes()
QModelIndexList qMRMLSegmentsModel::indexes |
( |
QString | segmentID | ) |
const |
Return all the QModelIndexes (all the columns) for a given segment ID.
◆ indexFromSegmentID()
QModelIndex qMRMLSegmentsModel::indexFromSegmentID |
( |
QString | segmentID, |
|
|
int | column = 0 ) const |
Returns the index for the given segment ID.
◆ itemFromSegmentID()
QStandardItem * qMRMLSegmentsModel::itemFromSegmentID |
( |
QString | segmentID, |
|
|
int | column = 0 ) const |
Returns the item for the given segment ID.
◆ layerColumn()
int qMRMLSegmentsModel::layerColumn |
( |
| ) |
const |
◆ maxColumnId()
virtual int qMRMLSegmentsModel::maxColumnId |
( |
| ) |
const |
|
protectedvirtual |
Must be reimplemented in subclasses that add new column types.
◆ nameColumn()
int qMRMLSegmentsModel::nameColumn |
( |
| ) |
const |
◆ onDisplayNodeModified()
virtual void qMRMLSegmentsModel::onDisplayNodeModified |
( |
| ) |
|
|
protectedvirtual |
◆ onEvent()
static void qMRMLSegmentsModel::onEvent |
( |
vtkObject * | caller, |
|
|
unsigned long | event, |
|
|
void * | clientData, |
|
|
void * | callData ) |
|
staticprotected |
◆ onItemChanged
virtual void qMRMLSegmentsModel::onItemChanged |
( |
QStandardItem * | item | ) |
|
|
protectedvirtualslot |
Invoked when an item in the model is changed.
◆ onSegmentAdded()
virtual void qMRMLSegmentsModel::onSegmentAdded |
( |
QString | segmentID | ) |
|
|
protectedvirtual |
Called when a segment is added to the segmentation node.
◆ onSegmentModified()
virtual void qMRMLSegmentsModel::onSegmentModified |
( |
QString | segmentID | ) |
|
|
protectedvirtual |
Called when a segment is modified in the segmentation node.
◆ onSegmentOrderModified()
virtual void qMRMLSegmentsModel::onSegmentOrderModified |
( |
| ) |
|
|
protectedvirtual |
Called when a the order of segment in the segmentation node is modified.
◆ onSegmentRemoved()
virtual void qMRMLSegmentsModel::onSegmentRemoved |
( |
QString | segmentID | ) |
|
|
protectedvirtual |
Called when a segment is removed from the segmentation node.
◆ opacityColumn()
int qMRMLSegmentsModel::opacityColumn |
( |
| ) |
const |
◆ rebuildFromSegments()
virtual void qMRMLSegmentsModel::rebuildFromSegments |
( |
| ) |
|
|
protectedvirtual |
Removes all items and regenerates the model from the segments in the segmentation node.
◆ reorderItems()
void qMRMLSegmentsModel::reorderItems |
( |
| ) |
|
|
protected |
Rearrange the order of the rows to match the indices of the segments in the MRML node.
◆ requestSelectItems
void qMRMLSegmentsModel::requestSelectItems |
( |
QList< vtkIdType > | itemIDs | ) |
|
|
signal |
Signal requesting selecting items in the tree.
◆ segmentAboutToBeModified
void qMRMLSegmentsModel::segmentAboutToBeModified |
( |
const QString & | segmentID | ) |
|
|
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.
◆ segmentationNode()
The segmentation node that is used to populate the model.
◆ segmentFlags()
virtual Qt::ItemFlags qMRMLSegmentsModel::segmentFlags |
( |
QString | segmentID, |
|
|
int | column ) const |
|
protectedvirtual |
◆ segmentIDFromIndex()
QString qMRMLSegmentsModel::segmentIDFromIndex |
( |
const QModelIndex & | index | ) |
const |
Returns the segment ID for the given index.
◆ segmentIDFromItem()
QString qMRMLSegmentsModel::segmentIDFromItem |
( |
QStandardItem * | item | ) |
const |
Returns the segment ID for the given item.
◆ setColorColumn()
void qMRMLSegmentsModel::setColorColumn |
( |
int | column | ) |
|
◆ setLayerColumn()
void qMRMLSegmentsModel::setLayerColumn |
( |
int | layer | ) |
|
◆ setNameColumn()
void qMRMLSegmentsModel::setNameColumn |
( |
int | column | ) |
|
◆ setOpacityColumn()
void qMRMLSegmentsModel::setOpacityColumn |
( |
int | column | ) |
|
◆ setSegmentationNode()
◆ setStatusColumn()
void qMRMLSegmentsModel::setStatusColumn |
( |
int | column | ) |
|
◆ setVisibilityColumn()
void qMRMLSegmentsModel::setVisibilityColumn |
( |
int | column | ) |
|
◆ statusColumn()
int qMRMLSegmentsModel::statusColumn |
( |
| ) |
const |
◆ terminologyTooltipForSegment()
static Q_INVOKABLE QString qMRMLSegmentsModel::terminologyTooltipForSegment |
( |
vtkSegment * | segment | ) |
|
|
static |
Assemble terminology info string (for tooltips) from a segment's terminology tags.
◆ updateColumnCount
void qMRMLSegmentsModel::updateColumnCount |
( |
| ) |
|
|
protectedslot |
Recompute the number of columns in the model. Called when a [some]Column property is set. Needs maxColumnId() to be reimplemented in subclasses
◆ updateFromSegments()
virtual void qMRMLSegmentsModel::updateFromSegments |
( |
| ) |
|
|
protectedvirtual |
Updates all items from the segments in the segmentation model.
◆ updateItemDataFromSegment()
virtual void qMRMLSegmentsModel::updateItemDataFromSegment |
( |
QStandardItem * | item, |
|
|
QString | segmentID, |
|
|
int | column ) |
|
protectedvirtual |
Update QStandardItem data associated using segmentID and column.
◆ updateItemFromSegment()
virtual void qMRMLSegmentsModel::updateItemFromSegment |
( |
QStandardItem * | item, |
|
|
QString | segmentID, |
|
|
int | column ) |
|
protectedvirtual |
Update QStandardItem associated using segmentID and column.
◆ updateItemsFromColumnIndex()
void qMRMLSegmentsModel::updateItemsFromColumnIndex |
( |
int | column | ) |
|
|
protected |
Update all of the the QStandardItem associated with a column.
◆ updateItemsFromSegmentID()
void qMRMLSegmentsModel::updateItemsFromSegmentID |
( |
QString | segmentID | ) |
|
|
protected |
Update all of the the QStandardItem associated with a segment ID.
◆ updateSegmentFromItem()
virtual void qMRMLSegmentsModel::updateSegmentFromItem |
( |
QString | segmentID, |
|
|
QStandardItem * | item ) |
|
protectedvirtual |
Update a segment in the MRML node using the associated QStandardItem.
◆ updateSegmentFromItemData()
virtual void qMRMLSegmentsModel::updateSegmentFromItemData |
( |
QString | segmentID, |
|
|
QStandardItem * | item ) |
|
protectedvirtual |
Update a segment in the MRML node using the associated QStandardItem data.
◆ visibilityColumn()
int qMRMLSegmentsModel::visibilityColumn |
( |
| ) |
const |
◆ d_ptr
QScopedPointer<qMRMLSegmentsModelPrivate> qMRMLSegmentsModel::d_ptr |
|
protected |
The documentation for this class was generated from the following file: