Isis 3 Programmer Reference
ProcessExportPds4.h
1 #ifndef ProcessExportPds4_h
2 #define ProcessExportPds4_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include "ProcessExport.h"
11 #include <vector>
12 #include <QString>
13 #include <QDomDocument>
14 
15 namespace 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();
121  void fileAreaObservational();
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
Isis::ProcessExportPds4::translateUnits
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...
Definition: ProcessExportPds4.cpp:1464
Isis::ProcessExportPds4::m_domDoc
QDomDocument * m_domDoc
XML label.
Definition: ProcessExportPds4.h:129
Isis::ProcessExportPds4::~ProcessExportPds4
~ProcessExportPds4()
Destructor.
Definition: ProcessExportPds4.cpp:71
Isis::ProcessExportPds4::standardInstrument
void standardInstrument()
This method translates the information from the ISIS Instrument group to the PDS4 labels.
Definition: ProcessExportPds4.cpp:191
Isis::ProcessExportPds4::PDS4PixelType
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:1359
Isis::ProcessExportPds4::translateBandBinSpectrumBinSet
void translateBandBinSpectrumBinSet(Pvl &inputLabel)
Export BandBin group for non-uniformly spaced 3D Spectral data format.
Definition: ProcessExportPds4.cpp:726
Isis::ProcessExportPds4::m_versionId
QString m_versionId
QString with specified version id.
Definition: ProcessExportPds4.h:132
Isis::ProcessExportPds4::addSchema
void addSchema(QString sch, QString xsd, QString xmlns, QString xmlnsURI)
Adds necessary information to the xml header for a pds4 class.
Definition: ProcessExportPds4.cpp:1044
Isis::ProcessExportPds4::StandardPds4Label
QDomDocument & StandardPds4Label()
Create a standard PDS4 image label from the input cube.
Definition: ProcessExportPds4.cpp:82
Isis::ProcessExportPds4::setSchemaLocation
void setSchemaLocation(QString schema)
Allows mission specific programs to use specified versions of dictionaries.
Definition: ProcessExportPds4.cpp:453
Isis::ProcessExportPds4::StartProcess
virtual void StartProcess(void funct(Isis::Buffer &in))
This method invokes the process operation over a single input cube.
Definition: ProcessExport.cpp:790
Isis::ProcessExportPds4::translateBandBinImage
void translateBandBinImage(Pvl &inputLabel)
Export BandBin group for 2D or 3D Image format.
Definition: ProcessExportPds4.cpp:572
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::ProcessExportPds4::translateBandBinSpectrumUniform
void translateBandBinSpectrumUniform(Pvl &inputLabel)
Export BandBin group for uniformly spaced 3D Spectral data format.
Definition: ProcessExportPds4.cpp:584
Isis::ProcessExportPds4::StandardAllMapping
void StandardAllMapping()
Create the standard keywords for the IMAGE_MAP_PROJECTION group in a PDS label.
Definition: ProcessExportPds4.cpp:1164
Isis::ProcessExportPds4::OutputLabel
void OutputLabel(std::ofstream &os)
Write the XML label to the supplied stream.
Definition: ProcessExportPds4.cpp:1066
Isis::ProcessExportPds4::reorder
void reorder()
This method reorders the existing m_domDoc to follow PDS4 standards and fixes time formatting if need...
Definition: ProcessExportPds4.cpp:284
Isis::ProcessExportPds4::standardBandBin
void standardBandBin()
Export bandbin group to sp:Spectral Characteristics.
Definition: ProcessExportPds4.cpp:540
QStringList
Isis::ByteOrder
ByteOrder
Tests the current architecture for byte order.
Definition: Endian.h:42
Isis::ProcessExportPds4
Process class for exporting cubes to PDS4 standards.
Definition: ProcessExportPds4.h:74
Isis::ProcessExportPds4::addHistory
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:1399
Isis::ProcessExportPds4::m_lid
QString m_lid
QString with specified logical identifier.
Definition: ProcessExportPds4.h:131
Isis::ProcessExportPds4::m_pixelDescription
QString m_pixelDescription
Description of pixel values.
Definition: ProcessExportPds4.h:135
Isis::ProcessExportPds4::setLogicalId
void setLogicalId(QString lid)
Allows mission specific programs to set logical_identifier required for PDS4 labels.
Definition: ProcessExportPds4.cpp:407
Isis::ProcessExportPds4::translateChildUnits
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:1545
Isis::ProcessExport::StartProcess
virtual void StartProcess(void funct(Isis::Buffer &in))
This method invokes the process operation over a single input cube.
Definition: ProcessExport.cpp:790
Isis::ProcessExportPds4::setTitle
void setTitle(QString title)
Allows mission specific programs to set the title required for PDS4 labels.
Definition: ProcessExportPds4.cpp:440
Isis::ProcessExportPds4::setImageType
void setImageType(ImageType imageType)
Create a standard PDS4 image label from the input cube.
Definition: ProcessExportPds4.cpp:94
Isis::ProcessExportPds4::m_title
QString m_title
QString with specified title.
Definition: ProcessExportPds4.h:133
Isis::ProcessExportPds4::CreateImageLabel
void CreateImageLabel()
Creates a PDS4 label.
Definition: ProcessExportPds4.cpp:108
Isis::ProcessExportPds4::setVersionId
void setVersionId(QString versionId)
Allows mission specific programs to set version_id required for PDS4 labels.
Definition: ProcessExportPds4.cpp:425
Isis::PixelType
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:27
Isis::ProcessExportPds4::createUnitMap
static QMap< QString, QString > createUnitMap(Pvl configPvl)
Helper function for creating the unit translation map from a PVL object.
Definition: ProcessExportPds4.cpp:1505
Isis::ProcessExportPds4::m_schemaLocation
QString m_schemaLocation
QString with all schema locations required.
Definition: ProcessExportPds4.h:130
Isis::ProcessExportPds4::setPixelDescription
void setPixelDescription(QString description)
Sets the description string which describes the pixel vales in File_Area_Observational.
Definition: ProcessExportPds4.cpp:793
Isis::ProcessExportPds4::ProcessExportPds4
ProcessExportPds4()
Default Constructor - Set to default the data members.
Definition: ProcessExportPds4.cpp:35
QMap< QString, QString >
Isis::ProcessExportPds4::fileAreaObservational
void fileAreaObservational()
Create and internalize an image output label from the input image.
Definition: ProcessExportPds4.cpp:802
Isis::ProcessExportPds4::GetLabel
QDomDocument & GetLabel()
Return the internalized PDS4 label.
Definition: ProcessExportPds4.cpp:1089
Isis::ProcessExportPds4::m_imageType
ImageType m_imageType
Type of image data to be written.
Definition: ProcessExportPds4.h:134
Isis::ProcessExportPds4::getElement
QDomElement getElement(QStringList xmlPath, QDomElement parent=QDomElement())
Convenience method to get an element given a path and its parent.
Definition: ProcessExportPds4.cpp:1327
Isis::ProcessExportPds4::identificationArea
void identificationArea()
This method writes the identification information to the PDS4 labels.
Definition: ProcessExportPds4.cpp:462
Isis::ProcessExport
Process class for exporting cubes.
Definition: ProcessExport.h:111
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ProcessExportPds4::displaySettings
void displaySettings()
This method writes the display direction information to the PDS4 labels.
Definition: ProcessExportPds4.cpp:521
Isis::ProcessExportPds4::WritePds4
void WritePds4(QString outFile)
This method write out the labels and image data to the specified output file.
Definition: ProcessExportPds4.cpp:1110