00001 #ifndef vidl_vil1_frame_as_image_h 00002 #define vidl_vil1_frame_as_image_h 00003 //: 00004 // \file 00005 // \author Nicolas Dano, september 1999 00006 // 00007 // \verbatim 00008 // Modifications 00009 // Julien ESTEVE, June 2000 00010 // Ported from TargetJr 00011 // 10/4/2001 Ian Scott (Manchester) Converted perceps header to doxygen 00012 // \endverbatim 00013 00014 #include <vil1/vil1_image_impl.h> 00015 #include <vidl_vil1/vidl_vil1_frame_as_image_sptr.h> 00016 #include <vidl_vil1/vidl_vil1_frame.h> 00017 00018 //: see a frame as an image 00019 // This is a convenient container to be able to make easily 00020 // an image from a frame. 00021 class vidl_vil1_frame_as_image : public vil1_image_impl 00022 { 00023 public: 00024 00025 vidl_vil1_frame_as_image(vidl_vil1_frame* frame); 00026 ~vidl_vil1_frame_as_image(); 00027 00028 vil1_component_format component_format() const { return VIL1_COMPONENT_FORMAT_UNSIGNED_INT; } 00029 int bits_per_component() const { return 8; } 00030 int components() const; 00031 int planes() const { return 1; } 00032 int width() const { return frame_->width(); } 00033 int height() const { return frame_->height(); } 00034 bool get_section(void* ib, int x0, int y0, int width, int height) const; 00035 bool put_section(void const* /*ib*/, int /*x0*/, int /*y0*/, int /*width*/, int /*height*/) { return false; } 00036 00037 protected: 00038 00039 // Dumb ptr to avoid cycle 00040 vidl_vil1_frame* frame_; 00041 }; 00042 00043 #endif // vidl_vil1_frame_as_image_h
1.5.1