C:/cmcintos/defOrgs/source/behavioral/Beh_UniformScale.h

00001 #if defined (_MSC_VER) && (_MSC_VER >= 1000)
00002 #pragma once
00003 #endif
00004 #ifndef _INC_BEH_UniformScale_42E452A7009C_INCLUDED
00005 #define _INC_BEH_UniformScale_42E452A7009C_INCLUDED
00006 
00007 #include "Behavior.h"
00008 
00009 namespace mial{
00010 
00023         template<class Type, int nDims> 
00024         class Beh_UniformScale 
00025                 : public Behavior<Type, nDims>
00026         {
00027         public:
00028                 //Smart pointers
00029                 typedef Beh_UniformScale Self;
00030                 typedef itk::SmartPointer<Self>  Pointer;
00031                 typedef itk::SmartPointer<const Self>  ConstPointer;
00032                 typedef itk::WeakPointer<const Self>  ConstWeakPointer;
00033 
00034                 itkNewMacro(Self);
00035                 
00036                 typedef typename Behavior<Type,nDims>::Error Error;
00037 
00039 
00042                 struct behaviorIn: public Behavior<Type,nDims>::behaviorIn{
00043                         //Setup the smart pointer
00044                         typedef behaviorIn Self;
00045                         typedef itk::SmartPointer<Self>  Pointer;
00046                         typedef itk::SmartPointer<const Self>  ConstPointer;
00047                         typedef itk::WeakPointer<const Self>  ConstWeakPointer;
00048                         itkNewMacro(Self);
00049 
00050                         //Define all custom here
00052                         double scaleAmount;
00054                         int duration;
00055                         
00057 
00060                         bool fillFromStream(std::stringstream &args){
00061                                 args >> duration;
00062                                 args >> scaleAmount;
00063                                 return true;};
00064                 protected:
00065                         behaviorIn(){};
00066         };
00068                 double startTime;
00070                 double endTime;
00071 
00073                 virtual bool run(typename Behavior<Type,nDims>::behaviorIn * i, std::stringstream *s);
00074                 bool isFinished(){return (this->physLayer->getTime()>endTime);};
00075 
00076                 virtual bool update(){return false;};
00077                 virtual void cleanUp();
00078 
00079         protected:
00080                 Beh_UniformScale();
00081         };
00082 }//end mial
00083 #include "Beh_UniformScale.cxx"
00084 #endif /* _INC_BEH_UniformScale*/

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