contrib/mul/vil3d/algo/vil3d_threshold.h
Go to the documentation of this file.
00001 #ifndef vil3d_threshold_h_
00002 #define vil3d_threshold_h_
00003 //:
00004 // \file
00005 // \brief Apply thresholds to image data and create a binary output image
00006 // \author Tim Cootes
00007 
00008 #include <vil3d/vil3d_image_view.h>
00009 
00010 //: Apply threshold such that dest(i,j,k,p)=true if src(i,j,k,p)>=t
00011 template<class srcT>
00012 void vil3d_threshold_above(const vil3d_image_view<srcT>& src,
00013                            vil3d_image_view<bool>& dest,  srcT t);
00014 
00015 //: Apply threshold such that dest(i,j,k,p)=true if src(i,j,k,p)<=t
00016 template<class srcT>
00017 void vil3d_threshold_below(const vil3d_image_view<srcT>& src,
00018                            vil3d_image_view<bool>& dest,  srcT t);
00019 
00020 //: Apply threshold such that dest(i,j,k,p)=true if t0<=src(i,j,k,p)<=t1
00021 template<class srcT>
00022 void vil3d_threshold_inside(const vil3d_image_view<srcT>& src,
00023                             vil3d_image_view<bool>& dest,  srcT t0, srcT t1);
00024 
00025 //: Apply threshold such that dest(i,j,k,p)=true if src(i,j,k,p)<=t0 or src(i,j,k,p)>=t1
00026 template<class srcT>
00027 void vil3d_threshold_outside(const vil3d_image_view<srcT>& src,
00028                              vil3d_image_view<bool>& dest,  srcT t0, srcT t1);
00029 
00030 #endif // vil3d_threshold_h_