Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkCellInterfaceVisitor.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkCellInterfaceVisitor.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:03 $ 00007 Version: $Revision: 1.12 $ 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 __itkCellInterfaceVisitor_h 00018 #define __itkCellInterfaceVisitor_h 00019 00020 #include "itkLightObject.h" 00021 #include "itkObjectFactory.h" 00022 00023 namespace itk 00024 { 00025 // forward reference CellInterface 00026 template < 00027 typename TPixelType, 00028 typename TCellTraits 00029 > 00030 class CellInterface; 00031 00041 template < 00042 typename TPixelType, 00043 typename TCellTraits 00044 > 00045 class CellInterfaceVisitor : public LightObject 00046 { 00047 public: 00049 typedef CellInterfaceVisitor Self; 00050 typedef LightObject Superclass; 00051 typedef SmartPointer<Self> Pointer; 00052 typedef SmartPointer<const Self> ConstPointer; 00053 00055 itkTypeMacro(CellInterfaceVisitor,LightObject); 00056 00058 virtual void VisitFromCell(unsigned long cellId, CellInterface<TPixelType, TCellTraits>*) = 0; 00059 00061 virtual int GetCellTopologyId() = 0; 00062 00063 protected: 00064 CellInterfaceVisitor() {}; 00065 ~CellInterfaceVisitor() {}; 00066 00067 private: 00068 CellInterfaceVisitor(const Self&); //purposely not implemented 00069 void operator=(const Self&); //purposely not implemented 00070 }; 00071 00072 00096 template< 00097 typename TPixelType, 00098 typename TCellTraits, 00099 class CellTopology, 00100 class UserVisitor 00101 > 00102 class CellInterfaceVisitorImplementation : 00103 public CellInterfaceVisitor<TPixelType, TCellTraits>, public UserVisitor 00104 { 00105 public: 00107 typedef CellInterfaceVisitorImplementation Self; 00108 typedef SmartPointer<Self> Pointer; 00109 00111 itkNewMacro(Self); 00112 00114 itkTypeMacro(CellInterfaceVisitorImplementation,LightObject); 00115 00118 virtual int GetCellTopologyId() { return CellTopology::GetTopologyId();} 00119 00122 void VisitFromCell(unsigned long cellId, CellInterface<TPixelType, TCellTraits>* c) 00123 { 00124 this->UserVisitor::Visit(cellId, (CellTopology*)c); 00125 } 00126 00127 protected: 00128 CellInterfaceVisitorImplementation() {}; 00129 ~CellInterfaceVisitorImplementation() {}; 00130 00131 private: 00132 CellInterfaceVisitorImplementation(const Self&); //purposely not implemented 00133 void operator=(const Self&); //purposely not implemented 00134 00135 }; 00136 00137 } // end namespace itk 00138 00139 #endif

Generated at Sat Mar 31 02:15:29 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000