Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkInspectionPositionWidget.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
14 
16 {
17  this->m_Controls.setupUi(this);
18 
19  this->m_CurrentPosition.Fill(0.0);
20 
21  m_Controls.btnAdd->setEnabled(false);
22 
23  connect(m_Controls.pointlistWidget, SIGNAL(PointListChanged()), this,
24  SLOT(OnPointListChanged()));
25  connect(m_Controls.btnAdd, SIGNAL(clicked()), this,
27 }
28 
30 {
31 }
32 
36 {
37  return m_CurrentPosition;
38 };
39 
40 const mitk::PointSet*
43 {
44  return m_Controls.pointlistWidget->GetPointSet();
45 };
46 
47 void
50 {
51  m_CurrentPosition = currentPos;
52 
53  std::ostringstream strm;
54  strm.imbue(std::locale("C"));
55  strm << currentPos[0] << " | " << currentPos[1] << " | " << currentPos[2];
56  m_Controls.lineCurrentPos->setText(QString::fromStdString(strm.str()));
57 };
58 
59 void
62 {
63  m_Controls.pointlistWidget->SetPointSetNode(newNode);
64  m_Controls.btnAdd->setEnabled(newNode != nullptr);
65 };
66 
69 {
70  return m_Controls.pointlistWidget->GetPointSetNode();
71 };
72 
73 void
76 {
78 };
79 
82 {
83  if (m_Controls.pointlistWidget->GetPointSet())
84  {
85  m_Controls.pointlistWidget->GetPointSet()->InsertPoint(m_CurrentPosition);
87  }
88 }
void SetCurrentPosition(const mitk::Point3D &currentPos)
Ui::QmitkInspectionPositionWidget m_Controls
void SetPositionBookmarkNode(mitk::DataNode *newNode)
assign a point set (contained in a node of DataStorage) for observation
Data structure which stores a set of points. Superclass of mitk::Mesh.
Definition: mitkPointSet.h:75
const mitk::PointSet * GetPositionBookmarks() const
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57
QmitkInspectionPositionWidget(QWidget *parent=nullptr)