Go to the documentation of this file.00001
00002 #ifndef vil_openjpeg_pyramid_image_resource_h_
00003 #define vil_openjpeg_pyramid_image_resource_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <vcl_vector.h>
00018 #include <vil/vil_pyramid_image_resource.h>
00019 #include <vil/file_formats/vil_openjpeg.h>
00020
00021 class vil_openjpeg_pyramid_image_resource : public vil_pyramid_image_resource
00022 {
00023 public:
00024 vil_openjpeg_pyramid_image_resource(vil_image_resource_sptr const& openjpeg);
00025 virtual ~vil_openjpeg_pyramid_image_resource(){}
00026
00027
00028
00029
00030
00031 virtual unsigned nplanes() const;
00032
00033
00034
00035
00036 virtual unsigned ni() const;
00037
00038
00039
00040
00041 virtual unsigned nj() const;
00042
00043
00044 virtual enum vil_pixel_format pixel_format() const;
00045
00046
00047
00048
00049 virtual bool put_view(vil_image_view_base const& , unsigned , unsigned )
00050 { return false; }
00051
00052
00053
00054 virtual char const* file_format() const;
00055
00056
00057
00058
00059 virtual unsigned nlevels() const;
00060
00061
00062 virtual vil_image_view_base_sptr get_copy_view(unsigned i0, unsigned ni,
00063 unsigned j0, unsigned nj,
00064 unsigned level) const;
00065
00066
00067
00068 virtual vil_image_view_base_sptr get_copy_view(unsigned level) const
00069 { return get_copy_view(0, ni(), 0, nj(), level); }
00070
00071
00072
00073
00074 virtual vil_image_view_base_sptr get_copy_view(unsigned i0, unsigned ni,
00075 unsigned j0, unsigned nj,
00076 const float scale,
00077 float& actual_scale) const;
00078
00079
00080
00081
00082 virtual vil_image_view_base_sptr get_copy_view(const float scale, float& actual_scale) const
00083 { return get_copy_view(0, ni(), 0, nj(), scale, actual_scale); }
00084
00085
00086 virtual bool put_resource(vil_image_resource_sptr const& resc)
00087 {return false;}
00088
00089
00090 virtual vil_image_resource_sptr get_resource(const unsigned level) const;
00091
00092
00093 virtual void print(const unsigned level);
00094
00095 protected:
00096 vil_openjpeg_pyramid_image_resource();
00097 vil_image_resource_sptr openjpeg_sptr_;
00098 vil_openjpeg_image* ptr_;
00099 };
00100
00101
00102 #endif // vil_openjpeg_pyramid_image_resource_h_