Isis 3 Programmer Reference
ProcessImportPds.h
1 #ifndef ProcessImportPds_h
2 #define ProcessImportPds_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 #include "ProcessImport.h"
10 
11 #include <vector>
12 
13 #include "Pvl.h"
14 #include "PvlGroup.h"
15 #include <QString>
16 
17 namespace Isis {
18  class PvlToPvlTranslationManager;
19  class Table;
215 
216  public:
217  enum PdsFileType {
218  Image = 1,
219  Qube = 2,
220  SpectralQube = 4,
221  L0 = 8,
222  Rdn = 16,
223  Loc = 32,
224  Obs = 64,
225  CombinedSpectrum = 128,
226  All = Image | Qube | SpectralQube | L0 | Rdn | Loc | Obs | CombinedSpectrum
227  };
229  virtual ~ProcessImportPds();
232  void SetPdsFile(const QString &pdsLabelFile, const QString &pdsDataFile,
233  Pvl &pdsLabel, PdsFileType allowedTypes = All);
234  void SetPdsFile(const Pvl &pdsLabelPvl, const QString &pdsDataFile,
235  PdsFileType allowedTypes = All);
236  void ProcessLabel(const QString &pdsDataFile, PdsFileType allowedTypes);
237 
238  void TranslatePdsProjection(Pvl &lab);
239  void TranslateIsis2Labels(Pvl &lab);
240  void TranslatePdsLabels(Pvl &lab);
241 
242  bool IsIsis2();
243 
244  void OmitOriginalLabel();
245 
246  Table &ImportTable(QString pdsTableName);
247  // since we are overriding StartProcess(), we must specify for other
248  // overloaded calls to StartProcess(), the ProcessImport class method
249  // definitions should be used.
251  void StartProcess();
252  void StartProcess(void funct(Isis::Buffer &out));
253  void EndProcess();
254  void Finalize();
255  private:
256 
257 
258  enum Source {
259  NOSOURCE,
260  PDS,
261  ISIS2
262  };
263 
264  enum EncodingType {
265  NONE,
266  JP2
267  };
268 
270  const bool & calcOffsetOnly);
272  void ProcessSpecialPixels(PvlToPvlTranslationManager & pdsXlater, const bool & isQube);
273 
274  void ProcessPdsImageLabel(const QString &pdsDataFile);
275  void ProcessPdsQubeLabel(const QString &pdsDataFile, const QString &transFile);
276  void ProcessPdsM3Label(const QString &pdsDataFile, PdsFileType fileType);
277  void ProcessPdsCombinedSpectrumLabel(const QString &pdsDataFile);
278 
280  void GetProjectionOffsetMults(double &xoff, double &yoff,
281  double &xmult, double &ymult);
282 
283  void IdentifySource(Pvl &lab);
284 
285  void TranslateIsis2BandBin(Pvl &lab);
286  void TranslateIsis2Instrument(Pvl &lab);
287  void TranslatePdsBandBin(Pvl &lab);
288  void TranslatePdsArchive(Pvl &lab);
289 
291  QString p_labelFile;
292 
293  QString p_transDir;
294 
295  // Encoding info
296  EncodingType p_encodingType;
299  QString p_jp2File;
302  // Projection info
303  QString p_projection;
311  QString p_targetName;
314  double p_polarRadius;
320  QString p_latitudeType;
332  double p_scaleFactor;
334  double p_rotation;
336  double p_sampleProjectionOffset;
337  double p_lineProjectionOffset;
338  double p_upperLeftX;
339  double p_upperLeftY;
340 
343  std::vector<Table> p_tables;
347  Source p_source;
348  };
349 };
350 
351 #endif
Isis::ProcessImportPds::p_maximumLatitude
double p_maximumLatitude
Maximum latitude found in the PDS projection labels.
Definition: ProcessImportPds.h:324
Isis::ProcessImportPds::GetProjectionOffsetGroup
PvlGroup GetProjectionOffsetGroup()
Return the projection offsets.
Definition: ProcessImportPds.cpp:334
Isis::ProcessImportPds::Finalize
void Finalize()
End the processing sequence and cleans up by closing cubes, freeing memory, etc.
Definition: ProcessImportPds.cpp:312
Isis::ProcessImportPds::ProcessSpecialPixels
void ProcessSpecialPixels(PvlToPvlTranslationManager &pdsXlater, const bool &isQube)
Handles all special pixel setting, ultimately, calls SetSpecialValues.
Definition: ProcessImportPds.cpp:1276
Isis::ProcessImportPds::StartProcess
void StartProcess()
This method will write the cube and table data to the output cube.
Definition: ProcessImportPds.cpp:1421
Isis::ProcessImportPds::p_pdsLabel
Pvl p_pdsLabel
Internalized PDS label.
Definition: ProcessImportPds.h:290
Isis::ProcessImportPds::p_projectionOffsetChange
bool p_projectionOffsetChange
Whether the projection offsets were updated upon loading.
Definition: ProcessImportPds.h:306
Isis::ProcessImportPds::TranslateIsis2Labels
void TranslateIsis2Labels(Pvl &lab)
Translate as many of the ISIS2 labels as possible.
Definition: ProcessImportPds.cpp:1500
Isis::ProcessImportPds::p_longitudeDomain
int p_longitudeDomain
Longitude domain found in the PDS projection labels.
Definition: ProcessImportPds.h:318
Isis::ProcessImportPds::TranslatePdsLabels
void TranslatePdsLabels(Pvl &lab)
Translate as many of the PDS labels as possible.
Definition: ProcessImportPds.cpp:1545
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::ProcessImportPds::ProcessPdsQubeLabel
void ProcessPdsQubeLabel(const QString &pdsDataFile, const QString &transFile)
Process the PDS label of type QUBE or SPECTRALQUBE.
Definition: ProcessImportPds.cpp:855
Isis::ProcessImportPds::TranslatePdsArchive
void TranslatePdsArchive(Pvl &lab)
Fill as many of the Isis BandBin labels as possible.
Definition: ProcessImportPds.cpp:1512
Isis::ProcessImportPds::TranslatePdsProjection
void TranslatePdsProjection(Pvl &lab)
Fills the passed in label with the projection information from the PDS label file.
Definition: ProcessImportPds.cpp:1562
Isis::ProcessImportPds::p_pixelResolution
double p_pixelResolution
Pixel resolution found in the PDS projection labels.
Definition: ProcessImportPds.h:330
Isis::ProcessImportPds::p_minimumLatitude
double p_minimumLatitude
Minimum latitude found in the PDS projection labels.
Definition: ProcessImportPds.h:322
Isis::Buffer
Buffer for reading and writing cube data.
Definition: Buffer.h:53
Isis::ProcessImportPds::TranslateIsis2BandBin
void TranslateIsis2BandBin(Pvl &lab)
Fill as many of the Isis BandBin labels as possible.
Definition: ProcessImportPds.cpp:1453
Isis::PvlToPvlTranslationManager
Allows applications to translate simple text files.
Definition: PvlToPvlTranslationManager.h:65
Isis::ProcessImportPds::p_rotation
double p_rotation
The rotation found in the PDS labels.
Definition: ProcessImportPds.h:334
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Isis::ProcessImportPds::TranslatePdsBandBin
void TranslatePdsBandBin(Pvl &lab)
Fill as many of the Isis BandBin labels as possible.
Definition: ProcessImportPds.cpp:1528
Isis::ProcessImportPds::p_maximumLongitude
double p_maximumLongitude
Maximum longitude found in the PDS projection labels.
Definition: ProcessImportPds.h:328
Isis::ProcessImport
Byte swapper.
Definition: ProcessImport.h:155
Isis::ProcessImportPds::ProcessPixelBitandType
void ProcessPixelBitandType(PvlToPvlTranslationManager &pdsXlater)
Handles PixelType and BitsPerPixel Calls SetPixelType with the correct values.
Definition: ProcessImportPds.cpp:1120
Isis::ProcessImportPds::ProcessPdsImageLabel
void ProcessPdsImageLabel(const QString &pdsDataFile)
Process the PDS label of type IMAGE.
Definition: ProcessImportPds.cpp:1034
Isis::ProcessImportPds::ProcessDataFilePointer
void ProcessDataFilePointer(PvlToPvlTranslationManager &pdsXlater, const bool &calcOffsetOnly)
Handles the DataFilePointer keyword, aka ^QUBE or ^IMAGE.
Definition: ProcessImportPds.cpp:483
Isis::ProcessImportPds::p_minimumLongitude
double p_minimumLongitude
Minimum longitude found in the PDS projection labels.
Definition: ProcessImportPds.h:326
Isis::Table
Class for storing Table blobs information.
Definition: Table.h:61
Isis::ProcessImportPds::IsIsis2
bool IsIsis2()
Return true if ISIS2 cube, else return false.
Definition: ProcessImportPds.cpp:455
Isis::ProcessImportPds::p_labelFile
QString p_labelFile
The filename where the PDS label came from.
Definition: ProcessImportPds.h:291
Isis::ProcessImportPds::EndProcess
void EndProcess()
Definition: ProcessImportPds.cpp:59
Isis::ProcessImportPds::OmitOriginalLabel
void OmitOriginalLabel()
Prevents the Original Label blob from being written out to the end of the cube.
Definition: ProcessImportPds.cpp:472
Isis::ProcessImportPds::ProcessImportPds
ProcessImportPds()
Constructor.
Definition: ProcessImportPds.cpp:40
Isis::Image
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Isis::ProcessImportPds::p_tables
std::vector< Table > p_tables
Vector of Isis Table objects that were imported from PDS and need to be added to the imported cube fi...
Definition: ProcessImportPds.h:343
Isis::ProcessImportPds::p_polarRadius
double p_polarRadius
The polar radius found in the PDS projection labels.
Definition: ProcessImportPds.h:314
Isis::ProcessImportPds::ImportTable
Table & ImportTable(QString pdsTableName)
This method will import the PDS table with the given name into an Isis Table object.
Definition: ProcessImportPds.cpp:428
Isis::ProcessImport::StartProcess
virtual void StartProcess()
Process the input file and write it to the output.
Definition: ProcessImport.cpp:1302
Isis::ProcessImportPds::ExtractPdsProjection
void ExtractPdsProjection(PvlToPvlTranslationManager &pdsXlater)
Extract all possible PDS projection parameters from the PDS label.
Definition: ProcessImportPds.cpp:88
Isis::ProcessImportPds
Convert PDS archive files to Isis format.
Definition: ProcessImportPds.h:214
Isis::ProcessImportPds::ProcessPdsM3Label
void ProcessPdsM3Label(const QString &pdsDataFile, PdsFileType fileType)
Process Chandrayaan M3 PDS label.
Definition: ProcessImportPds.cpp:1174
Isis::ProcessImportPds::p_latitudeType
QString p_latitudeType
The latitude type found in the PDS projection labels.
Definition: ProcessImportPds.h:320
Isis::ProcessImportPds::ProcessPdsCombinedSpectrumLabel
void ProcessPdsCombinedSpectrumLabel(const QString &pdsDataFile)
Process the PDS label of type CombinedSpectrum.
Definition: ProcessImportPds.cpp:761
Isis::ProcessImportPds::GetProjectionOffsetMults
void GetProjectionOffsetMults(double &xoff, double &yoff, double &xmult, double &ymult)
Read mults and offsets from a def file in order to calculate the upper left x/y.
Definition: ProcessImportPds.cpp:351
Isis::ProcessImportPds::p_equatorialRadius
double p_equatorialRadius
Equatorial radius found in the PDS projection labels.
Definition: ProcessImportPds.h:312
Isis::ProcessImportPds::p_transDir
QString p_transDir
Base data directory.
Definition: ProcessImportPds.h:293
Isis::ProcessImportPds::p_encodingType
EncodingType p_encodingType
The encoding type of the image data.
Definition: ProcessImportPds.h:296
Isis::ProcessImportPds::p_jp2File
QString p_jp2File
The name of the file containing the encoded JP2 data.
Definition: ProcessImportPds.h:299
Isis::ProcessImportPds::GetProjectionOffsetChange
bool GetProjectionOffsetChange()
Return whether the projection offsets have changed.
Definition: ProcessImportPds.cpp:326
Isis::ProcessImportPds::p_keepOriginalLabel
bool p_keepOriginalLabel
determines whether or not to keep the OriginalLabel blob.
Definition: ProcessImportPds.h:341
Isis::ProcessImportPds::p_scaleFactor
double p_scaleFactor
The scale factor found in the PDS projection labels.
Definition: ProcessImportPds.h:332
Isis::ProcessImportPds::p_projection
QString p_projection
The name of the projection found in the PDS projection labels.
Definition: ProcessImportPds.h:303
Isis::ProcessImportPds::SetPdsFile
void SetPdsFile(const QString &pdsLabelFile, const QString &pdsDataFile, Pvl &pdsLabel, PdsFileType allowedTypes=All)
Set the input label file, data file and initialize a Pvl with the PDS labels.
Definition: ProcessImportPds.cpp:1395
Isis::ProcessImportPds::TranslateIsis2Instrument
void TranslateIsis2Instrument(Pvl &lab)
Fill as many of the Isis instrument labels as possible.
Definition: ProcessImportPds.cpp:1471
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ProcessImportPds::p_longitudeDirection
QString p_longitudeDirection
Longitude direction found in the PDS projection labels.
Definition: ProcessImportPds.h:316
Isis::ProcessImportPds::IdentifySource
void IdentifySource(Pvl &lab)
Identify the source of this file PDS or ISIS2.
Definition: ProcessImportPds.cpp:391
Isis::ProcessImportPds::ProcessLabel
void ProcessLabel(const QString &pdsDataFile, PdsFileType allowedTypes)
Load the PDS labels after determining what type of data file was provided.
Definition: ProcessImportPds.cpp:595
Isis::ProcessImportPds::p_projectionOffsetGroup
PvlGroup p_projectionOffsetGroup
Log information for projection offsets.
Definition: ProcessImportPds.h:309