core/vil/algo/vil_threshold.h
Go to the documentation of this file.
00001 #ifndef vil_threshold_h_
00002 #define vil_threshold_h_
00003 //:
00004 // \file
00005 // \brief Apply thresholds to image data
00006 // \author Tim Cootes
00007 
00008 #include <vil/vil_image_view.h>
00009 
00010 //: Apply threshold such that dest(i,j,p)=true if src(i,j,p)>=t
00011 // \relatesalso vil_image_view
00012 template<class srcT>
00013 void vil_threshold_above(const vil_image_view<srcT>& src,
00014                          vil_image_view<bool>& dest,  srcT t);
00015 
00016 //: Apply threshold such that dest(i,j,p)=true if src(i,j,p)<=t
00017 // \relatesalso vil_image_view
00018 template<class srcT>
00019 void vil_threshold_below(const vil_image_view<srcT>& src,
00020                          vil_image_view<bool>& dest,  srcT t);
00021 
00022 //: Apply threshold such that dest(i,j,p)=true if t0<=src(i,j,p)<=t1
00023 // \relatesalso vil_image_view
00024 template<class srcT>
00025 void vil_threshold_inside(const vil_image_view<srcT>& src,
00026                           vil_image_view<bool>& dest,  srcT t0, srcT t1);
00027 
00028 //: Apply threshold such that dest(i,j,p)=true if src(i,j,p)<=t0 or src(i,j,p)>=t1
00029 // \relatesalso vil_image_view
00030 template<class srcT>
00031 void vil_threshold_outside(const vil_image_view<srcT>& src,
00032                            vil_image_view<bool>& dest,  srcT t0, srcT t1);
00033 
00034 #endif // vil_threshold_h_