00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPointBasedSpatialObject.h,v $ 00005 Language: C++ 00006 Date: $Date: 2007/01/28 19:24:56 $ 00007 Version: $Revision: 1.8 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __itkPointBasedSpatialObject_h 00019 #define __itkPointBasedSpatialObject_h 00020 00021 #include "itkSpatialObject.h" 00022 #include "itkSpatialObjectPoint.h" 00023 00024 namespace itk 00025 { 00026 00036 template < unsigned int TDimension = 3 > 00037 class PointBasedSpatialObject 00038 :public SpatialObject< TDimension > 00039 { 00040 00041 public: 00042 00043 typedef PointBasedSpatialObject Self; 00044 typedef SpatialObject< TDimension > Superclass; 00045 typedef SmartPointer < Self > Pointer; 00046 typedef SmartPointer < const Self > ConstPointer; 00047 typedef double ScalarType; 00048 typedef SpatialObjectPoint< TDimension > SpatialObjectPointType; 00049 typedef typename Superclass::PointType PointType; 00050 typedef typename Superclass::TransformType TransformType; 00051 typedef typename Superclass::VectorType VectorType; 00052 typedef typename Superclass::CovariantVectorType CovariantVectorType; 00053 00055 itkNewMacro( Self ); 00056 00058 itkTypeMacro( PointBasedSpatialObject, SpatialObject ); 00059 00061 virtual const SpatialObjectPointType* 00062 GetPoint(unsigned long itkNotUsed(id)) const 00063 { 00064 itkWarningMacro(<<"PointBasedSpatialObject::GetPoint() is not implemented" 00065 <<" in the base class" << std::endl); 00066 return 0; 00067 } 00069 00070 virtual SpatialObjectPointType* 00071 GetPoint(unsigned long itkNotUsed(id)) 00072 { 00073 itkWarningMacro(<<"PointBasedSpatialObject::GetPoint() is not implemented" 00074 <<" in the base class" << std::endl); 00075 return 0; 00076 } 00077 00079 virtual unsigned long GetNumberOfPoints(void) const 00080 { 00081 itkWarningMacro(<<"PointBasedSpatialObject::GetNumberOfPoints() is not" 00082 <<" implemented in the base class" << std::endl); 00083 return 0; 00084 } 00086 00088 bool ComputeLocalBoundingBox() const 00089 { 00090 itkWarningMacro(<<"PointBasedSpatialObject::ComputeLocalBoundingBox() is" 00091 <<" not implemented in the base class" << std::endl); 00092 return false; 00093 } 00095 00096 protected: 00097 PointBasedSpatialObject(const Self&); //purposely not implemented 00098 void operator=(const Self&); //purposely not implemented 00099 00100 PointBasedSpatialObject(); 00101 virtual ~PointBasedSpatialObject(); 00102 00104 virtual void PrintSelf( std::ostream& os, Indent indent ) const; 00105 }; 00106 00107 } // end namespace itk 00108 00109 #ifndef ITK_MANUAL_INSTANTIATION 00110 #include "itkPointBasedSpatialObject.txx" 00111 #endif 00112 00113 #endif // __itkPointBasedSpatialObject_h 00114