00001 #if defined (_MSC_VER) && (_MSC_VER >= 1000)
00002 #pragma once
00003 #endif
00004 #ifndef _INC_DEF_UniformScale
00005 #define _INC_DEF_UniformScale
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_UniformScale: public SpringMassDeformation<DataType,nDims,MType,VType>
00025 {
00026 public:
00027
00028 typedef Def_UniformScale Self;
00029 typedef itk::SmartPointer<Self> Pointer;
00030 typedef itk::SmartPointer<const Self> ConstPointer;
00031
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
00040
00042
00045 struct deformationIn: public Deformation<DataType,nDims>::deformationIn{
00046
00047 typedef deformationIn Self;
00048 typedef itk::SmartPointer<Self> Pointer;
00049 typedef itk::SmartPointer<const Self> ConstPointer;
00050
00051 itkNewMacro(Self);
00052
00053
00055 double scaleAmount;
00057
00061 bool fillFromStream(std::stringstream &args){args >> scaleAmount;return false;}
00062 protected:
00063 deformationIn(){};
00064 };
00065 protected:
00066 Def_UniformScale();
00067
00068 };
00069 }
00070 #include "Def_UniformScale.cxx"
00071 #endif