HiRISE
 PDS_JP2

Generic_PDS_Converter.hh
Go to the documentation of this file.
1 /* Generic_PDS_Converter
2 
3 HiROC CVS ID: Generic_PDS_Converter.hh,v 1.9 2009/10/01 06:06:44 castalia Exp
4 
5 Copyright (C) 2007 Arizona Board of Regents on behalf of the
6 Planetary Image Research Laboratory, Lunar and Planetary Laboratory at
7 the University of Arizona.
8 
9 This library is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License, version 2.1,
11 as published by the Free Software Foundation.
12 
13 This library is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public License
19 along with this library; if not, write to the Free Software Foundation,
20 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 
22 *******************************************************************************/
23 
24 #ifndef _Generic_PDS_Converter_
25 #define _Generic_PDS_Converter_
26 
27 #include "PDS_Converter.hh"
28 
29 
30 namespace UA
31 {
32 namespace HiRISE
33 {
47 : public PDS_Converter
48 {
49 public:
50 /*==============================================================================
51  Constants:
52 */
54 static const char* const
55  ID;
56 
58 static const char
60 
62 static const char
64 
68 static const char*
70 
74 static const char*
76 
78 static const int
80 
81 /*==============================================================================
82  Constructors:
83 */
87 
104 explicit Generic_PDS_Converter (const std::string& pathname,
105  const char** excluded_names = NULL, const char** image_names = NULL);
106 
107 /*==============================================================================
108  Accessors:
109 */
115 std::string product_names () const;
116 
117 /*==============================================================================
118  Manipulators:
119 *//*------------------------------------------------------------------------------
120  PDS_Converter implementation
121 */
130 bool label_recognized () const;
131 
167  (
168  const std::string& PDS_label_pathname,
169  const std::string& JP2_pathname,
170  const char** removed_parameter_names = NULL,
171  PDS_Data* additional_parameters = NULL
172  );
173 
229 void write_PDS_label
230  (
231  const std::string& PDS_label_pathname,
232  const Rectangle* image_region = NULL,
233  unsigned int resolution_level = 1,
234  const char** removed_parameter_names = NULL,
235  PDS_Data* additional_parameters = NULL
236  );
237 
238 /*==============================================================================
239  Helpers
240 */
241 protected:
242 
259 Parameter*
261  bool throw_unless_found = true);
262 
263 }; // End class Generic_PDS_Converter
264 
265 } // namespace HiRISE
266 } // namespace UA
267 #endif
A Generic_PDS_Converter is used to convert a generic image data product PDS label between its attache...
Definition: Generic_PDS_Converter.hh:48
static const int DEFAULT_PDS_LABEL_SIZE
Default size (bytes) of an attached PDS label.
Definition: Generic_PDS_Converter.hh:79
static const char * DATA_POINTER_PARAMETER_UNITS
Units of parameters pointing to data blocks.
Definition: Generic_PDS_Converter.hh:63
static const char * PRODUCT_TYPE
The PDS product type name.
Definition: Generic_PDS_Converter.hh:59
static const char * REMOVED_PDS_PARAMETER_NAMES[]
Names of parameters to be removed from the copy of the source PDS label when generating the converted...
Definition: Generic_PDS_Converter.hh:69
static const char * REMOVED_PDS_JP2_PARAMETER_NAMES[]
Names of parameters to be removed from the copy of the source PDS/JP2 label when generating the conve...
Definition: Generic_PDS_Converter.hh:75
Generic_PDS_Converter()
Constructs an empty Generic_PDS_Converter.
Definition: Generic_PDS_Converter.cc:123
bool label_recognized() const
Test whether the label parameters are recognized by this converter.
Definition: Generic_PDS_Converter.cc:150
void write_PDS_label(const std::string &PDS_label_pathname, const Rectangle *image_region=NULL, unsigned int resolution_level=1, const char **removed_parameter_names=NULL, PDS_Data *additional_parameters=NULL)
Write a PDS label for image data to be appended.
Definition: Generic_PDS_Converter.cc:314
Parameter * parameter_of(idaeim::PVL::Aggregate &parameters, const char *name, bool throw_unless_found=true)
Convenience parameter finder function that may throw an exception on failure.
Definition: Generic_PDS_Converter.cc:625
std::string product_names() const
Get the name of the product types that this converter is intended to process.
Definition: Generic_PDS_Converter.cc:145
void write_PDS_JP2_label(const std::string &PDS_label_pathname, const std::string &JP2_pathname, const char **removed_parameter_names=NULL, PDS_Data *additional_parameters=NULL)
Write a detached PDS/JP2 label file.
Definition: Generic_PDS_Converter.cc:160
static const char *const ID
Class identification name with source code version and date.
Definition: Generic_PDS_Converter.hh:55
A PDS_Converter is used to convert an attached PDS image label to or from a detached PDS/JP2 label.
Definition: PDS_Converter.hh:56
PDS_Data contains PDS label PVL parameters.
Definition: PDS_Data.hh:52
virtual PDS_Data & parameters(const std::string &pathname)
Set the parameters from a source file.
Definition: PDS_Data.cc:305
std::string name() const
Parameter(const Parameter &parameter)
std::string pathname(const Parameter *root=NULL) const
Definition: Dimensions.cc:30
A Rectangle is a position with a size.
Definition: Dimensions.hh:223