![]() |
PDS_JP2
|
00001 /* Image_Data_Block 00002 00003 HiROC CVS ID: Image_Data_Block.hh,v 1.13 2013/03/14 21:00:43 guym Exp 00004 00005 Copyright (C) 2006-2007 Arizona Board of Regents on behalf of the 00006 Planetary Image Research Laboratory, Lunar and Planetary Laboratory at 00007 the University of Arizona. 00008 00009 This program is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU General Public License, version 2, as 00011 published by the Free Software Foundation. 00012 00013 This program is distributed in the hope that it will be useful, but 00014 WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License along 00019 with this program; if not, write to the Free Software Foundation, Inc., 00020 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 #ifndef _Image_Data_Block_ 00024 #define _Image_Data_Block_ 00025 00026 #include "PDS_Data_Block.hh" 00027 00028 #include <string> 00029 00030 namespace UA 00031 { 00032 namespace HiRISE 00033 { 00043 class Image_Data_Block 00044 : public PDS_Data_Block 00045 { 00046 public: 00047 /*============================================================================== 00048 Constants: 00049 */ 00051 static const char* const ID; 00052 00054 static const char* const 00055 IMAGE_BANDS_PARAMETER_NAME; 00056 00058 static const char* const 00059 IMAGE_WIDTH_PARAMETER_NAME; 00060 00062 static const char* const 00063 IMAGE_HEIGHT_PARAMETER_NAME; 00064 00066 static const char* const 00067 PIXEL_BYTES_PARAMETER_NAME; 00068 00070 static const char* const 00071 PIXEL_BITS_PARAMETER_NAME; 00072 00074 static const char* const 00075 PIXEL_DATA_TYPE_PARAMETER_NAME; 00076 00080 static const char* const 00081 UNSIGNED_PIXEL_TYPE_IDENTIFIER; 00082 00086 static const char* const 00087 SIGNED_PIXEL_TYPE_IDENTIFIER; 00088 00092 static const char* const 00093 LSB_PIXEL_TYPE_IDENTIFIER; 00094 00098 static const char* const 00099 MSB_PIXEL_TYPE_IDENTIFIER; 00100 00102 static const char* const 00103 LINE_PREFIX_BYTES_PARAMETER_NAME; 00104 00106 static const char* const 00107 LINE_SUFFIX_BYTES_PARAMETER_NAME; 00108 00109 /*============================================================================== 00110 Constructors 00111 */ 00114 Image_Data_Block (); 00115 00121 Image_Data_Block 00122 ( 00123 const idaeim::PVL::Aggregate& parameters, 00124 std::ios::off_type file_offset 00125 ); 00126 00132 Image_Data_Block 00133 ( 00134 const idaeim::PVL::Aggregate& parameters, 00135 const std::string& filename 00136 ); 00137 00138 00139 /*============================================================================== 00140 Accessors: 00141 */ 00149 unsigned int image_bands () 00150 {return Image_Bands;} 00151 00158 unsigned int image_width () 00159 {return Image_Width;} 00160 00167 unsigned int image_height () 00168 {return Image_Height;} 00169 00180 unsigned int pixel_bytes () 00181 {return Pixel_Bytes;} 00182 00198 unsigned int pixel_bits () 00199 {return Pixel_Bits;} 00200 00209 int signed_data () 00210 {return Signed_Data;} 00211 00220 int MSB_data () 00221 {return MSB_Data;} 00222 00229 unsigned int line_prefix_bytes () 00230 {return Line_Prefix_Bytes;} 00231 00238 unsigned int line_suffix_bytes () 00239 {return Line_Suffix_Bytes;} 00240 00241 std::string source_filename(); 00242 00243 /*------------------------------------------------------------------------------ 00244 * Manipulators 00245 */ 00246 std::string source_filename(std::string& pathname); 00247 00248 /*============================================================================== 00249 Data Members: 00250 */ 00251 protected: 00252 00253 00270 virtual unsigned long long data_block_size (); 00271 00272 private: 00273 00274 std::string 00275 Source_Filename; 00276 00277 unsigned int 00278 Image_Bands, 00279 Image_Width, 00280 Image_Height, 00281 Pixel_Bytes, 00282 Pixel_Bits, 00283 Line_Prefix_Bytes, 00284 Line_Suffix_Bytes; 00285 00287 int 00288 Signed_Data, 00289 MSB_Data; 00290 }; 00291 00292 } // namespace HiRISE 00293 } // namespace UA 00294 #endif