ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkSpatialObjectTreeContainer_h 00019 #define __itkSpatialObjectTreeContainer_h 00020 00021 #include "itkTreeContainer.h" 00022 #include "itkSpatialObjectTreeNode.h" 00023 00024 namespace itk 00025 { 00026 template< unsigned int TDimension > 00027 class SpatialObject; 00028 00046 template< unsigned int TDimension > 00047 class ITK_EXPORT SpatialObjectTreeContainer: 00048 public TreeContainer< itk::SpatialObject< TDimension > * > 00049 { 00050 public: 00051 00053 typedef SpatialObject< TDimension > SpatialObjectType; 00054 typedef SpatialObjectType * SpatialObjectPointer; 00055 typedef TreeContainer< SpatialObjectPointer > Superclass; 00056 typedef SpatialObjectTreeContainer< TDimension > Self; 00057 typedef SmartPointer< Self > Pointer; 00058 typedef SmartPointer< const Self > ConstPointer; 00059 typedef SpatialObjectTreeNode< TDimension > TreeNodeType; 00060 00062 typedef typename Superclass::IteratorType IteratorType; 00063 00065 itkNewMacro(Self); 00066 00068 itkTypeMacro(SpatialObjectTreeContainer, TreeContainer); 00069 00071 bool SetRoot(const SpatialObjectPointer element); 00072 00073 bool SetRoot(typename Superclass::TreeNodeType *node) 00074 { return Superclass::SetRoot(node); } 00075 protected: 00076 00077 SpatialObjectTreeContainer(); 00078 virtual ~SpatialObjectTreeContainer(); 00079 }; 00080 } // namespace itk 00081 00082 #ifndef ITK_MANUAL_INSTANTIATION 00083 #include "itkSpatialObjectTreeContainer.hxx" 00084 #endif 00085 00086 #endif 00087