ITK  6.0.0
Insight Toolkit
itkPointSet.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 /*=========================================================================
19  *
20  * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21  *
22  * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23  *
24  * For complete copyright, license and disclaimer of warranty information
25  * please refer to the NOTICE file at the top of the ITK source tree.
26  *
27  *=========================================================================*/
28 #ifndef itkPointSet_h
29 #define itkPointSet_h
30 
31 #include "itkPointSetBase.h"
33 #include <set>
34 
35 namespace itk
36 {
37 
78 template <typename TPixelType,
79  unsigned int VDimension = 3,
80  typename TMeshTraits = DefaultStaticMeshTraits<TPixelType, VDimension, VDimension>>
81 class ITK_TEMPLATE_EXPORT PointSet : public PointSetBase<typename TMeshTraits::PointsContainer>
82 {
83 public:
84  ITK_DISALLOW_COPY_AND_MOVE(PointSet);
85 
87  using Self = PointSet;
91 
93  itkNewMacro(Self);
94 
96  itkOverrideGetNameOfClassMacro(PointSet);
97 
99  using MeshTraits = TMeshTraits;
101 
106 
110 
112  using PointDataContainerIterator = typename PointDataContainer::ConstIterator;
113 
114 protected:
119  PointDataContainerPointer m_PointDataContainer{};
120 
121 public:
125  void
126  Initialize() override;
127 
129  void
130  SetPointData(PointDataContainer *);
131 
133  PointDataContainer *
134  GetPointData();
135 
137  const PointDataContainer *
138  GetPointData() const;
139 
144  void SetPointData(PointIdentifier, PixelType);
145 
152  bool
153  GetPointData(PointIdentifier, PixelType *) const;
154 
155  void
156  Graft(const DataObject * data) override;
157 
158 protected:
160  PointSet() = default;
161  ~PointSet() override = default;
162  void
163  PrintSelf(std::ostream & os, Indent indent) const override;
167  InternalClone() const override;
168 
169 }; // End Class: PointSet
170 } // end namespace itk
171 
172 #ifndef ITK_MANUAL_INSTANTIATION
173 # include "itkPointSet.hxx"
174 #endif
175 
176 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::PointSet< TCoordType, VDimension, DefaultDynamicMeshTraits< TCoordType, 2, 2, TCoordType > >::PointDataContainerPointer
typename PointDataContainer::Pointer PointDataContainerPointer
Definition: itkPointSet.h:108
itk::PointSet< TCoordType, VDimension, DefaultDynamicMeshTraits< TCoordType, 2, 2, TCoordType > >::PointDataContainerConstPointer
typename PointDataContainer::ConstPointer PointDataContainerConstPointer
Definition: itkPointSet.h:109
itk::PointSet
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:81
itkPointSetBase.h
itk::DefaultDynamicMeshTraits::PointIdentifier
IdentifierType PointIdentifier
Definition: itkDefaultDynamicMeshTraits.h:81
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::MapContainer
A wrapper of the STL "map" container.
Definition: itkMapContainer.h:45
itk::PointSet< TCoordType, VDimension, DefaultDynamicMeshTraits< TCoordType, 2, 2, TCoordType > >::PointIdentifier
typename MeshTraits::PointIdentifier PointIdentifier
Definition: itkPointSet.h:103
itk::PointSetBase
A superclass of PointSet supports point (geometric coordinate and attribute) definition.
Definition: itkPointSetBase.h:56
itk::PointSet< TCoordType, VDimension, DefaultDynamicMeshTraits< TCoordType, 2, 2, TCoordType > >::PixelType
typename MeshTraits::PixelType PixelType
Definition: itkPointSet.h:100
itk::DefaultDynamicMeshTraits::PixelType
TPixelType PixelType
Definition: itkDefaultDynamicMeshTraits.h:70
itk::PointSet< TCoordType, VDimension, DefaultDynamicMeshTraits< TCoordType, 2, 2, TCoordType > >::PointDataContainerIterator
typename PointDataContainer::ConstIterator PointDataContainerIterator
Definition: itkPointSet.h:112
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkDefaultStaticMeshTraits.h
itk::PointSet< TCoordType, VDimension, DefaultDynamicMeshTraits< TCoordType, 2, 2, TCoordType > >::PointDataContainer
typename MeshTraits::PointDataContainer PointDataContainer
Definition: itkPointSet.h:105
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:61
itk::PointSet< TCoordType, VDimension, DefaultDynamicMeshTraits< TCoordType, 2, 2, TCoordType > >::PointType
typename MeshTraits::PointType PointType
Definition: itkPointSet.h:104
itk::DefaultDynamicMeshTraits
A simple structure that holds type information for a mesh and its cells.
Definition: itkDefaultDynamicMeshTraits.h:63
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293