Isis 3.0
Back | Home
ProcessExportPds.h
Go to the documentation of this file.
1 #ifndef ProcessExportPds_h
2 #define ProcessExportPds_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 
25 class QString;
26 
27 namespace Isis {
28  class PvlFormatPds;
29  class Table;
30 
82  public:
87  enum PdsFileType {
90  Qube,
98  };
99 
106  };
107 
117  };
118 
121 
122  // Work with PDS labels for all data set types
123  void StandardAllMapping(Pvl &mainPvl);
124 
125  // Work with PDS labels for data sets of type IMAGE
126  void StreamImageRoot(Pvl &mainPvl);
127  void FixedImageRoot(Pvl &mainPvl);
128  void StreamJP2ImageRoot(Pvl &mainPvl);
129  void FixedJP2ImageRoot(Pvl &mainPvl);
130  void StandardImageImage(Pvl &mainPvl);
131  void StandardJP2Image(Pvl &mainPvl);
132 
133  void SetPdsResolution(PdsResolution resolutionUnits);
134  void SetExportType(PdsExportType recordFormat);
135 
137 
138  void OutputLabel(std::ofstream &pdsFileStream);
139  void OutputDetachedLabel();
140 
141  void ExportTable(Isis::Table isisTable, QString detachedPdsTableFileName="");
142 
143  // include this using declaration to indicate that ProcessExportPds
144  // objects that call a StartProcess() method that has not been overridden
145  // here should use the corresponding base class definitions
147  void StartProcess(std::ofstream &fout);
148 
149  // Accessors
150  bool Detached();
151  bool Attached();
152 
153  // Mutators
154  void SetDetached(QString detachedLabelFile);
155  void SetAttached();
156  void ForceBands(bool force);
157  void ForceBandName(bool force);
158  void ForceCenterFilterWavelength(bool force);
159  void ForceBandwidth(bool force);
160  void ForceBandStorageType(bool force);
161  void ForceOffset(bool force);
162  void ForceScalingFactor(bool force);
163  void ForceSampleBits(bool force);
164  void ForceSampleBitMask(bool force);
165  void ForceSampleType(bool force);
166  void ForceCoreNull(bool force);
167  void ForceCoreLrs(bool force);
168  void ForceCoreLis(bool force);
169  void ForceCoreHrs(bool force);
170  void ForceCoreHis(bool force);
171 
172  protected:
173  int LineBytes();
174  int LabelSize();
175  virtual void CreateImageLabel();
176  void CreateQubeLabel();
178 
179  QString ProjectionName(Pvl &inputLabel);
180 
185 
186  private:
187  PdsResolution m_exportResolution;
188  bool m_forceBands;
190  bool m_forceBandName;
192  bool m_forceCenterFilterWavelength;
195  bool m_forceBandwidth;
197  bool m_forceBandStorageType;
200  bool m_forceOffset;
202  bool m_forceScalingFactor;
205  bool m_forceSampleBits;
207  bool m_forceSampleBitMask;
210  bool m_forceSampleType;
213  bool m_forceCoreNull;
215  bool m_forceCoreLrs;
218  bool m_forceCoreLis;
221  bool m_forceCoreHrs;
224  bool m_forceCoreHis;
227  bool m_detachedLabel;
229  QString m_detachedPdsLabelFile;
231  PdsFileType m_pdsFileType;
234  std::vector<int> m_tableStartRecord;
239  std::vector<int> m_tableRecords;
244  std::vector<char *> m_tableBuffers;
250  };
251 }
252 
253 #endif
void ForceCoreLis(bool force)
Mutator method to set how the CORE_LOW_INSTR_SATURATION keyword will be handled.
Definition: ProcessExportPds.cpp:1271
void ForceSampleBits(bool force)
Mutator method to set how the SAMPLE_BITS keyword will be handled.
Definition: ProcessExportPds.cpp:1205
~ProcessExportPds()
Destructor.
Definition: ProcessExportPds.cpp:80
void ForceScalingFactor(bool force)
Mutator method to set how the SCALING_FACTOR keyword will be handled.
Definition: ProcessExportPds.cpp:1192
void SetAttached()
Mutator method to set the output PDS file to attached.
Definition: ProcessExportPds.cpp:1062
void CreateSpectralQubeLabel()
Create a standard PDS label for type SPECTRAL_QUBE.
Definition: ProcessExportPds.cpp:194
int LabelSize()
Return the size of the output PDS label.
Definition: ProcessExportPds.cpp:859
void ForceBands(bool force)
Mutator method to set how the the BANDS keyword will be handled.
Definition: ProcessExportPds.cpp:1114
Process class for exporting cubes.
Definition: ProcessExport.h:116
void OutputLabel(std::ofstream &pdsFileStream)
Write the PDS label to the supplied stream.
Definition: ProcessExportPds.cpp:894
Fixed length records.
Definition: ProcessExportPds.h:115
virtual void CreateImageLabel()
Create a standard PDS label for type IMAGE.
Definition: ProcessExportPds.cpp:131
void ForceCoreHis(bool force)
Mutator method to set how the CORE_HIGH_INSTR_SATURATION keyword will be handled. ...
Definition: ProcessExportPds.cpp:1299
bool Attached()
Accessor function returns true if the output PDS file is set to attached.
Definition: ProcessExportPds.cpp:1081
void StandardAllMapping(Pvl &mainPvl)
Create the standard keywords for the IMAGE_MAP_PROJECTION group in a PDS label.
Definition: ProcessExportPds.cpp:679
PdsFileType
File type to be exported.
Definition: ProcessExportPds.h:87
void ForceOffset(bool force)
Mutator method to set how the OFFSET keyword will be handled.
Definition: ProcessExportPds.cpp:1179
void ExportTable(Isis::Table isisTable, QString detachedPdsTableFileName="")
This method will add a table to be exported to PDS.
Definition: ProcessExportPds.cpp:986
bool Detached()
Accessor function returns true if the output PDS file is set to detached.
Definition: ProcessExportPds.cpp:1072
void StreamJP2ImageRoot(Pvl &mainPvl)
Create the standard keywords for the ROOT object in a PDS JP2 IMAGE file.
Definition: ProcessExportPds.cpp:247
Formats the value of a PvlKeyword into a PDS complient string.
Definition: PvlFormatPds.h:61
void ForceBandStorageType(bool force)
Mutator method to set how the BAND_STORAGE_TYPE keyword will be handled.
Definition: ProcessExportPds.cpp:1166
void ForceCoreHrs(bool force)
Mutator method to set how the CORE_HIGH_REPR_SATURATION keyword will be handled.
Definition: ProcessExportPds.cpp:1285
void ForceCoreNull(bool force)
Mutator method to set how the CORE_NULL keyword will be handled.
Definition: ProcessExportPds.cpp:1244
PvlFormatPds * m_formatter
Used to determine how to format the keyword values in the PDS file.
Definition: ProcessExportPds.h:181
void ForceSampleBitMask(bool force)
Mutator method to set how the SAMPLE_BIT_MASK keyword will be handled.
Definition: ProcessExportPds.cpp:1218
void ForceBandName(bool force)
Mutator method to set how the BAND_NAME keyword will be handled.
Definition: ProcessExportPds.cpp:1127
void SetExportType(PdsExportType recordFormat)
Mutator method to set the output PDS image record type to stream or fixed.
Definition: ProcessExportPds.cpp:1102
void StandardImageImage(Pvl &mainPvl)
Create the standard keywords for an IMAGE object in a PDS IMAGE file.
Definition: ProcessExportPds.cpp:395
virtual Pvl & StandardPdsLabel(ProcessExportPds::PdsFileType type)
Create a standard PDS label of the type specified.
Definition: ProcessExportPds.cpp:104
void StreamImageRoot(Pvl &mainPvl)
Create the standard keywords for the ROOT object in a PDS IMAGE file.
Definition: ProcessExportPds.cpp:217
PdsExportType
Record format type of exported PDS file.
Definition: ProcessExportPds.h:113
virtual void StartProcess(void funct(Isis::Buffer &in))
This method invokes the process operation over a single input cube.
Definition: ProcessExport.cpp:742
Pvl * m_label
Exported PDS label.
Definition: ProcessExportPds.h:183
void FixedImageRoot(Pvl &mainPvl)
Create the fixed keywords for the ROOT object in a PDS IMAGE file.
Definition: ProcessExportPds.cpp:303
void FixedJP2ImageRoot(Pvl &mainPvl)
Create the fixed keywords for the ROOT object in a PDS JP2 IMAGE file.
Definition: ProcessExportPds.cpp:335
Container for cube-like labels.
Definition: Pvl.h:135
void ForceCenterFilterWavelength(bool force)
Mutator method to set how the CENTER_FILTER_WAVELENGTH keyword will be handled.
Definition: ProcessExportPds.cpp:1140
void ForceCoreLrs(bool force)
Mutator method to set how the CORE_LOW_REPR_SATURATION keyword will be handled.
Definition: ProcessExportPds.cpp:1257
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:846
void SetPdsResolution(PdsResolution resolutionUnits)
Mutator method to set the output PDS image resolution to meters per pixel or kilometers per pixel...
Definition: ProcessExportPds.cpp:1091
Class for storing Table blobs information.
Definition: Table.h:74
PdsResolution
Resolution units per pixel of the exported PDS file.
Definition: ProcessExportPds.h:103
Process class for exporting cubes to PDS standards.
Definition: ProcessExportPds.h:81
PdsExportType m_exportType
Stream or Fixed.
Definition: ProcessExportPds.h:184
ProcessExportPds()
Default Constructor - Set to default the data members.
Definition: ProcessExportPds.cpp:48
void CreateQubeLabel()
Create a standard PDS label for type QUBE.
Definition: ProcessExportPds.cpp:173
Three dimensional objects with two spatial dimensions and one spectral dimension. ...
Definition: ProcessExportPds.h:93
void StandardJP2Image(Pvl &mainPvl)
Create the standard keywords for an IMAGE object in a PDS JP2 IMAGE file.
Definition: ProcessExportPds.cpp:536
void SetDetached(QString detachedLabelFile)
Mutator method to set the output PDS file to detached.
Definition: ProcessExportPds.cpp:1051
Image coding system JPEG 2000 formatted image.
Definition: ProcessExportPds.h:96
Kilometers per pixel.
Definition: ProcessExportPds.h:105
void ForceSampleType(bool force)
Mutator method to set how the SAMPLE_TYPE keyword will be handled.
Definition: ProcessExportPds.cpp:1231
void StartProcess(std::ofstream &fout)
This method fills the image data of the PDS file using the parent class ProcessExport::StartProcess, then appends any attached tables.
Definition: ProcessExportPds.cpp:1310
void ForceBandwidth(bool force)
Mutator method to set how the BANDWIDTH keyword will be handled.
Definition: ProcessExportPds.cpp:1153
Multi-dimensional array (1-3 dimensional) whose axes may be interpreted as line/sample/band.
Definition: ProcessExportPds.h:90
Stream Records. This type is generally used for ASCII files.
Definition: ProcessExportPds.h:114
Meters per pixel.
Definition: ProcessExportPds.h:104
Two dimensional array of line/sample values.
Definition: ProcessExportPds.h:88
QString ProjectionName(Pvl &inputLabel)
Return a projection name.
Definition: ProcessExportPds.cpp:832
void OutputDetachedLabel()
Write the PDS label to the a detached file.
Definition: ProcessExportPds.cpp:875

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:26:05