Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <QmitkPointListModel.h>
Public Slots | |
void | MoveSelectedPointUp () |
void | MoveSelectedPointDown () |
void | RemoveSelectedPoint () |
Signals | |
void | SignalUpdateSelection () |
Public Member Functions | |
QmitkPointListModel (mitk::DataNode *=NULL, int t=0, QObject *parent=0) | |
~QmitkPointListModel () | |
Qt::ItemFlags | flags (const QModelIndex &) const override |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
interface of QAbstractListModel More... | |
QVariant | data (const QModelIndex &index, int role) const override |
interface of QAbstractListModel More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
interface of QAbstractListModel More... | |
void | SetPointSetNode (mitk::DataNode *pointSetNode) |
which point set to work on More... | |
mitk::PointSet * | GetPointSet () const |
which point set to work on More... | |
mitk::DataNode * | GetPointSetNode () const |
void | SetTimeStep (int t) |
which time step to display/model More... | |
int | GetTimeStep () const |
which time step to display/model More... | |
void | OnPointSetChanged (const itk::EventObject &e) |
itk observer for point set "modified" events More... | |
void | OnPointSetDeleted (const itk::EventObject &e) |
itk observer for point set "delete" events More... | |
bool | GetPointForModelIndex (const QModelIndex &index, mitk::PointSet::PointType &p, mitk::PointSet::PointIdentifier &id) const |
get point and point ID that correspond to a given QModelIndex More... | |
bool | GetModelIndexForPointID (mitk::PointSet::PointIdentifier id, QModelIndex &index) const |
returns a QModelIndex for a given point ID More... | |
Protected Member Functions | |
void | ObserveNewPointSet (mitk::DataNode *pointSetNode) |
internally observe different point set More... | |
mitk::PointSet * | CheckForPointSetInNode (mitk::DataNode *node) const |
Protected Attributes | |
mitk::DataNode * | m_PointSetNode |
unsigned int | m_PointSetModifiedObserverTag |
unsigned int | m_PointSetDeletedObserverTag |
int | m_TimeStep |
Definition at line 26 of file QmitkPointListModel.h.
QmitkPointListModel::QmitkPointListModel | ( | mitk::DataNode * | pointSetNode = NULL , |
int | t = 0 , |
||
QObject * | parent = 0 |
||
) |
Definition at line 26 of file QmitkPointListModel.cpp.
References ObserveNewPointSet().
QmitkPointListModel::~QmitkPointListModel | ( | ) |
Definition at line 42 of file QmitkPointListModel.cpp.
References ObserveNewPointSet().
|
protected |
Definition at line 313 of file QmitkPointListModel.cpp.
References mitk::DataNode::GetData().
Referenced by data(), GetModelIndexForPointID(), GetPointForModelIndex(), GetPointSet(), MoveSelectedPointDown(), MoveSelectedPointUp(), ObserveNewPointSet(), OnPointSetDeleted(), RemoveSelectedPoint(), and rowCount().
|
override |
interface of QAbstractListModel
Definition at line 155 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), GetPointForModelIndex(), m_PointSetNode, and m_TimeStep.
|
override |
Definition at line 36 of file QmitkPointListModel.cpp.
bool QmitkPointListModel::GetModelIndexForPointID | ( | mitk::PointSet::PointIdentifier | id, |
QModelIndex & | index | ||
) | const |
returns a QModelIndex for a given point ID
Documentation The mitk::PointSet uses a map to store points in an ID<–>Point relation. The IDs are not neccesarily continuously numbered, therefore, we can not directly use the point ID as a QModelIndex. This method returns a QModelIndex for a given point ID in the outgoing parameter index.
[in] | mitk::PointSet::PointIdentifier | id The point ID for which the QModelIndex will be created |
[out] | QModelIndex& | index if a point with the ID id was found, index will contain a corresponding QModelIndex for that point |
Definition at line 242 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), m_PointSetNode, and m_TimeStep.
Referenced by QmitkPointListView::OnListViewSelectionChanged(), and QmitkPointListView::OnPointSetSelectionChanged().
bool QmitkPointListModel::GetPointForModelIndex | ( | const QModelIndex & | index, |
mitk::PointSet::PointType & | p, | ||
mitk::PointSet::PointIdentifier & | id | ||
) | const |
get point and point ID that correspond to a given QModelIndex
The mitk::PointSet uses a map to store points in an ID<–>Point relation. The IDs are not neccesarily continuously numbered, therefore, we can not directly use the QModelIndex as point ID. This method returns the point and the corresponding point id for a given QModelIndex. The point and the point ID are returned in the outgoing parameters p and id. If a valid point and ID were found, the method returns true, otherwise it returns false
[in] | QModelIndex | &index the index for which a point is requested. The row() part of the index is used to find a corresponding point |
[out] | mitk::Point3D& | p If a valid point is found, it will be stored in the p parameter |
[out] | mitk::PointSet::PointIdentifier& | id If a valid point is found, the corresponding ID will be stored in id |
Definition at line 208 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), m_PointSetNode, and m_TimeStep.
Referenced by data(), and QmitkPointListView::OnPointDoubleClicked().
mitk::PointSet * QmitkPointListModel::GetPointSet | ( | ) | const |
which point set to work on
Definition at line 55 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), and m_PointSetNode.
Referenced by QmitkPointListView::ClearPointList(), QmitkPointListView::GetPointSet(), QmitkPointListView::OnListViewSelectionChanged(), QmitkPointListView::OnPointDoubleClicked(), QmitkPointListView::OnPointSetSelectionChanged(), and QmitkPointListView::wheelEvent().
mitk::DataNode* QmitkPointListModel::GetPointSetNode | ( | ) | const |
int QmitkPointListModel::GetTimeStep | ( | ) | const |
which time step to display/model
Definition at line 68 of file QmitkPointListModel.cpp.
References m_TimeStep.
Referenced by QmitkPointListView::fadeTimeStepIn(), QmitkPointListView::OnListViewSelectionChanged(), QmitkPointListView::OnPointDoubleClicked(), QmitkPointListView::OnPointSetSelectionChanged(), and QmitkPointListView::wheelEvent().
|
override |
interface of QAbstractListModel
Definition at line 191 of file QmitkPointListModel.cpp.
|
slot |
Definition at line 283 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), mitk::RenderingManager::GetInstance(), m_PointSetNode, m_TimeStep, mitk::OpMOVEPOINTDOWN, and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmitkPointListView::keyPressEvent(), and QmitkPointListWidget::MoveSelectedPointDown().
|
slot |
Definition at line 268 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), mitk::RenderingManager::GetInstance(), m_PointSetNode, m_TimeStep, mitk::OpMOVEPOINTUP, and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmitkPointListView::keyPressEvent(), and QmitkPointListWidget::MoveSelectedPointUp().
|
protected |
internally observe different point set
Definition at line 73 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), mitk::DataNode::GetData(), m_PointSetDeletedObserverTag, m_PointSetModifiedObserverTag, m_PointSetNode, MITK_ERROR, mitk::New(), OnPointSetChanged(), and OnPointSetDeleted().
Referenced by QmitkPointListModel(), SetPointSetNode(), and ~QmitkPointListModel().
void QmitkPointListModel::OnPointSetChanged | ( | const itk::EventObject & | e | ) |
itk observer for point set "modified" events
Definition at line 120 of file QmitkPointListModel.cpp.
References SignalUpdateSelection().
Referenced by ObserveNewPointSet().
void QmitkPointListModel::OnPointSetDeleted | ( | const itk::EventObject & | e | ) |
itk observer for point set "delete" events
Definition at line 127 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), m_PointSetDeletedObserverTag, m_PointSetModifiedObserverTag, and m_PointSetNode.
Referenced by ObserveNewPointSet().
|
slot |
Definition at line 298 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), mitk::RenderingManager::GetInstance(), m_PointSetNode, m_TimeStep, mitk::OpREMOVE, and mitk::RenderingManager::RequestUpdateAll().
Referenced by QmitkPointListView::ClearPointList(), QmitkPointListView::keyPressEvent(), and QmitkPointListWidget::RemoveSelectedPoint().
|
override |
interface of QAbstractListModel
Definition at line 142 of file QmitkPointListModel.cpp.
References CheckForPointSetInNode(), m_PointSetNode, and m_TimeStep.
void QmitkPointListModel::SetPointSetNode | ( | mitk::DataNode * | pointSetNode | ) |
which point set to work on
Definition at line 47 of file QmitkPointListModel.cpp.
References ObserveNewPointSet(), and SignalUpdateSelection().
Referenced by QmitkPointListView::SetPointSetNode().
void QmitkPointListModel::SetTimeStep | ( | int | t | ) |
which time step to display/model
Definition at line 60 of file QmitkPointListModel.cpp.
References m_TimeStep, and SignalUpdateSelection().
Referenced by QmitkPointListView::wheelEvent().
|
signal |
emitted, when views should update their selection status (because mouse interactions in render windows can change the selection status of points)
Referenced by OnPointSetChanged(), SetPointSetNode(), and SetTimeStep().
|
protected |
Definition at line 125 of file QmitkPointListModel.h.
Referenced by ObserveNewPointSet(), and OnPointSetDeleted().
|
protected |
Definition at line 124 of file QmitkPointListModel.h.
Referenced by ObserveNewPointSet(), and OnPointSetDeleted().
|
protected |
Definition at line 123 of file QmitkPointListModel.h.
Referenced by data(), GetModelIndexForPointID(), GetPointForModelIndex(), GetPointSet(), MoveSelectedPointDown(), MoveSelectedPointUp(), ObserveNewPointSet(), OnPointSetDeleted(), RemoveSelectedPoint(), and rowCount().
|
protected |
Definition at line 126 of file QmitkPointListModel.h.
Referenced by data(), GetModelIndexForPointID(), GetPointForModelIndex(), GetTimeStep(), MoveSelectedPointDown(), MoveSelectedPointUp(), RemoveSelectedPoint(), rowCount(), and SetTimeStep().