core/vil1/vil1_scale_intensities_image_impl.h

Go to the documentation of this file.
00001 // This is core/vil1/vil1_scale_intensities_image_impl.h
00002 #ifndef vil1_scale_intensities_image_impl_h_
00003 #define vil1_scale_intensities_image_impl_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 
00010 #include <vil1/vil1_image_impl.h>
00011 #include <vil1/vil1_image.h>
00012 #include <vcl_string.h>
00013 
00014 class vil1_scale_intensities_image_impl : public vil1_image_impl
00015 {
00016  public:
00017   vil1_scale_intensities_image_impl(vil1_image const& src, double scale, double shift)
00018     : base(src), scale_(scale), shift_(shift) {}
00019 
00020   int planes() const { return base.planes(); }
00021   int width() const { return base.width(); }
00022   int height() const { return base.height(); }
00023   int components() const { return base.components(); }
00024   int bits_per_component() const { return base.bits_per_component(); }
00025   vil1_component_format component_format() const { return base.component_format(); }
00026 
00027   vil1_image get_plane(unsigned int p) const;
00028 
00029   bool get_section(void *buf, int x0, int y0, int w, int h) const;
00030   bool put_section(void const *buf, int x0, int y0, int w, int h);
00031 
00032   //: Return the name of the class
00033   virtual vcl_string is_a() const { return "vil1_scale_intensities_image_impl"; }
00034 
00035   //: Return true if the name of the class matches the argument
00036   virtual bool is_class(vcl_string const& s) const
00037   { return s==is_a() || vil1_image_impl::is_class(s); }
00038 
00039  private:
00040   vil1_image base;
00041   double scale_;
00042   double shift_;
00043 };
00044 
00045 #endif // vil1_scale_intensities_image_impl_h_

Generated on Mon Mar 8 05:09:33 2010 for core/vil1 by  doxygen 1.5.1