GEL  2
GEL is a library for Geometry and Linear Algebra
/Users/jab/Documents/Teaching/02585/GEL2_and_demos/GEL/src/Geometry/GradientFilter.h
00001 #ifndef __GEOMETRY_VOXELGRID_GRADIENTFILTER_H
00002 #define __GEOMETRY_VOXELGRID_GRADIENTFILTER_H
00003 // Author: J. Andreas Brentzen,
00004 // Created: Wed Feb 13 11:00:1
00005 
00006 #include "CGLA/Vec3i.h"
00007 #include "CGLA/Vec3f.h"
00008 
00009 
00010 namespace Geometry
00011 {
00013                 template<class GridT>
00014   class GradientFilter
00015   {
00016                 const GridT* const grid;
00017   public:
00018                 typedef CGLA::Vec3f DataType;
00019 
00020     GradientFilter(const GridT* const _grid): grid(_grid) {}
00021 
00022                 bool map(const CGLA::Vec3i&, CGLA::Vec3f&) const;
00023 
00024                 bool in_domain(const CGLA::Vec3i& p) const;
00025 
00026                 const CGLA::Vec3f operator[](const CGLA::Vec3i& pi) const
00027                 {
00028                         CGLA::Vec3f g(0);
00029                         map(pi,g);
00030                         return g;
00031                 }
00032   };
00033 
00034 }
00035 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations