File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis Developer Reference
ProcessImportPds.h
Go to the documentation of this file.
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,
221  L0 = 8,
222  Rdn = 16,
223  Loc = 32,
224  Obs = 64,
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 
269  void ProcessDataFilePointer(PvlToPvlTranslationManager & pdsXlater,
270  const bool & calcOffsetOnly);
271  void ProcessPixelBitandType(PvlToPvlTranslationManager & pdsXlater);
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 
279  void ExtractPdsProjection(PvlToPvlTranslationManager &pdsXlater);
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 
290  Pvl p_pdsLabel;
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;
306  bool p_projectionOffsetChange;
309  PvlGroup p_projectionOffsetGroup;
311  QString p_targetName;
312  double p_equatorialRadius;
314  double p_polarRadius;
316  QString p_longitudeDirection;
318  int p_longitudeDomain;
320  QString p_latitudeType;
322  double p_minimumLatitude;
324  double p_maximumLatitude;
326  double p_minimumLongitude;
328  double p_maximumLongitude;
330  double p_pixelResolution;
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 
341  bool p_keepOriginalLabel;
343  std::vector<Table> p_tables;
347  Source p_source;
348  };
349 };
350 
351 #endif
Isis::ProcessImportPds::Loc
@ Loc
Definition: ProcessImportPds.h:223
Isis::ProcessImportPds::CombinedSpectrum
@ CombinedSpectrum
Definition: ProcessImportPds.h:225
Isis::ProcessImportPds::GetProjectionOffsetGroup
PvlGroup GetProjectionOffsetGroup()
Return the projection offsets.
Definition: ProcessImportPds.cpp:334
Table.h
ProcessImportPds.h
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::ProcessImportPds::Finalize
void Finalize()
End the processing sequence and cleans up by closing cubes, freeing memory, etc.
Definition: ProcessImportPds.cpp:312
Isis::ImportPdsTable
Import a PDS table file with a label description.
Definition: ImportPdsTable.h:101
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::ProcessImportPds::StartProcess
void StartProcess()
This method will write the cube and table data to the output cube.
Definition: ProcessImportPds.cpp:1421
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::His
const double His
Value for an Isis High Instrument Saturation pixel.
Definition: SpecialPixel.h:111
SpecialPixel.h
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
PvlGroup.h
Isis::PvlObject::groups
int groups() const
Returns the number of groups contained.
Definition: PvlObject.h:75
Isis::ProcessImportPds::TranslateIsis2Labels
void TranslateIsis2Labels(Pvl &lab)
Translate as many of the ISIS2 labels as possible.
Definition: ProcessImportPds.cpp:1500
Isis::FileName::fileExists
bool fileExists() const
Returns true if the file exists; false otherwise.
Definition: FileName.cpp:449
Isis::PvlToPvlTranslationManager::Translate
virtual QString Translate(QString translationGroupName, int findex=0)
Returns a translated value.
Definition: PvlToPvlTranslationManager.cpp:107
LineManager.h
Isis::UnsignedWord
@ UnsignedWord
Definition: PixelType.h:31
Isis::ProcessImportPds::Obs
@ Obs
Definition: ProcessImportPds.h:224
PvlTokenizer.h
Isis::ProcessImportPds::TranslatePdsLabels
void TranslatePdsLabels(Pvl &lab)
Translate as many of the PDS labels as possible.
Definition: ProcessImportPds.cpp:1545
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::SignedWord
@ SignedWord
Definition: PixelType.h:32
Isis::ImportPdsTable::getFormattedName
QString getFormattedName(const QString &colname) const
Converts a column name to a camel-case after it has been cleansed.
Definition: ImportPdsTable.cpp:759
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
ProcessImport.h
Preference.h
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
IString.h
Isis::ProcessImportPds::Qube
@ Qube
Definition: ProcessImportPds.h:219
Isis::Hrs
const double Hrs
Value for an Isis High Representation Saturation pixel.
Definition: SpecialPixel.h:117
Isis::Buffer
Buffer for reading and writing cube data.
Definition: Buffer.h:53
Isis::Lrs
const double Lrs
Value for an Isis Low Representation Saturation pixel.
Definition: SpecialPixel.h:99
Isis::ByteOrderEnumeration
Isis::ByteOrder ByteOrderEnumeration(const QString &order)
Definition: Endian.h:55
OriginalLabel.h
Isis::PvlToPvlTranslationManager
Allows applications to translate simple text files.
Definition: PvlToPvlTranslationManager.h:65
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::Double
@ Double
Definition: PixelType.h:36
PixelType.h
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
Isis::ProcessImportPds::SpectralQube
@ SpectralQube
Definition: ProcessImportPds.h:220
_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::ProcessImportPds::~ProcessImportPds
virtual ~ProcessImportPds()
Definition: ProcessImportPds.cpp:52
Isis::ProcessImport
Byte swapper.
Definition: ProcessImport.h:155
Isis::toInt
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition: IString.cpp:93
Isis::PvlToPvlTranslationManager::InputKeyword
virtual const PvlKeyword & InputKeyword(const QString translationGroupName) const
Returns the ith input value associated with the output name argument.
Definition: PvlToPvlTranslationManager.cpp:231
Isis::Table
Class for storing Table blobs information.
Definition: Table.h:61
Isis::NULL8
const double NULL8
Definition: SpecialPixel.h: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::ProcessImportPds::IsIsis2
bool IsIsis2()
Return true if ISIS2 cube, else return false.
Definition: ProcessImportPds.cpp:455
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::IException
Isis exception class.
Definition: IException.h:91
Isis::TProjection::To180Domain
static double To180Domain(const double lon)
This method converts a longitude into the -180 to 180 domain.
Definition: TProjection.cpp:657
TProjection.h
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::PvlObject::addGroup
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:186
Isis::Lis
const double Lis
Value for an Isis Low Instrument Saturation pixel.
Definition: SpecialPixel.h:105
Isis::UnsignedInteger
@ UnsignedInteger
Definition: PixelType.h:33
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::OriginalLabel
Read and store original labels.
Definition: OriginalLabel.h:35
Isis::SignedInteger
@ SignedInteger
Definition: PixelType.h:34
PvlKeyword.h
Isis::ProcessImportPds
Convert PDS archive files to Isis format.
Definition: ProcessImportPds.h:214
Isis::PvlKeyword::size
int size() const
Returns the number of values stored in this keyword.
Definition: PvlKeyword.h:125
PvlObject.h
Isis::ImportPdsTable::importTable
Table importTable(const QString &isisTableName)
Populate a Table object with the PDS table and return it.
Definition: ImportPdsTable.cpp:318
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
Projection.h
Isis::PvlToPvlTranslationManager::InputHasKeyword
virtual bool InputHasKeyword(const QString translationGroupName)
Indicates if the input keyword corresponding to the output name exists in the label.
Definition: PvlToPvlTranslationManager.cpp:282
Isis::ProcessImportPds::PdsFileType
PdsFileType
Definition: ProcessImportPds.h:217
Isis::PvlObject::findKeyword
PvlKeyword & findKeyword(const QString &kname, FindOptions opts)
Finds a keyword in the current PvlObject, or deeper inside other PvlObjects and Pvlgroups within this...
Definition: PvlObject.cpp:177
Isis::ProcessImportPds::All
@ All
Definition: ProcessImportPds.h:226
ImportPdsTable.h
UserInterface.h
Isis::ProcessImportPds::Rdn
@ Rdn
Definition: ProcessImportPds.h:222
Isis::UnsignedByte
@ UnsignedByte
Definition: PixelType.h:29
Isis::ProcessImportPds::L0
@ L0
Definition: ProcessImportPds.h:221
PvlToPvlTranslationManager.h
Isis::ProcessImportPds::GetProjectionOffsetChange
bool GetProjectionOffsetChange()
Return whether the projection offsets have changed.
Definition: ProcessImportPds.cpp:326
Isis::PvlToPvlTranslationManager::Auto
void Auto(Pvl &outputLabel)
Automatically translate all the output names found in the translation table If a output name does not...
Definition: PvlToPvlTranslationManager.cpp:199
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::FileName::path
QString path() const
Returns the path of the file name.
Definition: FileName.cpp:103
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
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::Real
@ Real
Definition: PixelType.h:35

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 USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:12:10