00001 #ifndef rgrl_feature_face_region_h_ 00002 #define rgrl_feature_face_region_h_ 00003 //: 00004 // \file 00005 // \brief Class to represent a N-d face edge element. It has 1 normal direction and N-1 tangent directions. 00006 // \author Chuck Stewart 00007 // \date 16 Sep 2003 00008 // \verbatim 00009 // Modifications 00010 // Nov 2008 J Becker: Added a clone function. 00011 // \endverbatim 00012 #include <rgrl/rgrl_feature_face_pt.h> 00013 #include <rgrl/rgrl_feature_region.h> 00014 // not used? #include <vcl_vector.h> 00015 00016 class rgrl_feature_face_region : public rgrl_feature_face_pt, public rgrl_feature_region 00017 { 00018 public: 00019 rgrl_feature_face_region( vnl_vector< double > const& location, 00020 vnl_vector< double > const& normal ); 00021 00022 rgrl_feature_face_region( vnl_vector< double > const& location, 00023 vnl_vector< double > const& normal, 00024 double thickness, 00025 double radius ); 00026 00027 // Defines type-related functions 00028 rgrl_type_macro( rgrl_feature_face_region, rgrl_feature_face_pt ) 00029 00030 //: Return the thickness ("fatness") of the surface (or the transition region) 00031 double thickness() const { return thickness_; } 00032 00033 //: Return the radius on the tangent surface 00034 double radius() const { return radius_; } 00035 00036 //: Result is a rgrl_feature_face_region, but the region is not transformed. 00037 rgrl_feature_sptr transform( rgrl_transformation const& xform ) const; 00038 00039 //: Result is a rgrl_feature_face_region with a transformed region as well. 00040 rgrl_feature_sptr transform_region( rgrl_transformation const& xform ) const; 00041 00042 //: Extract the pixel coordinates within the oriented rectangular solid defined by the feature. 00043 virtual void generate_pixel_coordinates( vnl_vector< double > const& spacing_ratio ); 00044 00045 unsigned int num_constraints() const; 00046 00047 //: make a clone copy 00048 virtual rgrl_feature_sptr clone() const; 00049 00050 private: 00051 00052 //: Create an uninitialized face_region of dimension dim 00053 rgrl_feature_face_region(); 00054 00055 //: The normal width, and the radius on the tangent surface in physical coordinates. 00056 double thickness_; 00057 double radius_; 00058 }; 00059 00060 #endif