Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
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,
00059 TCellTraits>*) = 0;
00060
00062 virtual int GetCellTopologyId() = 0;
00063
00064 protected:
00065 CellInterfaceVisitor() {};
00066 ~CellInterfaceVisitor() {};
00067
00068 private:
00069 CellInterfaceVisitor(const Self&);
00070 void operator=(const Self&);
00071 };
00072
00073
00097 template<
00098 typename TPixelType,
00099 typename TCellTraits,
00100 class CellTopology,
00101 class UserVisitor
00102 >
00103 class CellInterfaceVisitorImplementation :
00104 public CellInterfaceVisitor<TPixelType, TCellTraits>, public UserVisitor
00105 {
00106 public:
00108 typedef CellInterfaceVisitorImplementation Self;
00109 typedef SmartPointer<Self> Pointer;
00110
00112 itkNewMacro(Self);
00113
00115 itkTypeMacro(CellInterfaceVisitorImplementation,LightObject);
00116
00119 virtual int GetCellTopologyId() { return CellTopology::GetTopologyId();}
00120
00123 void VisitFromCell(unsigned long cellId, CellInterface<TPixelType,
00124 TCellTraits>* c)
00125 {
00126 this->UserVisitor::Visit(cellId, (CellTopology*)c);
00127 }
00128
00129 protected:
00130 CellInterfaceVisitorImplementation() {};
00131 ~CellInterfaceVisitorImplementation() {};
00132
00133 private:
00134 CellInterfaceVisitorImplementation(const Self&);
00135 void operator=(const Self&);
00136
00137 };
00138
00139 }
00140
00141 #endif
00142