Isis 3 Programmer Reference
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 "PvlGroup.h"
31 #include <QString>
32 
33 namespace Isis {
34  class PvlToPvlTranslationManager;
35  class Table;
231 
232  public:
233  enum PdsFileType {
234  Image = 1,
235  Qube = 2,
236  SpectralQube = 4,
237  L0 = 8,
238  Rdn = 16,
239  Loc = 32,
240  Obs = 64,
241  CombinedSpectrum = 128,
242  All = Image | Qube | SpectralQube | L0 | Rdn | Loc | Obs | CombinedSpectrum
243  };
245  virtual ~ProcessImportPds();
248  void SetPdsFile(const QString &pdsLabelFile, const QString &pdsDataFile,
249  Pvl &pdsLabel, PdsFileType allowedTypes = All);
250  void SetPdsFile(const Pvl &pdsLabelPvl, const QString &pdsDataFile,
251  PdsFileType allowedTypes = All);
252  void ProcessLabel(const QString &pdsDataFile, PdsFileType allowedTypes);
253 
254  void TranslatePdsProjection(Pvl &lab);
255  void TranslateIsis2Labels(Pvl &lab);
256  void TranslatePdsLabels(Pvl &lab);
257 
258  bool IsIsis2();
259 
260  void OmitOriginalLabel();
261 
262  Table &ImportTable(QString pdsTableName);
263  // since we are overriding StartProcess(), we must specify for other
264  // overloaded calls to StartProcess(), the ProcessImport class method
265  // definitions should be used.
267  void StartProcess();
268  void StartProcess(void funct(Isis::Buffer &out));
269  void EndProcess();
270  void Finalize();
271  private:
272 
273 
274  enum Source {
275  NOSOURCE,
276  PDS,
277  ISIS2
278  };
279 
280  enum EncodingType {
281  NONE,
282  JP2
283  };
284 
286  const bool & calcOffsetOnly);
288  void ProcessSpecialPixels(PvlToPvlTranslationManager & pdsXlater, const bool & isQube);
289 
290  void ProcessPdsImageLabel(const QString &pdsDataFile);
291  void ProcessPdsQubeLabel(const QString &pdsDataFile, const QString &transFile);
292  void ProcessPdsM3Label(const QString &pdsDataFile, PdsFileType fileType);
293  void ProcessPdsCombinedSpectrumLabel(const QString &pdsDataFile);
294 
296  void GetProjectionOffsetMults(double &xoff, double &yoff,
297  double &xmult, double &ymult);
298 
299  void IdentifySource(Pvl &lab);
300 
301  void TranslateIsis2BandBin(Pvl &lab);
302  void TranslateIsis2Instrument(Pvl &lab);
303  void TranslatePdsBandBin(Pvl &lab);
304  void TranslatePdsArchive(Pvl &lab);
305 
307  QString p_labelFile;
308 
309  QString p_transDir;
310 
311  // Encoding info
312  EncodingType p_encodingType;
315  QString p_jp2File;
318  // Projection info
319  QString p_projection;
327  QString p_targetName;
330  double p_polarRadius;
336  QString p_latitudeType;
348  double p_scaleFactor;
350  double p_rotation;
352  double p_sampleProjectionOffset;
353  double p_lineProjectionOffset;
354  double p_upperLeftX;
355  double p_upperLeftY;
356 
359  std::vector<Table> p_tables;
363  Source p_source;
364  };
365 };
366 
367 #endif
Buffer for reading and writing cube data.
Definition: Buffer.h:69
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 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.
void ProcessDataFilePointer(PvlToPvlTranslationManager &pdsXlater, const bool &calcOffsetOnly)
Handles the DataFilePointer keyword, aka ^QUBE or ^IMAGE.
PvlGroup p_projectionOffsetGroup
Log information for projection offsets.
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.
Allows applications to translate simple text files.
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 ExtractPdsProjection(PvlToPvlTranslationManager &pdsXlater)
Extract all possible PDS projection parameters from the PDS label.
void StartProcess()
This method will write the cube and table data to the output cube.
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.
bool p_projectionOffsetChange
Whether the projection offsets were updated upon loading.
QString p_latitudeType
The latitude type found in the PDS projection labels.
void ProcessSpecialPixels(PvlToPvlTranslationManager &pdsXlater, const bool &isQube)
Handles all special pixel setting, ultimately, calls SetSpecialValues.
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
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.
bool GetProjectionOffsetChange()
Return whether the projection offsets have changed.
virtual void StartProcess()
Process the input file and write it to the output.
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
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:77
double p_minimumLatitude
Minimum latitude found in the PDS projection labels.
PvlGroup GetProjectionOffsetGroup()
Return the projection offsets.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
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 ProcessPixelBitandType(PvlToPvlTranslationManager &pdsXlater)
Handles PixelType and BitsPerPixel Calls SetPixelType with the correct values.
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.