15 #include <vtkPointSet.h> 18 : m_SearchTreeInitialized(false),
20 m_MitkPoints(nullptr),
25 m_ANNDataPoints(nullptr),
26 m_ANNQueryPoint(nullptr),
27 m_ANNPointIndexes(nullptr),
28 m_ANNDistances(nullptr),
41 if (pointSet ==
nullptr)
43 itkWarningMacro(
"Points are nullptr!");
46 vtkPoints *points = pointSet->GetPoints();
57 size_t size = points->GetNumberOfPoints();
63 for (vtkIdType i = 0; (unsigned)i < size; ++i)
65 double *currentPoint = points->GetPoint(i);
76 if (points ==
nullptr)
78 itkWarningMacro(
"Points are nullptr!");
91 size_t size = points->
GetSize();
99 mitk::PointSet::PointsContainer::Iterator it;
101 mitk::PointSet::PointsContainer::ElementIdentifier currentId;
102 for (it = pointsContainer->Begin(); it != pointsContainer->End(); ++it, ++counter)
104 currentPoint = it->Value();
105 currentId = it->Index();
116 if (pointSet ==
nullptr)
118 itkWarningMacro(
"Points are nullptr!");
131 size_t size = pointSet->GetNumberOfPoints();
138 ITKPointSet::PointsContainerConstPointer pointsContainer = pointSet->GetPoints();
139 ITKPointSet::PointsContainer::ConstIterator it;
140 ITKPointSet::PointType currentPoint;
141 ITKPointSet::PointsContainer::ElementIdentifier currentId;
142 for (it = pointsContainer->Begin(); it != pointsContainer->End(); ++it, ++counter)
144 currentPoint = it->Value();
145 currentId = it->Index();
unsigned int m_ANNDimension
MyANNidxArray m_ANNPointIndexes
MyANNpoint m_ANNQueryPoint
mitk::PointSet * m_MitkPoints
DistanceType GetMinimalDistance(mitk::PointSet::PointType point)
ITKPointSet * m_ItkPoints
void SetPoints(vtkPointSet *points)
IdVectorType m_IndexToPointIdContainer
bool FindClosestPointAndDistance(mitk::PointSet::PointType point, IdType *id, DistanceType *dist)
bool m_SearchTreeInitialized
virtual int GetSize(unsigned int t=0) const
returns the current size of the point-list
Data structure which stores a set of points. Superclass of mitk::Mesh.
MyANNpointArray m_ANNDataPoints
virtual DataType::Pointer GetPointSet(int t=0) const
returns the pointset
unsigned long GetMTime() const override
Get the modified time of the last change of the contents this data object or its geometry.
MyANNdistArray m_ANNDistances
DataType::PointsContainer PointsContainer
itk::PointSet< PixelType, 3, MeshTraits > ITKPointSet
IdType FindClosestANNPoint(const MyANNpoint &point)
IdType FindClosestPoint(const double point[3])