Isis Developer Reference
ProcessExportPds.h
Go to the documentation of this file.
1#ifndef ProcessExportPds_h
2#define ProcessExportPds_h
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include "ProcessExport.h"
11#include <vector>
12
13class QString;
14
15namespace Isis {
16 class PvlFormatPds;
17 class Table;
18
79 public:
85 Image,
87 Qube,
95 };
96
104
115
118
119 // Work with PDS labels for all data set types
120 void StandardAllMapping(Pvl &mainPvl);
121
122 // Work with PDS labels for data sets of type IMAGE
123 void StreamImageRoot(Pvl &mainPvl);
124 void FixedImageRoot(Pvl &mainPvl);
125 void StreamJP2ImageRoot(Pvl &mainPvl);
126 void FixedJP2ImageRoot(Pvl &mainPvl);
127 void StandardImageImage(Pvl &mainPvl);
128 void StandardJP2Image(Pvl &mainPvl);
129
130 void SetPdsResolution(PdsResolution resolutionUnits);
131 void SetExportType(PdsExportType recordFormat);
132
134
135 void OutputLabel(std::ofstream &pdsFileStream);
136 void updateChecksumInLabel(std::ofstream &pdsFileStream);
137 void OutputDetachedLabel();
138
139 void ExportTable(Isis::Table isisTable, QString detachedPdsTableFileName="");
140
141 // include this using declaration to indicate that ProcessExportPds
142 // objects that call a StartProcess() method that has not been overridden
143 // here should use the corresponding base class definitions
145 void StartProcess(std::ofstream &fout);
146
147 // Accessors
148 bool Detached();
149 bool Attached();
150
151 // Mutators
152 void SetDetached(QString detachedLabelFile);
153 void SetAttached();
154 void ForceBands(bool force);
155 void ForceBandName(bool force);
156 void ForceCenterFilterWavelength(bool force);
157 void ForceBandwidth(bool force);
158 void ForceBandStorageType(bool force);
159 void ForceOffset(bool force);
160 void ForceScalingFactor(bool force);
161 void ForceSampleBits(bool force);
162 void ForceSampleBitMask(bool force);
163 void ForceSampleType(bool force);
164 void ForceCoreNull(bool force);
165 void ForceCoreLrs(bool force);
166 void ForceCoreLis(bool force);
167 void ForceCoreHrs(bool force);
168 void ForceCoreHis(bool force);
169
170 protected:
171 int LineBytes();
172 int LabelSize();
173 virtual void CreateImageLabel();
174 void CreateQubeLabel();
176
177 QString ProjectionName(Pvl &inputLabel);
178
183
184 private:
185 PdsResolution m_exportResolution;
186 bool m_forceBands;
188 bool m_forceBandName;
190 bool m_forceCenterFilterWavelength;
193 bool m_forceBandwidth;
195 bool m_forceBandStorageType;
198 bool m_forceOffset;
200 bool m_forceScalingFactor;
203 bool m_forceSampleBits;
205 bool m_forceSampleBitMask;
208 bool m_forceSampleType;
211 bool m_forceCoreNull;
213 bool m_forceCoreLrs;
216 bool m_forceCoreLis;
219 bool m_forceCoreHrs;
222 bool m_forceCoreHis;
225 bool m_detachedLabel;
227 QString m_detachedPdsLabelFile;
229 PdsFileType m_pdsFileType;
232 std::vector<int> m_tableStartRecord;
237 std::vector<int> m_tableRecords;
242 std::vector<char *> m_tableBuffers;
248 };
249}
250
251#endif
Process class for exporting cubes.
Definition ProcessExport.h:111
virtual void StartProcess(void funct(Isis::Buffer &in))
This method invokes the process operation over a single input cube.
Definition ProcessExport.cpp:790
Process class for exporting cubes to PDS standards.
Definition ProcessExportPds.h:78
void SetAttached()
Mutator method to set the output PDS file to attached.
Definition ProcessExportPds.cpp:1072
void ForceCoreHrs(bool force)
Mutator method to set how the CORE_HIGH_REPR_SATURATION keyword will be handled.
Definition ProcessExportPds.cpp:1295
PdsExportType m_exportType
Stream or Fixed.
Definition ProcessExportPds.h:182
~ProcessExportPds()
Destructor.
Definition ProcessExportPds.cpp:68
void StandardAllMapping(Pvl &mainPvl)
Create the standard keywords for the IMAGE_MAP_PROJECTION group in a PDS label.
Definition ProcessExportPds.cpp:674
void FixedImageRoot(Pvl &mainPvl)
Create the fixed keywords for the ROOT object in a PDS IMAGE file.
Definition ProcessExportPds.cpp:295
void StreamJP2ImageRoot(Pvl &mainPvl)
Create the standard keywords for the ROOT object in a PDS JP2 IMAGE file.
Definition ProcessExportPds.cpp:239
void StartProcess(std::ofstream &fout)
This method fills the image data of the PDS file using the parent class ProcessExport::StartProcess,...
Definition ProcessExportPds.cpp:1320
void ForceSampleBits(bool force)
Mutator method to set how the SAMPLE_BITS keyword will be handled.
Definition ProcessExportPds.cpp:1215
ProcessExportPds()
Default Constructor - Set to default the data members.
Definition ProcessExportPds.cpp:36
bool Detached()
Accessor function returns true if the output PDS file is set to detached.
Definition ProcessExportPds.cpp:1082
void SetDetached(QString detachedLabelFile)
Mutator method to set the output PDS file to detached.
Definition ProcessExportPds.cpp:1061
void updateChecksumInLabel(std::ofstream &pdsFileStream)
Updates the CHECKSUM value on the label and rewrites to the output file.
Definition ProcessExportPds.cpp:953
void OutputDetachedLabel()
Write the PDS label to the a detached file.
Definition ProcessExportPds.cpp:866
void ForceScalingFactor(bool force)
Mutator method to set how the SCALING_FACTOR keyword will be handled.
Definition ProcessExportPds.cpp:1202
PvlFormatPds * m_formatter
Used to determine how to format the keyword values in the PDS file.
Definition ProcessExportPds.h:179
virtual void CreateImageLabel()
Create a standard PDS label for type IMAGE.
Definition ProcessExportPds.cpp:119
int LineBytes()
Return the line bytes (record size) for the input cube, at present this is based on the number of sam...
Definition ProcessExportPds.cpp:837
void StreamImageRoot(Pvl &mainPvl)
Create the standard keywords for the ROOT object in a PDS IMAGE file.
Definition ProcessExportPds.cpp:205
void CreateSpectralQubeLabel()
Create a standard PDS label for type SPECTRAL_QUBE.
Definition ProcessExportPds.cpp:182
void SetPdsResolution(PdsResolution resolutionUnits)
Mutator method to set the output PDS image resolution to meters per pixel or kilometers per pixel.
Definition ProcessExportPds.cpp:1101
void CreateQubeLabel()
Create a standard PDS label for type QUBE.
Definition ProcessExportPds.cpp:161
void ExportTable(Isis::Table isisTable, QString detachedPdsTableFileName="")
This method will add a table to be exported to PDS.
Definition ProcessExportPds.cpp:996
void ForceCoreNull(bool force)
Mutator method to set how the CORE_NULL keyword will be handled.
Definition ProcessExportPds.cpp:1254
void ForceCoreLrs(bool force)
Mutator method to set how the CORE_LOW_REPR_SATURATION keyword will be handled.
Definition ProcessExportPds.cpp:1267
QString ProjectionName(Pvl &inputLabel)
Return a projection name.
Definition ProcessExportPds.cpp:823
void ForceBandwidth(bool force)
Mutator method to set how the BANDWIDTH keyword will be handled.
Definition ProcessExportPds.cpp:1163
void ForceSampleType(bool force)
Mutator method to set how the SAMPLE_TYPE keyword will be handled.
Definition ProcessExportPds.cpp:1241
void ForceCoreLis(bool force)
Mutator method to set how the CORE_LOW_INSTR_SATURATION keyword will be handled.
Definition ProcessExportPds.cpp:1281
int LabelSize()
Return the size of the output PDS label.
Definition ProcessExportPds.cpp:850
void ForceBandName(bool force)
Mutator method to set how the BAND_NAME keyword will be handled.
Definition ProcessExportPds.cpp:1137
void StandardJP2Image(Pvl &mainPvl)
Create the standard keywords for an IMAGE object in a PDS JP2 IMAGE file.
Definition ProcessExportPds.cpp:531
void SetExportType(PdsExportType recordFormat)
Mutator method to set the output PDS image record type to stream or fixed.
Definition ProcessExportPds.cpp:1112
void ForceSampleBitMask(bool force)
Mutator method to set how the SAMPLE_BIT_MASK keyword will be handled.
Definition ProcessExportPds.cpp:1228
virtual Pvl & StandardPdsLabel(ProcessExportPds::PdsFileType type)
Create a standard PDS label of the type specified.
Definition ProcessExportPds.cpp:92
void StandardImageImage(Pvl &mainPvl)
Create the standard keywords for an IMAGE object in a PDS IMAGE file.
Definition ProcessExportPds.cpp:390
void FixedJP2ImageRoot(Pvl &mainPvl)
Create the fixed keywords for the ROOT object in a PDS JP2 IMAGE file.
Definition ProcessExportPds.cpp:330
void OutputLabel(std::ofstream &pdsFileStream)
Write the PDS label to the supplied stream.
Definition ProcessExportPds.cpp:885
PdsResolution
Resolution units per pixel of the exported PDS file.
Definition ProcessExportPds.h:100
@ Meter
Meters per pixel.
Definition ProcessExportPds.h:101
@ Kilometer
Kilometers per pixel.
Definition ProcessExportPds.h:102
PdsExportType
Record format type of exported PDS file.
Definition ProcessExportPds.h:110
@ Stream
Stream Records. This type is generally used for ASCII files.
Definition ProcessExportPds.h:111
@ Fixed
Fixed length records.
Definition ProcessExportPds.h:112
void ForceBandStorageType(bool force)
Mutator method to set how the BAND_STORAGE_TYPE keyword will be handled.
Definition ProcessExportPds.cpp:1176
void ForceBands(bool force)
Mutator method to set how the the BANDS keyword will be handled.
Definition ProcessExportPds.cpp:1124
PdsFileType
File type to be exported.
Definition ProcessExportPds.h:84
@ Qube
Multi-dimensional array (1-3 dimensional) whose axes may be interpreted as line/sample/band.
Definition ProcessExportPds.h:87
@ Image
Two dimensional array of line/sample values.
Definition ProcessExportPds.h:85
@ JP2Image
Image coding system JPEG 2000 formatted image.
Definition ProcessExportPds.h:93
@ SpectralQube
Three dimensional objects with two spatial dimensions and one spectral dimension.
Definition ProcessExportPds.h:90
void ForceCoreHis(bool force)
Mutator method to set how the CORE_HIGH_INSTR_SATURATION keyword will be handled.
Definition ProcessExportPds.cpp:1309
void ForceOffset(bool force)
Mutator method to set how the OFFSET keyword will be handled.
Definition ProcessExportPds.cpp:1189
Pvl * m_label
Exported PDS label.
Definition ProcessExportPds.h:181
void ForceCenterFilterWavelength(bool force)
Mutator method to set how the CENTER_FILTER_WAVELENGTH keyword will be handled.
Definition ProcessExportPds.cpp:1150
bool Attached()
Accessor function returns true if the output PDS file is set to attached.
Definition ProcessExportPds.cpp:1091
Formats the value of a PvlKeyword into a PDS complient string.
Definition PvlFormatPds.h:45
Container for cube-like labels.
Definition Pvl.h:119
Class for storing Table blobs information.
Definition Table.h:61
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16