Isis 3.0 Programmer Reference
Back | Home
ProcessImportPds.h
Go to the documentation of this file.
1 #ifndef ProcessImportPds_h
2 #define ProcessImportPds_h
3 
25 #include "ProcessImport.h"
26 
27 #include <vector>
28 
29 #include "Pvl.h"
30 #include <QString>
31 
32 namespace Isis {
33  class PvlTranslationManager;
34  class Table;
218 
219  public:
220  enum PdsFileType {
221  Image = 1,
222  Qube = 2,
223  SpectralQube = 4,
224  L0 = 8,
225  Rdn = 16,
226  Loc = 32,
227  Obs = 64,
228  CombinedSpectrum = 128,
229  All = Image | Qube | SpectralQube | L0 | Rdn | Loc | Obs | CombinedSpectrum
230  };
232  virtual ~ProcessImportPds();
233  void SetPdsFile(const QString &pdsLabelFile, const QString &pdsDataFile,
234  Pvl &pdsLabel, PdsFileType allowedTypes = All);
235  void SetPdsFile(const Pvl &pdsLabelPvl, const QString &pdsDataFile,
236  PdsFileType allowedTypes = All);
237  void ProcessLabel(const QString &pdsDataFile, PdsFileType allowedTypes);
238 
239  void TranslatePdsProjection(Pvl &lab);
240  void TranslateIsis2Labels(Pvl &lab);
241  void TranslatePdsLabels(Pvl &lab);
242 
243  bool IsIsis2();
244 
245  void OmitOriginalLabel();
246 
247  Table &ImportTable(QString pdsTableName);
248  // since we are overriding StartProcess(), we must specify for other
249  // overloaded calls to StartProcess(), the ProcessImport class method
250  // definitions should be used.
252  void StartProcess();
253  void StartProcess(void funct(Isis::Buffer &out));
254  void EndProcess();
255  void Finalize();
256  private:
257 
258 
259  enum Source {
260  NOSOURCE,
261  PDS,
262  ISIS2
263  };
264 
265  enum EncodingType {
266  NONE,
267  JP2
268  };
269 
271  const bool & calcOffsetOnly);
273  void ProcessSpecialPixels(PvlTranslationManager & pdsXlater, const bool & isQube);
274 
275  void ProcessPdsImageLabel(const QString &pdsDataFile);
276  void ProcessPdsQubeLabel(const QString &pdsDataFile, const QString &transFile);
277  void ProcessPdsM3Label(const QString &pdsDataFile, PdsFileType fileType);
278  void ProcessPdsCombinedSpectrumLabel(const QString &pdsDataFile);
279 
281  void GetProjectionOffsetMults(double &xoff, double &yoff,
282  double &xmult, double &ymult);
283 
284  void IdentifySource(Pvl &lab);
285 
286  void TranslateIsis2BandBin(Pvl &lab);
287  void TranslateIsis2Instrument(Pvl &lab);
288  void TranslatePdsBandBin(Pvl &lab);
289  void TranslatePdsArchive(Pvl &lab);
290 
292  QString p_labelFile;
293 
294  QString p_transDir;
295 
296  // Encoding info
297  EncodingType p_encodingType;
300  QString p_jp2File;
303  // Projection info
304  QString p_projection;
306  QString p_targetName;
309  double p_polarRadius;
315  QString p_latitudeType;
327  double p_scaleFactor;
329  double p_rotation;
331  double p_sampleProjectionOffset;
332  double p_lineProjectionOffset;
333  double p_upperLeftX;
334  double p_upperLeftY;
335 
338  std::vector<Table> p_tables;
342  Source p_source;
343  };
344 };
345 
346 #endif
347 
348 
Buffer for reading and writing cube data.
Definition: Buffer.h:68
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...
void ProcessPdsQubeLabel(const QString &pdsDataFile, const QString &transFile)
Process the PDS label of type QUBE or SPECTRALQUBE.
void TranslatePdsArchive(Pvl &lab)
Fill as many of the Isis3 BandBin labels as possible.
void ExtractPdsProjection(PvlTranslationManager &pdsXlater)
Extract all possible PDS projection parameters from the PDS label.
void TranslatePdsProjection(Pvl &lab)
Fills the passed in label with the projection information from the PDS label file.
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.
double p_pixelResolution
Pixel resolution found in the PDS projection labels.
void ProcessPdsM3Label(const QString &pdsDataFile, PdsFileType fileType)
Process Chandrayaan M3 PDS label.
void ProcessPdsCombinedSpectrumLabel(const QString &pdsDataFile)
Process the PDS label of type CombinedSpectrum.
QString p_transDir
Base data directory.
double p_maximumLongitude
Maximum longitude found in the PDS projection labels.
QString p_jp2File
The name of the file containing the encoded JP2 data.
double p_maximumLatitude
Maximum latitude found in the PDS projection labels.
bool p_keepOriginalLabel
determines whether or not to keep the OriginalLabel blob.
double p_scaleFactor
The scale factor found in the PDS projection labels.
void TranslateIsis2Instrument(Pvl &lab)
Fill as many of the Isis3 instrument labels as possible.
void IdentifySource(Pvl &lab)
Identify the source of this file PDS or ISIS2.
double p_polarRadius
The polar radius found in the PDS projection labels.
void StartProcess()
This method will write the cube and table data to the output cube.
void ProcessSpecialPixels(PvlTranslationManager &pdsXlater, const bool &isQube)
Handles all special pixel setting, ultimately, calls SetSpecialValues.
Pvl p_pdsLabel
Internalized PDS label.
Table & ImportTable(QString pdsTableName)
This method will import the PDS table with the given name into an Isis Table object.
Allows applications to translate simple text files.
QString p_latitudeType
The latitude type found in the PDS projection labels.
void TranslateIsis2Labels(Pvl &lab)
Translate as many of the ISIS2 labels as possible.
EncodingType p_encodingType
The encoding type of the image data.
int p_longitudeDomain
Longitude domain found in the PDS projection labels.
virtual void StartProcess()
Process the input file and write it to the output.
void ProcessPixelBitandType(PvlTranslationManager &pdsXlater)
Handles PixelType and BitsPerPixel Calls SetPixelType with the correct values.
This represents a cube in a project-based GUI interface.
Definition: Image.h:91
QString p_longitudeDirection
Longitude direction found in the PDS projection labels.
void TranslatePdsLabels(Pvl &lab)
Translate as many of the PDS labels as possible.
double p_equatorialRadius
Equatorial radius found in the PDS projection labels.
Container for cube-like labels.
Definition: Pvl.h:135
QString p_projection
The name of the projection found in the PDS projection labels.
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.
void TranslateIsis2BandBin(Pvl &lab)
Fill as many of the Isis3 BandBin labels as possible.
void ProcessLabel(const QString &pdsDataFile, PdsFileType allowedTypes)
Load the PDS labels after determining what type of data file was provided.
Convert PDS archive files to Isis format.
Class for storing Table blobs information.
Definition: Table.h:74
void ProcessDataFilePointer(PvlTranslationManager &pdsXlater, const bool &calcOffsetOnly)
Handles the DataFilePointer keyword, aka ^QUBE or ^IMAGE.
double p_minimumLatitude
Minimum latitude found in the PDS projection labels.
Byte swapper.
double p_minimumLongitude
Minimum longitude found in the PDS projection labels.
void Finalize()
End the processing sequence and cleans up by closing cubes, freeing memory, etc.
double p_rotation
The rotation found in the PDS labels.
void TranslatePdsBandBin(Pvl &lab)
Fill as many of the Isis3 BandBin labels as possible.
void OmitOriginalLabel()
Prevents the Original Label blob from being written out to the end of the cube.
void ProcessPdsImageLabel(const QString &pdsDataFile)
Process the PDS label of type IMAGE.
bool IsIsis2()
Return true if ISIS2 cube, else return false.
QString p_labelFile
The filename where the PDS label came from.
ProcessImportPds()
Constructor.

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:28