ITK  4.3.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 >
37 class ITK_EXPORT PointBasedSpatialObject:
38  public SpatialObject< TDimension >
39 {
40 public:
41 
46  typedef double ScalarType;
48  typedef typename Superclass::PointType PointType;
49  typedef typename Superclass::TransformType TransformType;
50  typedef typename Superclass::VectorType VectorType;
51  typedef typename Superclass::CovariantVectorType CovariantVectorType;
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 0;
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 0;
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
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 &); //purposely not implemented
97  void operator=(const Self &); //purposely not implemented
98 
100  virtual ~PointBasedSpatialObject();
101 
103  virtual void PrintSelf(std::ostream & os, Indent indent) const;
104 };
105 } // end namespace itk
106 
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "itkPointBasedSpatialObject.hxx"
109 #endif
110 
111 #endif // __itkPointBasedSpatialObject_h
112