ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkSurfaceSpatialObject.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 #ifndef itkSurfaceSpatialObject_h
19 #define itkSurfaceSpatialObject_h
20 
21 #include <list>
22 
25 
26 namespace itk
27 {
38 template< unsigned int TDimension = 3 >
40  public PointBasedSpatialObject< TDimension >
41 {
42 public:
43 
48  typedef double ScalarType;
50  typedef std::vector< SurfacePointType > PointListType;
52  typedef typename Superclass::PointType PointType;
58 
60  itkNewMacro(Self);
61 
64 
67  const PointListType & GetPoints() const;
69 
71  const SpatialObjectPointType * GetPoint(IdentifierType id) const ITK_OVERRIDE
72  {
73  return &( m_Points[id] );
74  }
75 
77  SpatialObjectPointType * GetPoint(IdentifierType id) ITK_OVERRIDE { return &( m_Points[id] ); }
78 
80  SizeValueType GetNumberOfPoints(void) const ITK_OVERRIDE { return m_Points.size(); }
81 
83  void SetPoints(PointListType & newPoints);
84 
87  bool IsEvaluableAt(const PointType & point,
88  unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE;
89 
94  bool ValueAt(const PointType & point, double & value,
95  unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE;
96 
98  bool IsInside(const PointType & point,
99  unsigned int depth, char *name) const ITK_OVERRIDE;
100 
104  virtual bool IsInside(const PointType & point) const;
105 
107  bool ComputeLocalBoundingBox() const ITK_OVERRIDE;
108 
110  bool Approximate3DNormals();
111 
112 protected:
113  SurfaceSpatialObject(const Self &) ITK_DELETE_FUNCTION;
114  void operator=(const Self &) ITK_DELETE_FUNCTION;
115 
117 
119  virtual ~SurfaceSpatialObject();
120 
122  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
123 };
124 } // end namespace itk
125 
126 #ifndef ITK_MANUAL_INSTANTIATION
127 #include "itkSurfaceSpatialObject.hxx"
128 #endif
129 
130 #endif // itkSurfaceSpatialObject_h
SurfaceSpatialObjectPoint< TDimension > SurfacePointType
Point used for a Surface definition.
bool ComputeLocalBoundingBox() const override
Superclass::CovariantVectorType CovariantVectorType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=nullptr) const override
PointBasedSpatialObject< TDimension > Superclass
const SpatialObjectPointType * GetPoint(IdentifierType id) const override
BoundingBox< IdentifierType, VDimension, ScalarType, VectorContainerType > BoundingBoxType
Superclass::TransformType TransformType
Superclass::CovariantVectorType CovariantVectorType
SmartPointer< const Self > ConstPointer
Superclass::TransformType TransformType
This class serves as the base class for point-based spatial objects.
PointListType & GetPoints()
unsigned long SizeValueType
Definition: itkIntTypes.h:143
VectorContainer< IdentifierType, PointType > PointContainerType
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
Superclass::BoundingBoxType BoundingBoxType
bool IsInside(const PointType &point, unsigned int depth, char *name) const override
bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=nullptr) const override
Representation of a Surface based on the spatial object classes.
Superclass::PointType PointType
SmartPointer< PointContainerType > PointContainerPointer
Point used for spatial objets.
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
std::vector< SurfacePointType > PointListType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::SpatialObjectPointType SpatialObjectPointType
void SetPoints(PointListType &newPoints)
SizeValueType GetNumberOfPoints(void) const override
Base class for all data objects in ITK.
SpatialObjectPoint< TDimension > SpatialObjectPointType
SpatialObjectPointType * GetPoint(IdentifierType id) override