* Check whether the DataNode contains a pointset, if not create one and add it. */
| 84 | * Check whether the DataNode contains a pointset, if not create one and add it. |
| 85 | */ |
| 86 | void mitk::SinglePointDataInteractor::DataNodeChanged() |
| 87 | { |
| 88 | if (GetDataNode() != nullptr) |
| 89 | { |
| 90 | auto *points = dynamic_cast<PointSet *>(GetDataNode()->GetData()); |
| 91 | if (points == nullptr) |
| 92 | { |
| 93 | m_PointSet = PointSet::New(); |
| 94 | GetDataNode()->SetData(m_PointSet); |
| 95 | } |
| 96 | else |
| 97 | { |
| 98 | points->Clear(); |
| 99 | m_PointSet = points; |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | Superclass::DataNodeChanged(); |
| 104 | } |
| 105 | |
| 106 | void mitk::SinglePointDataInteractor::SetMaxPoints(unsigned int) |
| 107 | { |