00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkSpatialObjectTreeContainer.h,v $ 00005 Language: C++ 00006 Date: $Date: 2004/07/30 15:24:13 $ 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 #ifndef __itkSpatialObjectTreeContainer_h 00018 #define __itkSpatialObjectTreeContainer_h 00019 00020 #include <itkTreeContainer.h> 00021 #include <itkSpatialObject.h> 00022 #include <itkSpatialObjectTreeNode.h> 00023 00024 namespace itk 00025 { 00026 00027 template< unsigned int TDimension> class SpatialObject; 00028 00045 template <unsigned int TDimension> 00046 class SpatialObjectTreeContainer : public TreeContainer<itk::SpatialObject<TDimension>*> 00047 { 00048 00049 public: 00050 00052 typedef SpatialObject<TDimension> SpatialObjectType; 00053 typedef SpatialObjectType* SpatialObjectPointer; 00054 typedef TreeContainer<SpatialObjectPointer> Superclass; 00055 typedef SpatialObjectTreeContainer<TDimension> Self; 00056 typedef SmartPointer<Self> Pointer; 00057 typedef SmartPointer<const Self> ConstPointer; 00058 typedef SpatialObjectTreeNode<TDimension> TreeNodeType; 00059 00061 typedef typename Superclass::IteratorType IteratorType; 00062 00064 itkNewMacro(Self); 00065 00067 itkTypeMacro(SpatialObjectTreeContainer, TreeContainer); 00068 00070 bool SetRoot(SpatialObjectPointer element); 00071 bool SetRoot(typename Superclass::TreeNodeType* node) 00072 {return Superclass::SetRoot(node);} 00073 00074 protected: 00075 00076 SpatialObjectTreeContainer(); 00077 virtual ~SpatialObjectTreeContainer(); 00078 }; 00079 00080 } // namespace itk 00081 00082 00083 #ifndef ITK_MANUAL_INSTANTIATION 00084 #include "itkSpatialObjectTreeContainer.txx" 00085 #endif 00086 00087 00088 #endif