C:/cmcintos/defOrgs/source/physical/Def_Translation.h

00001 #if defined (_MSC_VER) && (_MSC_VER >= 1000)
00002 #pragma once
00003 #endif
00004 #ifndef _INC_DEF_TRANSLATION
00005 #define _INC_DEF_TRANSLATION
00006 
00007 #include "stdafx.h"
00008 #include "SpringMassDeformation.h"
00009 #include "itkSmartPointer.h"
00010 #include <itkLightObject.h> 
00011 
00012 
00013 namespace mial
00014 {
00015 
00017 
00023         template<class DataType, int nDims,class MType = vnl_matrix<DataType>, class VType = vnl_vector<DataType> >
00024         class Def_Translation: public SpringMassDeformation<DataType,nDims,MType,VType>
00025         {
00026         public:
00027                 //Smartpointers
00028                 typedef Def_Translation Self;
00029                 typedef itk::SmartPointer<Self>  Pointer;
00030                 typedef itk::SmartPointer<const Self>  ConstPointer;
00031                 //typedef itk::WeakPointer<const Self>  ConstWeakPointer;
00032                 itkNewMacro(Self);
00033 
00035                 virtual bool run(typename Deformation<DataType,nDims>::deformationIn* i,typename Deformation<DataType,nDims>::DefArgSet* org, std::stringstream *s = NULL);
00036 
00037                 typedef typename SpringMassDeformation<DataType,nDims,MType,VType>::Error Error;
00038                 typedef typename SpringMassDeformation<DataType,nDims,MType,VType>::DefArgSet DefArgSet;
00039 
00041 
00044                 struct deformationIn: public Deformation<DataType,nDims>::deformationIn{
00045                         //Smartpointers
00046                         typedef deformationIn Self;
00047                         typedef itk::SmartPointer<Self>  Pointer;
00048                         typedef itk::SmartPointer<const Self>  ConstPointer;
00049                         //typedef itk::WeakPointer<const Self>  ConstWeakPointer;
00050                         itkNewMacro(Self);
00051 
00052                         //Define all custom here
00054                         double amplitude[nDims];
00056 
00059                         bool fillFromStream(std::stringstream &args){for(int i=0;i<nDims;i++){args >> amplitude[i];}return false;}
00060                 protected:
00061                         deformationIn(){};
00062                 };
00063         protected:
00064                 Def_Translation();
00065 
00066         };
00067 } // end namespace mial
00068 #include "Def_Translation.cxx"
00069 #endif /* _INC_DEF_TRANSLATION*/

Generated on Wed Jul 19 13:05:18 2006 for IDO by  doxygen 1.4.7