|
|
PDS_JP2
|
00001 /* PDS_Converter 00002 00003 HiROC CVS ID: PDS_Converter.hh,v 1.15 2008/05/21 21:55:29 castalia Exp 00004 00005 Copyright (C) 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 library is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Lesser General Public License, version 2.1, 00011 as published by the Free Software Foundation. 00012 00013 This library 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 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public License 00019 along with this library; if not, write to the Free Software Foundation, 00020 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00021 00022 *******************************************************************************/ 00023 00024 #ifndef _PDS_Converter_ 00025 #define _PDS_Converter_ 00026 00027 #include "PDS_Data.hh" 00028 #include "Image_Data_Block.hh" 00029 #include "Dimensions.hh" 00030 00031 namespace UA 00032 { 00033 namespace HiRISE 00034 { 00054 class PDS_Converter 00055 : public PDS_Data 00056 { 00057 public: 00058 /*============================================================================== 00059 Constants: 00060 */ 00062 static const char* const 00063 ID; 00064 00069 static const char 00070 *DEFAULT_PRODUCT_TYPE; 00071 00075 static const char 00076 *UNCOMPRESSED_FILE_PARAMETERS_GROUP; 00077 00081 static const char 00082 *COMPRESSED_FILE_PARAMETERS_GROUP; 00083 00084 // Common additional parameters: 00085 00087 static const char 00088 *GeoTIFF_PARAMETER_NAME; 00090 static const char 00091 *GML_PARAMETER_NAME; 00092 00093 /*============================================================================== 00094 Constructors: 00095 */ 00098 PDS_Converter (); 00099 00118 explicit PDS_Converter (const std::string& pathname, 00119 const char** excluded_names = NULL, const char** image_names = NULL); 00120 00125 PDS_Converter (const PDS_Converter& converter); 00126 00132 virtual PDS_Converter& operator= (const PDS_Converter& converter); 00133 00136 virtual ~PDS_Converter (); 00137 00138 /*============================================================================== 00139 Manipulators: 00140 */ 00177 virtual void write_PDS_JP2_label 00178 ( 00179 const std::string& PDS_label_pathname, 00180 const std::string& JP2_pathname, 00181 const char** removed_parameter_names = NULL, 00182 PDS_Data* additional_parameters = NULL 00183 ) = 0; 00184 00225 virtual void write_PDS_label 00226 ( 00227 const std::string& PDS_label_pathname, 00228 const Rectangle* image_region = NULL, 00229 unsigned int resolution_level = 1, 00230 const char** removed_parameter_names = NULL, 00231 PDS_Data* additional_parameters = NULL 00232 ) = 0; 00233 00234 /*============================================================================== 00235 Accessors: 00236 */ 00253 virtual std::string product_names () const; 00254 00265 virtual bool label_recognized () const = 0; 00266 00279 PDS_Converter& label_size (unsigned int size) 00280 {Label_Size = size; return *this;} 00281 00286 unsigned int label_size () const 00287 {return Label_Size;} 00288 00299 PDS_Data::PDS_Data_Block_List* data_blocks () const 00300 {return Data_Blocks;} 00301 00308 void refresh_data_blocks (); 00309 00325 Image_Data_Block* image_data (); 00326 00338 PDS_Converter& excluded_data_block_names (const char** names); 00339 00346 const char** excluded_data_block_names () const 00347 {return Excluded_Data_Block_Names;} 00348 00363 PDS_Converter& image_data_block_names (const char** names); 00364 00372 const char** image_data_block_names () const 00373 {return Image_Data_Block_Names;} 00374 00375 /*============================================================================== 00376 Helpers: 00377 */ 00425 idaeim::PVL::Aggregate* PDS_JP2_image_parameters 00426 (const std::string& JP2_pathname); 00427 00452 unsigned int 00453 write_label 00454 ( 00455 const std::string& pathname, 00456 PDS_Data& label, 00457 idaeim::PVL::Lister* lister = NULL, 00458 bool pad_label = false 00459 ); 00460 00461 00462 protected: 00463 00468 void clear_data_blocks (); 00469 00470 /*============================================================================== 00471 Data Members: 00472 */ 00473 protected: 00474 00479 const char** 00480 Excluded_Data_Block_Names; 00481 00483 PDS_Data::PDS_Data_Block_List 00484 *Data_Blocks; 00485 00487 const char** 00488 Image_Data_Block_Names; 00489 00491 Image_Data_Block 00492 *IMAGE_Data_Block; 00493 00495 unsigned int 00496 Label_Size; 00497 00498 }; // End class PDS_Converter 00499 00500 } // namespace HiRISE 00501 } // namespace UA 00502 #endif
1.5.3