core/vidl_vil1/vidl_vil1_frame.h

Go to the documentation of this file.
00001 #ifndef vidl_vil1_frame_h
00002 #define vidl_vil1_frame_h
00003 //:
00004 // \file
00005 // \author Nicolas Dano, march 1999
00006 //
00007 // \verbatim
00008 //  Modifications
00009 //   May 2000  Julien Esteve          Ported from TargetJr
00010 //   10/4/2001 Ian Scott (Manchester) Converted perceps header to doxygen
00011 //   10/9/2004 Peter Vanroose Added copy ctor with explicit vbl_ref_count init
00012 // \endverbatim
00013 
00014 #include <vbl/vbl_ref_count.h>
00015 #include <vil1/vil1_image.h>
00016 #include <vidl_vil1/vidl_vil1_frame_sptr.h>
00017 #include <vidl_vil1/vidl_vil1_codec.h>
00018 
00019 //: A single frame of a Video Sequence.
00020 class vidl_vil1_frame : public vbl_ref_count
00021 {
00022    // PUBLIC INTERFACE
00023  public:
00024 
00025   // Constructors/Initializers/Destructors
00026   vidl_vil1_frame(int position, vidl_vil1_codec_sptr coder);
00027   vidl_vil1_frame(vidl_vil1_frame const& f)
00028     : vbl_ref_count(), position_(f.position_), coder_(f.coder_) {}
00029   ~vidl_vil1_frame();
00030 
00031   vil1_image get_image();
00032   virtual bool get_section(void*ib, int x0,int y0, int width,int height) const;
00033 
00034   vidl_vil1_codec_sptr get_codec() const { return coder_; }
00035 
00036   inline char get_image_class()const { return coder_->get_image_class(); }
00037   inline char get_format() const     { return coder_->get_format(); }
00038   inline int  width() const     { return coder_->width(); }
00039   inline int  height() const     { return coder_->height(); }
00040   inline int  get_bits_pixel() const { return coder_->get_bits_pixel(); }
00041   inline int  get_bytes_pixel()const { return coder_->get_bytes_pixel(); }
00042 
00043   //: Return the index of this frame in the movie.
00044   int get_real_frame_index() const { return position_; }
00045 
00046  protected:
00047 
00048   // Data Members
00049   const int position_;
00050   vidl_vil1_codec_sptr coder_;
00051   vil1_image image_;
00052 };
00053 
00054 #endif // vidl_vil1_frame_h

Generated on Tue Dec 2 05:09:13 2008 for core/vidl_vil1 by  doxygen 1.5.1