ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkPointSet.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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 "itkDataObject.h"
33 #include <vector>
34 #include <set>
35 
36 namespace itk
37 {
38 
86 template<
87  typename TPixelType,
88  unsigned int VDimension = 3,
89  typename TMeshTraits = DefaultStaticMeshTraits< TPixelType, VDimension, VDimension >
90  >
91 class ITK_EXPORT PointSet:public DataObject
92 {
93 public:
95  typedef PointSet Self;
99 
101  itkNewMacro(Self);
102 
104  itkTypeMacro(PointSet, Object);
105 
107  typedef TMeshTraits MeshTraits;
109 
116 
118  itkStaticConstMacro(PointDimension, unsigned int,
119  TMeshTraits::PointDimension);
120 
126 
131 
133  typedef long RegionType;
134 
137  itkGetConstMacro(MaximumNumberOfRegions, RegionType);
138 
139 protected:
143 
149 
150 public:
152  void PassStructure(Self *inputPointSet);
153 
154  virtual void Initialize(void);
155 
156  PointIdentifier GetNumberOfPoints(void) const;
157 
161  void SetPoints(PointsContainer *);
162 
163  PointsContainer * GetPoints(void);
164 
165  const PointsContainer * GetPoints(void) const;
166 
167  void SetPointData(PointDataContainer *);
168 
169  PointDataContainer * GetPointData(void);
170 
171  const PointDataContainer * GetPointData(void) const;
172 
175  void SetPoint(PointIdentifier, PointType);
176  bool GetPoint(PointIdentifier, PointType *) const;
177  PointType GetPoint(PointIdentifier) const;
179 
182  void SetPointData(PointIdentifier, PixelType);
183  bool GetPointData(PointIdentifier, PixelType *) const;
185 
187  virtual void UpdateOutputInformation();
188 
189  virtual void SetRequestedRegionToLargestPossibleRegion();
190 
191  virtual void CopyInformation(const DataObject *data);
192 
193  virtual void Graft(const DataObject *data);
194 
195  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
196 
197  virtual bool VerifyRequestedRegion();
198 
203  virtual void SetRequestedRegion(const DataObject *data);
204 
206  virtual void SetRequestedRegion(const RegionType & region);
207 
208  itkGetConstMacro(RequestedRegion, RegionType);
209 
211  virtual void SetBufferedRegion(const RegionType & region);
212 
213  itkGetConstMacro(BufferedRegion, RegionType);
214 
215 protected:
217  PointSet();
219  virtual void PrintSelf(std::ostream & os, Indent indent) const;
221 
222  // If the RegionType is ITK_UNSTRUCTURED_REGION, then the following
223  // variables represent the maximum number of region that the data
224  // object can be broken into, which region out of how many is
225  // currently in the buffered region, and the number of regions and
226  // the specific region requested for the update. Data objects that
227  // do not support any division of the data can simply leave the
228  // MaximumNumberOfRegions as 1. The RequestedNumberOfRegions and
229  // RequestedRegion are used to define the currently requested
230  // region. The LargestPossibleRegion is always requested region = 0
231  // and number of regions = 1;
237 
238 private:
239  PointSet(const Self &); //purposely not implemented
240  void operator=(const Self &); //purposely not implemented
241 }; // End Class: PointSet
242 } // end namespace itk
243 
244 #ifndef ITK_MANUAL_INSTANTIATION
245 #include "itkPointSet.hxx"
246 #endif
247 
248 /*
249 #ifndef ITK_MANUAL_INSTANTIATION
250 #include "itkPointSet.hxx"
251 #endif
252 */
253 
254 #endif
255