ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkPointBasedSpatialObject.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkPointBasedSpatialObject_h
00019 #define __itkPointBasedSpatialObject_h
00020 
00021 #include "itkSpatialObject.h"
00022 #include "itkSpatialObjectPoint.h"
00023 
00024 namespace itk
00025 {
00036 template< unsigned int TDimension = 3 >
00037 class ITK_EXPORT PointBasedSpatialObject:
00038   public SpatialObject< TDimension >
00039 {
00040 public:
00041 
00042   typedef PointBasedSpatialObject                  Self;
00043   typedef SpatialObject< TDimension >              Superclass;
00044   typedef SmartPointer< Self >                     Pointer;
00045   typedef SmartPointer< const Self >               ConstPointer;
00046   typedef double                                   ScalarType;
00047   typedef SpatialObjectPoint< TDimension >         SpatialObjectPointType;
00048   typedef typename Superclass::PointType           PointType;
00049   typedef typename Superclass::TransformType       TransformType;
00050   typedef typename Superclass::VectorType          VectorType;
00051   typedef typename Superclass::CovariantVectorType CovariantVectorType;
00052 
00054   itkNewMacro(Self);
00055 
00057   itkTypeMacro(PointBasedSpatialObject, SpatialObject);
00058 
00060   virtual const SpatialObjectPointType *
00061   GetPoint( IdentifierType itkNotUsed(id) ) const
00062   {
00063     itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented"
00064                     << " in the base class" << std::endl);
00065     return 0;
00066   }
00068 
00069   virtual SpatialObjectPointType *
00070   GetPoint( IdentifierType itkNotUsed(id) )
00071   {
00072     itkWarningMacro(<< "PointBasedSpatialObject::GetPoint() is not implemented"
00073                     << " in the base class" << std::endl);
00074     return 0;
00075   }
00076 
00078   virtual SizeValueType GetNumberOfPoints(void) const
00079   {
00080     itkWarningMacro(<< "PointBasedSpatialObject::GetNumberOfPoints() is not"
00081                     << " implemented in the base class" << std::endl);
00082     return 0;
00083   }
00085 
00087   bool ComputeLocalBoundingBox() const
00088   {
00089     itkWarningMacro(<< "PointBasedSpatialObject::ComputeLocalBoundingBox() is"
00090                     << " not implemented in the base class" << std::endl);
00091     return false;
00092   }
00094 
00095 protected:
00096   PointBasedSpatialObject(const Self &); //purposely not implemented
00097   void operator=(const Self &);          //purposely not implemented
00098 
00099   PointBasedSpatialObject();
00100   virtual ~PointBasedSpatialObject();
00101 
00103   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00104 };
00105 } // end namespace itk
00106 
00107 #ifndef ITK_MANUAL_INSTANTIATION
00108 #include "itkPointBasedSpatialObject.hxx"
00109 #endif
00110 
00111 #endif // __itkPointBasedSpatialObject_h
00112