ITK  4.6.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 
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
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
void operator=(const Self &)
SizeValueType IdentifierType
Definition: itkIntTypes.h:147
Implementation of the composite pattern.
virtual SizeValueType GetNumberOfPoints(void) const
Vector< ScalarType, VDimension > VectorType
CovariantVector< ScalarType, VDimension > CovariantVectorType
Point used for spatial objets.
virtual void PrintSelf(std::ostream &os, Indent indent) const
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ScalableAffineTransform< double, VDimension > TransformType
SpatialObject< TDimension > Superclass
Base class for all data objects in ITK.
SpatialObjectPoint< TDimension > SpatialObjectPointType