vil_checker_board.h
Go to the documentation of this file.
1 // This is core/vil/algo/vil_checker_board.h
2 #ifndef vil_checker_board_h_
3 #define vil_checker_board_h_
4 //:
5 // \file
6 // \brief Build checker board image from two source
7 // \author Gehua Yang
8 
9 #include <vil/vil_fwd.h>
10 
11 //: parameters for building checkboard
13 {
14  private:
15  int xsize_, ysize_;
17  int xoff_, yoff_;
21  public:
23  : xsize_(-1), ysize_(-1), xnum_blks_(0), ynum_blks_(0),
24  xoff_(0), yoff_(0),
25  use_alpha_plane_(false),
27  {
28  }
29 
30  vil_checker_board_params( int xsize, int ysize )
31  : xsize_(xsize), ysize_(ysize), xnum_blks_(0), ynum_blks_(0),
32  xoff_(0), yoff_(0),
33  use_alpha_plane_(false),
35  {
36  }
37 
38  void set_offset( int xoff, int yoff )
39  { xoff_=xoff; yoff_=yoff; }
40 
41  void use_alpha_plane( bool use )
42  { use_alpha_plane_ = use; }
43 
44  void not_use_color( int c )
45  { not_use_color_ = c; not_use_color_flag_ = true; }
46 
47  template< typename DEST, typename SRC >
48  friend
49  void
51  vil_image_view< SRC > const& src1,
52  vil_image_view< SRC > const& src2,
53  vil_checker_board_params const& params );
54 };
55 
56 
57 //: build a checker board image from two images
58 // \param params specify the block size/offset, transparency
59 template< typename DEST, typename SRC >
60 void
62  vil_image_view< SRC > const& src1,
63  vil_image_view< SRC > const& src2,
64  vil_checker_board_params const& params );
65 
66 
67 #endif // vil_checker_board_h_
void use_alpha_plane(bool use)
Concrete view of image data of type T held in memory.
Definition: vil_fwd.h:13
vil_checker_board_params(int xsize, int ysize)
friend void vil_checker_board(vil_image_view< DEST > &des, vil_image_view< SRC > const &src1, vil_image_view< SRC > const &src2, vil_checker_board_params const &params)
build a checker board image from two images.
parameters for building checkboard.
void set_offset(int xoff, int yoff)
void vil_checker_board(vil_image_view< DEST > &des, vil_image_view< SRC > const &src1, vil_image_view< SRC > const &src2, vil_checker_board_params const &params)
build a checker board image from two images.