ITK  4.10.0
Insight Segmentation and Registration Toolkit
itkLandmarkSpatialObject.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 itkLandmarkSpatialObject_h
19 #define itkLandmarkSpatialObject_h
20 
21 #include <list>
22 
24 
25 namespace itk
26 {
37 template< unsigned int TDimension = 3 >
39  public PointBasedSpatialObject< TDimension >
40 {
41 public:
42 
47  typedef double ScalarType;
49  typedef std::vector< LandmarkPointType > PointListType;
51  typedef typename Superclass::PointType PointType;
56 
58  itkNewMacro(Self);
59 
62 
64  PointListType & GetPoints();
65 
67  const PointListType & GetPoints() const;
68 
70  void SetPoints(PointListType & newPoints);
71 
73  const SpatialObjectPointType * GetPoint(IdentifierType id) const ITK_OVERRIDE
74  {
75  return &( m_Points[id] );
76  }
77 
79  SpatialObjectPointType * GetPoint(IdentifierType id) ITK_OVERRIDE { return &( m_Points[id] ); }
80 
82  SizeValueType GetNumberOfPoints(void) const ITK_OVERRIDE
83  {
84  return static_cast<SizeValueType>( m_Points.size() );
85  }
86 
89  bool IsEvaluableAt(const PointType & point,
90  unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE;
91 
96  bool ValueAt(const PointType & point, double & value,
97  unsigned int depth = 0, char *name = ITK_NULLPTR) const ITK_OVERRIDE;
98 
100  bool IsInside(const PointType & point,
101  unsigned int depth, char *name) const ITK_OVERRIDE;
102 
106  virtual bool IsInside(const PointType & point) const;
107 
109  bool ComputeLocalBoundingBox(void) const ITK_OVERRIDE;
110 
111 protected:
112  LandmarkSpatialObject(const Self &) ITK_DELETE_FUNCTION;
113  void operator=(const Self &) ITK_DELETE_FUNCTION;
114 
115  PointListType m_Points;
116 
118  virtual ~LandmarkSpatialObject();
119 
121  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
122 };
123 } // end namespace itk
124 
125 #ifndef ITK_MANUAL_INSTANTIATION
126 #include "itkLandmarkSpatialObject.hxx"
127 #endif
128 
129 #endif // itkLandmarkSpatialObject_h
bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=nullptr) const override
Superclass::TransformType TransformType
BoundingBox< IdentifierType, VDimension, ScalarType, VectorContainerType > BoundingBoxType
Superclass::BoundingBoxType BoundingBoxType
void SetPoints(PointListType &newPoints)
SpatialObjectPointType * GetPoint(IdentifierType id) override
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Definition: itkArray.h:30
Superclass::TransformType TransformType
SizeValueType GetNumberOfPoints(void) const override
This class serves as the base class for point-based spatial objects.
SmartPointer< const Self > ConstPointer
unsigned long SizeValueType
Definition: itkIntTypes.h:143
Representation of a Landmark based on the spatial object classes.
virtual void PrintSelf(std::ostream &os, Indent indent) const override
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
SmartPointer< PointContainerType > PointContainerPointer
bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=nullptr) const override
void operator=(const Self &) ITK_DELETE_FUNCTION
PointBasedSpatialObject< TDimension > Superclass
Superclass::SpatialObjectPointType SpatialObjectPointType
bool ComputeLocalBoundingBox(void) const override
Point used for spatial objets.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
bool IsInside(const PointType &point, unsigned int depth, char *name) const override
std::vector< LandmarkPointType > PointListType
const SpatialObjectPointType * GetPoint(IdentifierType id) const override
VectorContainer< IdentifierType, PointType > PointContainerType
PointListType & GetPoints()
SpatialObjectPoint< TDimension > SpatialObjectPointType
SpatialObjectPoint< TDimension > LandmarkPointType