ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkPointBasedSpatialObject.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 itkPointBasedSpatialObject_h
19 #define itkPointBasedSpatialObject_h
20 
21 #include "itkSpatialObject.h"
22 #include "itkSpatialObjectPoint.h"
23 
24 namespace itk
25 {
36 template< unsigned int TDimension = 3 >
38  public SpatialObject< TDimension >
39 {
40 public:
41 
46  typedef double ScalarType;
48  typedef typename Superclass::PointType PointType;
52 
54  itkNewMacro(Self);
55 
58 
60  virtual const SpatialObjectPointType *
61  GetPoint( IdentifierType itkNotUsed(id) ) const
62  {
63  itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented"
64  << " in the base class" << std::endl);
65  return ITK_NULLPTR;
66  }
68 
69  virtual SpatialObjectPointType *
70  GetPoint( IdentifierType itkNotUsed(id) )
71  {
72  itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented"
73  << " in the base class" << std::endl);
74  return ITK_NULLPTR;
75  }
76 
78  virtual SizeValueType GetNumberOfPoints(void) const
79  {
80  itkWarningMacro(<< "PointBasedSpatialObject::GetNumberOfPoints() is not"
81  << " implemented in the base class" << std::endl);
82  return 0;
83  }
85 
87  bool ComputeLocalBoundingBox() const ITK_OVERRIDE
88  {
89  itkWarningMacro(<< "PointBasedSpatialObject::ComputeLocalBoundingBox() is"
90  << " not implemented in the base class" << std::endl);
91  return false;
92  }
94 
95 protected:
96  PointBasedSpatialObject(const Self &) ITK_DELETE_FUNCTION;
97  void operator=(const Self &) ITK_DELETE_FUNCTION;
98 
100  virtual ~PointBasedSpatialObject();
101 
103  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
104 };
105 } // end namespace itk
106 
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "itkPointBasedSpatialObject.hxx"
109 #endif
110 
111 #endif // itkPointBasedSpatialObject_h
virtual SpatialObjectPointType * itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented"<< " in the base class"<< std::endl)
Point< ScalarType, VDimension > PointType
Superclass::CovariantVectorType CovariantVectorType
virtual const SpatialObjectPointType * GetPoint(IdentifierType) const
SmartPointer< const Self > ConstPointer
Superclass::TransformType TransformType
This class serves as the base class for point-based spatial objects.
unsigned long SizeValueType
Definition: itkIntTypes.h:143
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
Implementation of the composite pattern.
virtual SizeValueType GetNumberOfPoints(void) const
Vector< ScalarType, VDimension > VectorType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
CovariantVector< ScalarType, VDimension > CovariantVectorType
Point used for spatial objets.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ScalableAffineTransform< double, VDimension > TransformType
SpatialObject< TDimension > Superclass
bool ComputeLocalBoundingBox() const override
Base class for all data objects in ITK.
SpatialObjectPoint< TDimension > SpatialObjectPointType