contrib/rpl/rgrl/rgrl_mask_3d_image.h
Go to the documentation of this file.
00001 #ifndef rgrl_mask_3d_image_h_
00002 #define rgrl_mask_3d_image_h_
00003 
00004 //:
00005 // \file
00006 // \brief  mask of 3D image
00007 //         Disregarding the shape, each mask also provides 
00008 //         a bounding box.  
00009 // 
00010 // \author Charlene Tsai
00011 // \date   Oct 2003
00012 // \verbatim
00013 // Modifications
00014 // Oct. 2006  Gehua Yang (RPI) - move rgrl_mask_3d_image into separate file
00015 // \endverbatim
00016 
00017 #include <vil3d/vil3d_image_view.h>
00018 #include <rgrl/rgrl_mask.h>
00019 
00020 class rgrl_mask_3d_image
00021   : public rgrl_mask
00022 {
00023  public:
00024   rgrl_mask_3d_image( const vil3d_image_view< vxl_byte > & in_mask,
00025                       int org_x = 0, int org_y = 0, int org_z = 0 );
00026 
00027   //: True if a point is inside the region
00028   bool inside( vnl_vector< double > const& pt ) const;
00029 
00030   // Defines type-related functions
00031   rgrl_type_macro( rgrl_mask_3d_image, rgrl_mask );
00032 
00033  private:
00034   void update_bounding_box();
00035 
00036  private:
00037   vil3d_image_view< vxl_byte > mask_image_;
00038   int org_x_, org_y_, org_z_;
00039 };
00040 
00041 #endif