contrib/mul/vil3d/vil3d_sample_profile_trilin.h
Go to the documentation of this file.
00001 #ifndef vil3d_sample_profile_trilin_h_
00002 #define vil3d_sample_profile_trilin_h_
00003 //:
00004 // \file
00005 // \brief Profile sampling functions for 3D images
00006 // \author Tim Cootes
00007 
00008 #include <vil3d/vil3d_image_view.h>
00009 
00010 //: Sample along profile, using trilinear interpolation
00011 //  Profile points are (x0+i.dx,y0+i.dy,z0+i.dz), where i=[0..n-1].
00012 //  Vector v is filled with n*np elements, where np=image.nplanes()*image.ncomponents()
00013 //  v[0]..v[np-1] are the values from point (x0,y0,z0)
00014 //  Points outside image return zero.
00015 // \relatesalso vil3d_image_view
00016 template <class imType, class vecType>
00017 void vil3d_sample_profile_trilin(
00018   vecType* v,
00019   const vil3d_image_view<imType>& image,
00020   double x0, double y0, double z0,
00021   double dx, double dy, double dz,
00022   unsigned n);
00023 
00024 //: Sample along profile, using safe-extend trilinear interpolation
00025 //  Profile points are along the line between p0 and p1 (in image co-ordinates).
00026 //  Vector v is resized to n*np elements, where np=image.n_planes().
00027 //  v[0]..v[np-1] are the values from point p
00028 //  Points outside image return nearest valid voxel value.
00029 // \relatesalso vil3d_image_view
00030 template <class imType, class vecType>
00031 void vil3d_sample_profile_trilin_extend(
00032   vecType* v,
00033   const vil3d_image_view<imType>& image,
00034   double x0, double y0, double z0,
00035   double dx, double dy, double dz,
00036   unsigned n);
00037 
00038 //: Sample along profile, using safe-extend trilinear interpolation
00039 //  Profile points are along the line between p0 and p1 (in image co-ordinates).
00040 //  Vector v is resized to n*np elements, where np=image.n_planes().
00041 //  v[0]..v[np-1] are the values from point p
00042 //  Points outside image return NA.
00043 // \relatesalso vil3d_image_view
00044 template <class imType, class vecType>
00045 void vil3d_sample_profile_trilin_edgena(
00046   vecType* v,
00047   const vil3d_image_view<imType>& image,
00048   double x0, double y0, double z0,
00049   double dx, double dy, double dz,
00050   unsigned n);
00051 
00052 #endif // vil3d_sample_profile_trilin_h_