Isis Developer Reference
ProcessExportPds4.h
Go to the documentation of this file.
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 {
84  };
85 
86  QDomDocument &StandardPds4Label();
87  QDomDocument &SpectralPds4Label();
88  void StandardAllMapping();
89 
90  void CreateImageLabel();
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;
136 
137  };
138 }
139 
140 #endif
Isis::FileName::originalPath
QString originalPath() const
Returns the path of the original file name.
Definition: FileName.cpp:84
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::LOW_INSTR_SAT2
const short LOW_INSTR_SAT2
Definition: SpecialPixel.h:156
FileName.h
Isis::ProcessExportPds4::m_domDoc
QDomDocument * m_domDoc
XML label.
Definition: ProcessExportPds4.h:129
Isis::ProcessExportPds4::~ProcessExportPds4
~ProcessExportPds4()
Destructor.
Definition: ProcessExportPds4.cpp:71
ProjectionFactory.h
Isis::ProcessExportPds4::standardInstrument
void standardInstrument()
This method translates the information from the ISIS Instrument group to the PDS4 labels.
Definition: ProcessExportPds4.cpp:191
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Isis::PvlObject::group
PvlGroup & group(const int index)
Return the group at the specified index.
Definition: PvlObject.cpp:452
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
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
ProcessExportPds4.h
Isis::ProcessExportPds4::translateBandBinSpectrumBinSet
void translateBandBinSpectrumBinSet(Pvl &inputLabel)
Export BandBin group for non-uniformly spaced 3D Spectral data format.
Definition: ProcessExportPds4.cpp:726
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::LOW_INSTR_SATU2
const unsigned short LOW_INSTR_SATU2
Definition: SpecialPixel.h:165
Isis::ProcessExportPds4::m_versionId
QString m_versionId
QString with specified version id.
Definition: ProcessExportPds4.h:132
Isis::HIGH_REPR_SATU2
const unsigned short HIGH_REPR_SATU2
Definition: SpecialPixel.h:167
Isis::LOW_REPR_SAT4
const float LOW_REPR_SAT4
Definition: SpecialPixel.h:137
Isis::FileName::name
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
Definition: FileName.cpp:162
Isis::ProcessExportPds4::ImageType
ImageType
Definition: ProcessExportPds4.h:80
Isis::LOW_INSTR_SAT4
const float LOW_INSTR_SAT4
Definition: SpecialPixel.h:140
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
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::PvlObject::groups
int groups() const
Returns the number of groups contained.
Definition: PvlObject.h:75
Isis::ProcessExportPds4::SpectralPds4Label
QDomDocument & SpectralPds4Label()
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::UnsignedWord
@ UnsignedWord
Definition: PixelType.h:31
Isis::ProcessExportPds4::translateBandBinImage
void translateBandBinImage(Pvl &inputLabel)
Export BandBin group for 2D or 3D Image format.
Definition: ProcessExportPds4.cpp:572
Isis::Projection::Name
virtual QString Name() const =0
This method returns the name of the map projection.
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
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::NULL1
const unsigned char NULL1
Definition: SpecialPixel.h:182
Isis::PvlObject::objects
int objects() const
Returns the number of objects.
Definition: PvlObject.h:219
ProcessExport.h
Isis::ProcessExportPds4::StandardAllMapping
void StandardAllMapping()
Create the standard keywords for the IMAGE_MAP_PROJECTION group in a PDS label.
Definition: ProcessExportPds4.cpp:1164
Isis::SignedWord
@ SignedWord
Definition: PixelType.h:32
Isis::LOW_INSTR_SAT1
const unsigned char LOW_INSTR_SAT1
Definition: SpecialPixel.h:184
Isis::LOW_REPR_SATU2
const unsigned short LOW_REPR_SATU2
Definition: SpecialPixel.h:164
Isis::PvlObject::object
PvlObject & object(const int index)
Return the object at the specified index.
Definition: PvlObject.cpp:489
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::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
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::UniformlySampledSpectrum
@ UniformlySampledSpectrum
Definition: ProcessExportPds4.h:83
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::FileName::baseName
QString baseName() const
Returns the name of the file without the path and without extensions.
Definition: FileName.cpp:145
Isis::LOW_REPR_SAT1
const unsigned char LOW_REPR_SAT1
Definition: SpecialPixel.h:183
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::ProcessExportPds4::m_lid
QString m_lid
QString with specified logical identifier.
Definition: ProcessExportPds4.h:131
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::Pvl::read
void read(const QString &file)
Loads PVL information from a stream.
Definition: Pvl.cpp:90
Isis::ProcessExportPds4::m_pixelDescription
QString m_pixelDescription
Description of pixel values.
Definition: ProcessExportPds4.h:135
Isis::ProcessExportPds4::StandardImage
@ StandardImage
Definition: ProcessExportPds4.h:81
Isis::HIGH_REPR_SAT4
const float HIGH_REPR_SAT4
Definition: SpecialPixel.h:146
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::HIGH_INSTR_SAT1
const unsigned char HIGH_INSTR_SAT1
Definition: SpecialPixel.h:185
Isis::PvlToXmlTranslationManager
Allows applications to translate simple text files.
Definition: PvlToXmlTranslationManager.h:51
Application.h
Isis::HIGH_REPR_SAT2
const short HIGH_REPR_SAT2
Definition: SpecialPixel.h:158
Isis::ProcessExportPds4::setImageType
void setImageType(ImageType imageType)
Create a standard PDS4 image label from the input cube.
Definition: ProcessExportPds4.cpp:94
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::ProcessExportPds4::BinSetSpectrum
@ BinSetSpectrum
Definition: ProcessExportPds4.h:82
Isis::HIGH_INSTR_SAT2
const short HIGH_INSTR_SAT2
Definition: SpecialPixel.h:157
Isis::ProcessExportPds4::m_title
QString m_title
QString with specified title.
Definition: ProcessExportPds4.h:133
Isis::Msb
@ Msb
Definition: Endian.h:45
PvlToXmlTranslationManager.h
Isis::HIGH_INSTR_SAT4
const float HIGH_INSTR_SAT4
Definition: SpecialPixel.h:143
Isis::NULL2
const short NULL2
Definition: SpecialPixel.h:154
Isis::ProcessExportPds4::CreateImageLabel
void CreateImageLabel()
Creates a PDS4 label.
Definition: ProcessExportPds4.cpp:108
Isis::PvlContainer::name
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::NULLU2
const unsigned short NULLU2
Definition: SpecialPixel.h:163
Isis::PvlObject::hasObject
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
Definition: PvlObject.h:323
Isis::ProcessExportPds4::setVersionId
void setVersionId(QString versionId)
Allows mission specific programs to set version_id required for PDS4 labels.
Definition: ProcessExportPds4.cpp:425
Isis::FileName::extension
QString extension() const
Returns the last extension of the file name.
Definition: FileName.cpp:178
Isis::PixelType
PixelType
Enumerations for Isis Pixel Types.
Definition: PixelType.h:27
IException.h
Isis::toDouble
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
std
Namespace for the standard library.
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::NULL4
const float NULL4
Definition: SpecialPixel.h:134
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::HIGH_INSTR_SATU2
const unsigned short HIGH_INSTR_SATU2
Definition: SpecialPixel.h:166
Isis::ProcessExportPds4::ProcessExportPds4
ProcessExportPds4()
Default Constructor - Set to default the data members.
Definition: ProcessExportPds4.cpp:35
Isis::PvlKeyword::size
int size() const
Returns the number of values stored in this keyword.
Definition: PvlKeyword.h:125
Isis::PvlKeyword::unit
QString unit(const int index=0) const
Returns the units of measurement of the element of the array of values for the object at the specifie...
Definition: PvlKeyword.cpp:357
QMap< QString, QString >
Projection.h
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::PvlContainer::findKeyword
PvlKeyword & findKeyword(const QString &name)
Find a keyword with a specified name.
Definition: PvlContainer.cpp:62
Isis::PvlToXmlTranslationManager::Auto
void Auto(QDomDocument &outputLabel)
Automatically translate all the output names found in the translation table.
Definition: PvlToXmlTranslationManager.cpp:221
Isis::HIGH_REPR_SAT1
const unsigned char HIGH_REPR_SAT1
Definition: SpecialPixel.h:186
Isis::ProcessExportPds4::StandardImageImage
void StandardImageImage()
Isis::Lsb
@ Lsb
Definition: Endian.h:44
Isis::Projection
Base class for Map Projections.
Definition: Projection.h:155
Isis::UnsignedByte
@ UnsignedByte
Definition: PixelType.h:29
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::LOW_REPR_SAT2
const short LOW_REPR_SAT2
Definition: SpecialPixel.h:155
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::Real
@ Real
Definition: PixelType.h:35
Isis::None
@ None
Definition: PixelType.h:28
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