00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPointBasedSpatialObject.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/04/06 16:33:42 $ 00007 Version: $Revision: 1.6 $ 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 } 00068 00069 virtual SpatialObjectPointType* 00070 GetPoint(unsigned long itkNotUsed(id)) 00071 { 00072 itkWarningMacro(<<"PointBasedSpatialObject::GetPoint() is not implemented" 00073 <<" in the base class" << std::endl); 00074 return 0; 00075 } 00076 00078 virtual unsigned long GetNumberOfPoints(void) const 00079 { 00080 itkWarningMacro(<<"PointBasedSpatialObject::GetNumberOfPoints() is not" 00081 <<" implemented in the base class" << std::endl); 00082 return 0; 00083 } 00084 00086 bool ComputeLocalBoundingBox() const 00087 { 00088 itkWarningMacro(<<"PointBasedSpatialObject::ComputeLocalBoundingBox() is" 00089 <<" not implemented in the base class" << std::endl); 00090 return false; 00091 } 00092 00093 protected: 00094 00095 PointBasedSpatialObject(); 00096 virtual ~PointBasedSpatialObject(); 00097 00099 virtual void PrintSelf( std::ostream& os, Indent indent ) const; 00100 }; 00101 00102 } // end namespace itk 00103 00104 #ifndef ITK_MANUAL_INSTANTIATION 00105 #include "itkPointBasedSpatialObject.txx" 00106 #endif 00107 00108 #endif // __itkPointBasedSpatialObject_h