VMTK
vtkvmtkNeighborhood.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: VMTK
4  Module: $RCSfile: vtkvmtkNeighborhood.h,v $
5  Language: C++
6 
7  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
8  See LICENSE file for details.
9 
10  Portions of this code are covered under the VTK copyright.
11  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
12  for details.
13 
14  This software is distributed WITHOUT ANY WARRANTY; without even
15  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16  PURPOSE. See the above copyright notices for more information.
17 
18 =========================================================================*/
28 #ifndef __vtkvmtkNeighborhood_h
29 #define __vtkvmtkNeighborhood_h
30 
31 #include "vtkObject.h"
32 #include "vtkvmtkDataSetItem.h"
33 //#include "vtkvmtkDifferentialGeometryWin32Header.h"
34 #include "vtkvmtkWin32Header.h"
35 
36 class VTK_VMTK_DIFFERENTIAL_GEOMETRY_EXPORT vtkvmtkNeighborhood : public vtkvmtkDataSetItem
37 {
38 public:
39 
41 
42  vtkGetMacro(IsBoundary,bool);
43 
44  vtkIdType GetNumberOfPoints() {return this->NPoints;};
45  vtkIdType GetPointId(vtkIdType i) {return this->PointIds[i];};
46 
47  vtkIdType *GetPointer(vtkIdType i) {return this->PointIds+i;};
48 
50  virtual void Build() VTK_OVERRIDE = 0;
51 
53  virtual void DeepCopy(vtkvmtkItem *src) VTK_OVERRIDE;
54 
55 protected:
58 
59  void ResizePointList(vtkIdType ptId, int size);
60 
61  vtkIdType NPoints;
62  vtkIdType* PointIds;
63  bool IsBoundary;
64 
65 private:
66  vtkvmtkNeighborhood(const vtkvmtkNeighborhood&); // Not implemented.
67  void operator=(const vtkvmtkNeighborhood&); // Not implemented.
68 };
69 
70 #endif
71 
create an item instance with a data set and particular point id.
vtkIdType * GetPointer(vtkIdType i)
vtkIdType GetPointId(vtkIdType i)
Base class for the construction of neighborhoods and stencil from a set of points.
Definition: vtkvmtkItem.h:35
Query the neighborhood surrounding the set point id in an data set item.
virtual void Build()=0