Isis 3 Developer Reference
ProcessExportPds4.h
Go to the documentation of this file.
1 #ifndef ProcessExportPds4_h
2 #define ProcessExportPds4_h
3 /*
4  * Unless noted otherwise, the portions of Isis written by the
5  * USGS are public domain. See individual third-party library
6  * and package descriptions for intellectual property
7  * information,user agreements, and related information.
8  *
9  * Although Isis has been used by the USGS, no warranty, expressed or implied,
10  * is made by the USGS as to the accuracy and functioning of such software
11  * and related material nor shall the fact of distribution constitute any such
12  * warranty, and no responsibility is assumed by the USGS in connection
13  * therewith.
14  *
15  * For additional information, launch
16  * $ISISROOT/doc//documents/Disclaimers/Disclaimers.html in a browser or see
17  * the Privacy & Disclaimers page on the Isis website,
18  * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on
19  * http://www.usgs.gov/privacy.html.
20  */
21 
22 #include "ProcessExport.h"
23 #include <vector>
24 #include <QString>
25 #include <QDomDocument>
26 
27 namespace Isis {
28 
87  public:
88 
91 
92  enum ImageType {
96  };
97 
98  QDomDocument &StandardPds4Label();
99  QDomDocument &SpectralPds4Label();
100  void StandardAllMapping();
101 
102  void CreateImageLabel();
103  void StandardImageImage();
104 
105  void OutputLabel(std::ofstream &os);
106 
107  // Include this using declaration to indicate that ProcessExportPds4
108  // objects that call a StartProcess() method that has not been overridden
109  // here should use the corresponding base class definitions
111  void StartProcess(std::ofstream &fout);
112  QDomDocument &GetLabel();
113  void WritePds4(QString outFile);
114  QDomElement getElement(QStringList xmlPath, QDomElement parent=QDomElement());
115  void addHistory(QString description, QString date = "tbd", QString version = "1.0");
116  void setLogicalId(QString lid);
117  void setVersionId(QString versionId);
118  void setTitle(QString title);
119  void setSchemaLocation(QString schema);
120  void setImageType(ImageType imageType);
121  void setPixelDescription(QString description);
122  static void translateUnits(QDomDocument &label,
123  QString transMapFile = "$base/translations/pds4ExportUnits.pvl");
124  void reorder();
125  void addSchema(QString sch, QString xsd, QString xmlns, QString xmlnsURI);
126  void addSchema(QString xsd, QString xmlns, QString xmlnsURI);
127 
128  protected:
129  void identificationArea();
130  void standardInstrument();
131  void standardBandBin();
132  void displaySettings();
133  void fileAreaObservational();
134  QString PDS4PixelType(PixelType pixelType, ByteOrder endianType);
135  static QMap<QString, QString> createUnitMap(Pvl configPvl);
136  static void translateChildUnits(QDomElement parent, QMap<QString, QString> transMap);
137  void translateBandBinImage(Pvl &inputLabel);
138  void translateBandBinSpectrumUniform(Pvl &inputLabel);
139  void translateBandBinSpectrumBinSet(Pvl &inputLabel);
140 
141  QDomDocument *m_domDoc;
143  QString m_lid;
144  QString m_versionId;
145  QString m_title;
148 
149  };
150 }
151 
152 #endif
void WritePds4(QString outFile)
This method write out the labels and image data to the specified output file.
Definition: ProcessExportPds4.cpp:1116
void displaySettings()
This method writes the display direction information to the PDS4 labels.
Definition: ProcessExportPds4.cpp:527
void translateBandBinSpectrumBinSet(Pvl &inputLabel)
Export BandBin group for non-uniformly spaced 3D Spectral data format.
Definition: ProcessExportPds4.cpp:732
Process class for exporting cubes to PDS4 standards.
Definition: ProcessExportPds4.h:86
QDomDocument * m_domDoc
XML label.
Definition: ProcessExportPds4.h:141
~ProcessExportPds4()
Destructor.
Definition: ProcessExportPds4.cpp:83
QString m_versionId
QString with specified version id.
Definition: ProcessExportPds4.h:144
ImageType
Definition: ProcessExportPds4.h:92
static void translateUnits(QDomDocument &label, QString transMapFile="$base/translations/pds4ExportUnits.pvl")
This function will go through an XML document and attempt to convert all "units" attributes to the ap...
Definition: ProcessExportPds4.cpp:1470
Process class for exporting cubes.
Definition: ProcessExport.h:125
QString PDS4PixelType(PixelType pixelType, ByteOrder endianType)
Helper function for converting ISIS pixel type and byte order to a PDS4 data_type value...
Definition: ProcessExportPds4.cpp:1365
QDomDocument & StandardPds4Label()
Create a standard PDS4 image label from the input cube.
Definition: ProcessExportPds4.cpp:94
QDomDocument & SpectralPds4Label()
void translateBandBinImage(Pvl &inputLabel)
Export BandBin group for 2D or 3D Image format.
Definition: ProcessExportPds4.cpp:578
void addSchema(QString sch, QString xsd, QString xmlns, QString xmlnsURI)
Adds necessary information to the xml header for a pds4 class.
Definition: ProcessExportPds4.cpp:1050
void translateBandBinSpectrumUniform(Pvl &inputLabel)
Export BandBin group for uniformly spaced 3D Spectral data format.
Definition: ProcessExportPds4.cpp:590
ByteOrder
Tests the current architecture for byte order.
Definition: Endian.h:59
void StandardAllMapping()
Create the standard keywords for the IMAGE_MAP_PROJECTION group in a PDS label.
Definition: ProcessExportPds4.cpp:1170
void setSchemaLocation(QString schema)
Allows mission specific programs to use specified versions of dictionaries.
Definition: ProcessExportPds4.cpp:459
void OutputLabel(std::ofstream &os)
Write the XML label to the supplied stream.
Definition: ProcessExportPds4.cpp:1072
void standardBandBin()
Export bandbin group to sp:Spectral Characteristics.
Definition: ProcessExportPds4.cpp:546
void reorder()
This method reorders the existing m_domDoc to follow PDS4 standards and fixes time formatting if need...
Definition: ProcessExportPds4.cpp:296
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:43
Definition: ProcessExportPds4.h:93
void addHistory(QString description, QString date="tbd", QString version="1.0")
Add a modification history instance by adding a Modification_Detail entry to the Modification_History...
Definition: ProcessExportPds4.cpp:1405
void setLogicalId(QString lid)
Allows mission specific programs to set logical_identifier required for PDS4 labels.
Definition: ProcessExportPds4.cpp:413
void setTitle(QString title)
Allows mission specific programs to set the title required for PDS4 labels.
Definition: ProcessExportPds4.cpp:446
QString m_lid
QString with specified logical identifier.
Definition: ProcessExportPds4.h:143
void setImageType(ImageType imageType)
Create a standard PDS4 image label from the input cube.
Definition: ProcessExportPds4.cpp:106
QString m_pixelDescription
Description of pixel values.
Definition: ProcessExportPds4.h:147
QString m_title
QString with specified title.
Definition: ProcessExportPds4.h:145
static void translateChildUnits(QDomElement parent, QMap< QString, QString > transMap)
Recursive method that will translate the "unit" attribute of any child elements of a given element...
Definition: ProcessExportPds4.cpp:1551
virtual void StartProcess(void funct(Isis::Buffer &in))
This method invokes the process operation over a single input cube.
Definition: ProcessExport.cpp:800
Container for cube-like labels.
Definition: Pvl.h:135
Definition: ProcessExportPds4.h:94
void CreateImageLabel()
Creates a PDS4 label.
Definition: ProcessExportPds4.cpp:120
Definition: ProcessExportPds4.h:95
ProcessExportPds4()
Default Constructor - Set to default the data members.
Definition: ProcessExportPds4.cpp:47
void setVersionId(QString versionId)
Allows mission specific programs to set version_id required for PDS4 labels.
Definition: ProcessExportPds4.cpp:431
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
static QMap< QString, QString > createUnitMap(Pvl configPvl)
Helper function for creating the unit translation map from a PVL object.
Definition: ProcessExportPds4.cpp:1511
QString m_schemaLocation
QString with all schema locations required.
Definition: ProcessExportPds4.h:142
void setPixelDescription(QString description)
Sets the description string which describes the pixel vales in File_Area_Observational.
Definition: ProcessExportPds4.cpp:799
QDomElement getElement(QStringList xmlPath, QDomElement parent=QDomElement())
Convenience method to get an element given a path and its parent.
Definition: ProcessExportPds4.cpp:1333
ImageType m_imageType
Type of image data to be written.
Definition: ProcessExportPds4.h:146
void identificationArea()
This method writes the identification information to the PDS4 labels.
Definition: ProcessExportPds4.cpp:468
QDomDocument & GetLabel()
Return the internalized PDS4 label.
Definition: ProcessExportPds4.cpp:1095
void fileAreaObservational()
Create and internalize an image output label from the input image.
Definition: ProcessExportPds4.cpp:808
void StartProcess(std::ofstream &fout)
This method fills the image data of the PDS4 file using the parent class ProcessExport::StartProcess...
Definition: ProcessExportPds4.cpp:1084
void standardInstrument()
This method translates the information from the ISIS Instrument group to the PDS4 labels...
Definition: ProcessExportPds4.cpp:203