Go to the documentation of this file.00001
00002
00003
00004 #ifndef VIL_NITF2_IMAGE_SUBHEADER_H
00005 #define VIL_NITF2_IMAGE_SUBHEADER_H
00006
00007
00008
00009 #include <vcl_vector.h>
00010
00011 #include "vil_nitf2_field_sequence.h"
00012 #include "vil_nitf2_classification.h"
00013 #include "vil_nitf2.h"
00014
00015 class vil_stream;
00016 class vil_nitf2_data_mask_table;
00017
00018
00019
00020
00021
00022
00023
00024
00025 class vil_nitf2_image_subheader
00026 {
00027 public:
00028 vil_nitf2_image_subheader( vil_nitf2_classification::file_version version );
00029 virtual ~vil_nitf2_image_subheader();
00030
00031
00032
00033 virtual bool read( vil_stream* stream );
00034 #if 0
00035 virtual bool write( vil_stream* stream );
00036 #endif // 0
00037
00038
00039
00040 template< class T >
00041 bool get_property(vcl_string tag, T& out_value) const
00042 {
00043 return m_field_sequence.get_value( tag, out_value );
00044 }
00045
00046
00047
00048 template< class T >
00049 bool get_property(vcl_string tag, int i, T& out_value) const
00050 {
00051 return m_field_sequence.get_value( tag, i, out_value );
00052 }
00053
00054 unsigned int nplanes() const;
00055 unsigned int get_pixels_per_block_x() const;
00056 unsigned int get_pixels_per_block_y() const;
00057 unsigned int get_num_blocks_x() const;
00058 unsigned int get_num_blocks_y() const;
00059 unsigned int get_number_of_bits_per_pixel() const;
00060 vcl_string get_image_source() const;
00061 vcl_string get_image_type() const;
00062 bool has_data_mask_table() const { return data_mask_table() != 0; }
00063 const vil_nitf2_data_mask_table* data_mask_table() const { return m_data_mask_table; }
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086 bool get_lut_info( unsigned int band, int& n_luts, int& ne_lut,
00087 vcl_vector< vcl_vector< unsigned char > >& lut_d ) const;
00088
00089
00090
00091 virtual vil_nitf2_field::field_tree* get_tree( int i = 0 ) const;
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112 bool get_rpc_params( vcl_string& rpc_type, vcl_string& image_id,
00113 vcl_string& image_corner_geo_locations,
00114 double* rpc_data );
00115
00116
00117
00118
00119 bool get_sun_params( double& sun_el, double& sun_az);
00120
00121
00122 bool get_date_time(int& year, int& month, int& day, int& hour, int& min);
00123
00124 bool get_correction_offset(double & u_off, double & v_off);
00125
00126 protected:
00127 vil_nitf2_field_sequence m_field_sequence;
00128 vil_nitf2_data_mask_table* m_data_mask_table;
00129
00130 vil_nitf2_classification::file_version m_version;
00131
00132 static const vil_nitf2_field_definitions* get_field_definitions_21();
00133 static const vil_nitf2_field_definitions* get_field_definitions_20();
00134
00135 private:
00136 static void add_shared_field_defs_1( vil_nitf2_field_definitions* defs );
00137 static void add_shared_field_defs_2( vil_nitf2_field_definitions* defs );
00138 static void add_geo_field_defs( vil_nitf2_field_definitions* defs, const vil_nitf2_classification::file_version& version );
00139 static void add_shared_field_defs_3( vil_nitf2_field_definitions* defs );
00140 static void add_rpc_definitions();
00141 static void add_USE_definitions();
00142 static void add_ICHIPB_definitions();
00143 static void add_MPD26A_definitions();
00144 static void add_STDIDC_definitions();
00145 static void add_STDIDB_definitions();
00146
00147 static vil_nitf2_field_definitions* s_field_definitions_21;
00148 static vil_nitf2_field_definitions* s_field_definitions_20;
00149
00150
00151 friend void vil_nitf2::cleanup_static_members();
00152 };
00153
00154 #endif // VIL_NITF2_IMAGE_SUBHEADER_H