core/vidl_vil1/vidl_vil1_frame.cxx

Go to the documentation of this file.
00001 // This is core/vidl_vil1/vidl_vil1_frame.cxx
00002 #include "vidl_vil1_frame.h"
00003 //:
00004 // \file
00005 
00006 #include <vidl_vil1/vidl_vil1_codec_sptr.h>
00007 #include <vidl_vil1/vidl_vil1_frame_as_image.h>
00008 #include <vil1/vil1_image.h>
00009 
00010 //=========================================================================
00011 //  Methods for vidl_vil1_frame.
00012 //_________________________________________________________________________
00013 
00014 //------------------------------------------------------------------------
00015 // CONSTRUCTOR(S) AND DESTRUCTOR
00016 
00017 //: Constructor, needs the frame position in the clip and the coder used.
00018 vidl_vil1_frame::vidl_vil1_frame(int position, vidl_vil1_codec_sptr coder) :
00019 position_(position), coder_(coder)
00020 {
00021 }
00022 
00023 //: Destructor
00024 vidl_vil1_frame::~vidl_vil1_frame()
00025 {
00026 }
00027 
00028 //: Return the image.
00029 vil1_image vidl_vil1_frame::get_image()
00030 {
00031   if (! image_) {
00032     image_ = vil1_image(new vidl_vil1_frame_as_image(this));
00033   }
00034   return image_;
00035 }
00036 
00037 //: Get the pixels for the rectangular window starting at x0, y0 and width and height wide.
00038  bool vidl_vil1_frame::get_section(void* ib, int x0, int y0, int width, int height) const
00039 {
00040   return coder_->get_section(position_, ib, x0, y0, width, height);
00041 }

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