Isis 3 Programmer Reference
ProcessExportPds4.h
1#ifndef ProcessExportPds4_h
2#define ProcessExportPds4_h
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include "ProcessExport.h"
11#include <vector>
12#include <QString>
13#include <QDomDocument>
14
15namespace Isis {
16
75 public:
76
79
80 enum ImageType {
81 StandardImage,
82 BinSetSpectrum,
83 UniformlySampledSpectrum
84 };
85
86 QDomDocument &StandardPds4Label();
87 QDomDocument &SpectralPds4Label();
88 void StandardAllMapping();
89
90 void CreateImageLabel();
91 void StandardImageImage();
92
93 void OutputLabel(std::ofstream &os);
94
95 // Include this using declaration to indicate that ProcessExportPds4
96 // objects that call a StartProcess() method that has not been overridden
97 // here should use the corresponding base class definitions
99 void StartProcess(std::ofstream &fout);
100 QDomDocument &GetLabel();
101 void WritePds4(QString outFile);
102 QDomElement getElement(QStringList xmlPath, QDomElement parent=QDomElement());
103 void addHistory(QString description, QString date = "tbd", QString version = "1.0");
104 void setLogicalId(QString lid);
105 void setVersionId(QString versionId);
106 void setTitle(QString title);
107 void setSchemaLocation(QString schema);
108 void setImageType(ImageType imageType);
109 void setPixelDescription(QString description);
110 static void translateUnits(QDomDocument &label,
111 QString transMapFile = "$ISISROOT/appdata/translations/pds4ExportUnits.pvl");
112 void reorder();
113 void addSchema(QString sch, QString xsd, QString xmlns, QString xmlnsURI);
114 void addSchema(QString xsd, QString xmlns, QString xmlnsURI);
115
116 protected:
117 void identificationArea();
118 void standardInstrument();
119 void standardBandBin();
120 void displaySettings();
122 QString PDS4PixelType(PixelType pixelType, ByteOrder endianType);
123 static QMap<QString, QString> createUnitMap(Pvl configPvl);
124 static void translateChildUnits(QDomElement parent, QMap<QString, QString> transMap);
125 void translateBandBinImage(Pvl &inputLabel);
126 void translateBandBinSpectrumUniform(Pvl &inputLabel);
127 void translateBandBinSpectrumBinSet(Pvl &inputLabel);
128
129 QDomDocument *m_domDoc;
131 QString m_lid;
132 QString m_versionId;
133 QString m_title;
134 ImageType m_imageType;
136
137 };
138}
139
140#endif
Process class for exporting cubes.
virtual void StartProcess(void funct(Isis::Buffer &in))
This method invokes the process operation over a single input cube.
Process class for exporting cubes to PDS4 standards.
void StartProcess(std::ofstream &fout)
This method fills the image data of the PDS4 file using the parent class ProcessExport::StartProcess.
void setVersionId(QString versionId)
Allows mission specific programs to set version_id required for PDS4 labels.
void setImageType(ImageType imageType)
Create a standard PDS4 image label from the input cube.
void setLogicalId(QString lid)
Allows mission specific programs to set logical_identifier required for PDS4 labels.
QDomDocument * m_domDoc
XML label.
QString m_versionId
QString with specified version id.
void identificationArea()
This method writes the identification information to the PDS4 labels.
void translateBandBinSpectrumUniform(Pvl &inputLabel)
Export BandBin group for uniformly spaced 3D Spectral data format.
ProcessExportPds4()
Default Constructor - Set to default the data members.
QDomDocument & GetLabel()
Return the internalized PDS4 label.
void translateBandBinSpectrumBinSet(Pvl &inputLabel)
Export BandBin group for non-uniformly spaced 3D Spectral data format.
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.
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...
QDomElement getElement(QStringList xmlPath, QDomElement parent=QDomElement())
Convenience method to get an element given a path and its parent.
QString m_schemaLocation
QString with all schema locations required.
void setTitle(QString title)
Allows mission specific programs to set the title required for PDS4 labels.
void reorder()
This method reorders the existing m_domDoc to follow PDS4 standards and fixes time formatting if need...
void setSchemaLocation(QString schema)
Allows mission specific programs to use specified versions of dictionaries.
QString m_lid
QString with specified logical identifier.
static void translateUnits(QDomDocument &label, QString transMapFile="$ISISROOT/appdata/translations/pds4ExportUnits.pvl")
This function will go through an XML document and attempt to convert all "units" attributes to the ap...
ImageType m_imageType
Type of image data to be written.
void standardBandBin()
Export bandbin group to sp:Spectral Characteristics.
void addSchema(QString sch, QString xsd, QString xmlns, QString xmlnsURI)
Adds necessary information to the xml header for a pds4 class.
void translateBandBinImage(Pvl &inputLabel)
Export BandBin group for 2D or 3D Image format.
void fileAreaObservational()
Create and internalize an image output label from the input image.
QString m_title
QString with specified title.
void StandardAllMapping()
Create the standard keywords for the IMAGE_MAP_PROJECTION group in a PDS label.
void standardInstrument()
This method translates the information from the ISIS Instrument group to the PDS4 labels.
void setPixelDescription(QString description)
Sets the description string which describes the pixel vales in File_Area_Observational.
QString PDS4PixelType(PixelType pixelType, ByteOrder endianType)
Helper function for converting ISIS pixel type and byte order to a PDS4 data_type value.
QDomDocument & StandardPds4Label()
Create a standard PDS4 image label from the input cube.
QString m_pixelDescription
Description of pixel values.
void CreateImageLabel()
Creates a PDS4 label.
void displaySettings()
This method writes the display direction information to the PDS4 labels.
static QMap< QString, QString > createUnitMap(Pvl configPvl)
Helper function for creating the unit translation map from a PVL object.
void OutputLabel(std::ofstream &os)
Write the XML label to the supplied stream.
void WritePds4(QString outFile)
This method write out the labels and image data to the specified output file.
Container for cube-like labels.
Definition Pvl.h:119
ByteOrder
Tests the current architecture for byte order.
Definition Endian.h:42
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
PixelType
Enumerations for Isis Pixel Types.
Definition PixelType.h:27