Go to the documentation of this file.00001
00002 #ifndef vil3d_gen_synthetic_h_
00003 #define vil3d_gen_synthetic_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012 #include <vil3d/vil3d_file_format.h>
00013
00014
00015
00016
00017
00018
00019
00020
00021 class vil3d_gen_synthetic_format : public vil3d_file_format
00022 {
00023 public:
00024 vil3d_gen_synthetic_format() {}
00025
00026 virtual ~vil3d_gen_synthetic_format() {}
00027
00028 virtual vil3d_image_resource_sptr make_input_image(const char *) const;
00029
00030
00031
00032 virtual vil3d_image_resource_sptr make_output_image(const char* filename,
00033 unsigned ni,
00034 unsigned nj,
00035 unsigned nk,
00036 unsigned nplanes,
00037 enum vil_pixel_format) const;
00038
00039
00040
00041 virtual const char * tag() const {return "gen";}
00042 };
00043
00044
00045 union vil3d_gen_synthetic_pixel_value
00046 {
00047 vxl_uint_32 uint_32_value;
00048 vxl_int_32 int_32_value;
00049 vxl_uint_16 uint_16_value;
00050 vxl_int_16 int_16_value;
00051 vxl_byte byte_value;
00052 vxl_sbyte sbyte_value;
00053 float float_value;
00054 double double_value;
00055 bool bool_value;
00056 };
00057
00058
00059
00060 class vil3d_gen_synthetic_image: public vil3d_image_resource
00061 {
00062
00063 unsigned ni_, nj_, nk_;
00064
00065
00066 enum vil_pixel_format format_;
00067
00068
00069 vil3d_gen_synthetic_pixel_value value_;
00070
00071 public:
00072 vil3d_gen_synthetic_image(
00073 unsigned ni,
00074 unsigned nj,
00075 unsigned nk,
00076 enum vil_pixel_format format,
00077 vil3d_gen_synthetic_pixel_value pv);
00078
00079 virtual ~vil3d_gen_synthetic_image() {}
00080
00081
00082
00083 virtual unsigned nplanes() const;
00084
00085
00086 virtual unsigned ni() const;
00087
00088
00089 virtual unsigned nj() const;
00090
00091
00092 virtual unsigned nk() const;
00093
00094
00095 virtual enum vil_pixel_format pixel_format() const;
00096
00097
00098
00099
00100
00101
00102 virtual vil3d_image_view_base_sptr get_copy_view(unsigned i0, unsigned ni,
00103 unsigned j0, unsigned nj,
00104 unsigned k0, unsigned nk) const;
00105
00106
00107
00108
00109
00110
00111
00112 virtual bool put_view(const vil3d_image_view_base& im,
00113 unsigned i0, unsigned j0, unsigned k0);
00114
00115
00116
00117 virtual char const* file_format() const { return "gen"; }
00118
00119
00120
00121 virtual bool get_property(char const* label, void* property_value = 0) const;
00122 };
00123
00124 #endif