00001 #ifndef FAST_DISTANCE_HH
00002 #define FAST_DISTANCE_HH
00003
00004
00005
00006
00007 #include "Vol_GrabberT.hh"
00008 #include "HelperVolume.hh"
00009 #include "MarchingT.hh"
00010
00011
00012 namespace FastMarch {
00013
00014
00015
00016 template<typename Mesh, typename Grid>
00017 void compute_signed_dist(Mesh& _input, Grid& _volume)
00018 {
00019
00020 HelperVolume helper (_volume.x_resolution() ,
00021 _volume.y_resolution() ,
00022 _volume.z_resolution() );
00023 helper.init();
00024 std::cerr << "init finished\n";
00025
00026 Vol_GrabberT<Mesh, Grid> vg_(_input);
00027 vg_.render_into_volume(_volume, helper);
00028
00029 std::cerr << "vol-grab finished\n";
00030
00031
00032 MarchingT<Grid> marcher(_volume, helper);
00033 marcher.march();
00034 std::cerr << "marching finished\n";
00035 };
00036
00037
00038
00039 }
00040
00041 #endif // FAST_DISTANCE_HH defined
00042