1 #ifndef vil_threshold_h_
2 #define vil_threshold_h_
3 //:
4 // \file
5 // \brief Apply thresholds to image data
6 // \author Tim Cootes
7 
8 #include <vil/vil_image_view.h>
9 
10 //: Apply threshold such that dest(i,j,p)=true if src(i,j,p)>=t
11 // \relatesalso vil_image_view
12 template<class srcT>
13 void vil_threshold_above(const vil_image_view<srcT>& src,
14                          vil_image_view<bool>& dest,  srcT t);
15 
16 //: Apply threshold such that dest(i,j,p)=true if src(i,j,p)<=t
17 // \relatesalso vil_image_view
18 template<class srcT>
19 void vil_threshold_below(const vil_image_view<srcT>& src,
20                          vil_image_view<bool>& dest,  srcT t);
21 
22 //: Apply threshold such that dest(i,j,p)=true if t0<=src(i,j,p)<=t1
23 // \relatesalso vil_image_view
24 template<class srcT>
25 void vil_threshold_inside(const vil_image_view<srcT>& src,
26                           vil_image_view<bool>& dest,  srcT t0, srcT t1);
27 
28 //: Apply threshold such that dest(i,j,p)=true if src(i,j,p)<=t0 or src(i,j,p)>=t1
29 // \relatesalso vil_image_view
30 template<class srcT>
31 void vil_threshold_outside(const vil_image_view<srcT>& src,
32                            vil_image_view<bool>& dest,  srcT t0, srcT t1);
33 
34 #endif // vil_threshold_h_
35