00001 #if defined (_MSC_VER) && (_MSC_VER >= 1000)
00002 #pragma once
00003 #endif
00004 #ifndef _INC_Phys_VesselCrawlerEuler_422B64F703C8_INCLUDED
00005 #define _INC_Phys_VesselCrawlerEuler_422B64F703C8_INCLUDED
00006
00007 #include "stdafx.h"
00008 #include "Phys_Euler.h"
00009
00010
00011 #include "Geom_VesselCrawler.h"
00012
00013 #define DEBUG 0
00014
00015 namespace mial
00016 {
00017
00019
00029 template<class DataType, class TGradientImage, int nDims,class MType = vnl_matrix<DataType>, class VType = vnl_vector<DataType> >
00030 class Phys_VesselCrawlerEuler: public Phys_Euler<DataType, TGradientImage,nDims,MType,VType >
00031 {
00032
00033
00034
00035
00036 public:
00037 typedef Geom_VesselCrawler<DataType, nDims,MatrixType,VectorType> CrawlerGeometryType;
00038
00039 struct Error: public Phys_Euler<DataType, TGradientImage,nDims,MType,VType >::Error
00040 {
00041
00042 };
00043
00044
00045
00046
00047 protected:
00048
00049
00050
00051
00052
00053 public:
00054
00055
00057 CrawlerGeometryType * geom;
00058
00059
00060 void setGeometry(GeometryType * a){ if(a != NULL){geom = reinterpret_cast<CrawlerGeometryType *>(a); Phys_Euler::setGeometry(a);}else{Error e; e.msg="Cannot add null geometric layer"; throw & e;}};
00061
00062
00064 virtual bool simulate();
00065
00066
00067
00068 private:
00069 virtual void updateSpringsFromGeometric();
00070 };
00071 }
00072 #include "Phys_VesselCrawlerEuler.cxx"
00073 #endif