Isis 3 Developer 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,
237  L0 = 8,
238  Rdn = 16,
239  Loc = 32,
240  Obs = 64,
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 
285  void ProcessDataFilePointer(PvlToPvlTranslationManager & pdsXlater,
286  const bool & calcOffsetOnly);
287  void ProcessPixelBitandType(PvlToPvlTranslationManager & pdsXlater);
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 
295  void ExtractPdsProjection(PvlToPvlTranslationManager &pdsXlater);
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 
306  Pvl p_pdsLabel;
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;
322  bool p_projectionOffsetChange;
325  PvlGroup p_projectionOffsetGroup;
327  QString p_targetName;
328  double p_equatorialRadius;
330  double p_polarRadius;
332  QString p_longitudeDirection;
334  int p_longitudeDomain;
336  QString p_latitudeType;
338  double p_minimumLatitude;
340  double p_maximumLatitude;
342  double p_minimumLongitude;
344  double p_maximumLongitude;
346  double p_pixelResolution;
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 
357  bool p_keepOriginalLabel;
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
Definition: ProcessImportPds.h:242
void TranslatePdsProjection(Pvl &lab)
Fills the passed in label with the projection information from the PDS label file.
Definition: ProcessImportPds.cpp:1579
PdsFileType
Definition: ProcessImportPds.h:233
Definition: ProcessImportPds.h:238
virtual ~ProcessImportPds()
Definition: ProcessImportPds.cpp:68
Definition: ProcessImportPds.h:240
Definition: ProcessImportPds.h:239
Definition: ProcessImportPds.h:241
void StartProcess()
This method will write the cube and table data to the output cube.
Definition: ProcessImportPds.cpp:1437
Table & ImportTable(QString pdsTableName)
This method will import the PDS table with the given name into an Isis Table object.
Definition: ProcessImportPds.cpp:444
Definition: ProcessImportPds.h:235
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
void TranslateIsis2Labels(Pvl &lab)
Translate as many of the ISIS2 labels as possible.
Definition: ProcessImportPds.cpp:1517
bool GetProjectionOffsetChange()
Return whether the projection offsets have changed.
Definition: ProcessImportPds.cpp:342
virtual void StartProcess()
Process the input file and write it to the output.
Definition: ProcessImport.cpp:1291
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
void TranslatePdsLabels(Pvl &lab)
Translate as many of the PDS labels as possible.
Definition: ProcessImportPds.cpp:1562
Definition: ProcessImportPds.h:236
Container for cube-like labels.
Definition: Pvl.h:135
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:1411
void ProcessLabel(const QString &pdsDataFile, PdsFileType allowedTypes)
Load the PDS labels after determining what type of data file was provided.
Definition: ProcessImportPds.cpp:611
Convert PDS archive files to Isis format.
Definition: ProcessImportPds.h:230
Class for storing Table blobs information.
Definition: Table.h:77
PvlGroup GetProjectionOffsetGroup()
Return the projection offsets.
Definition: ProcessImportPds.cpp:350
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Byte swapper.
Definition: ProcessImport.h:170
void Finalize()
End the processing sequence and cleans up by closing cubes, freeing memory, etc.
Definition: ProcessImportPds.cpp:328
void EndProcess()
Definition: ProcessImportPds.cpp:75
void OmitOriginalLabel()
Prevents the Original Label blob from being written out to the end of the cube.
Definition: ProcessImportPds.cpp:488
bool IsIsis2()
Return true if ISIS2 cube, else return false.
Definition: ProcessImportPds.cpp:471
Definition: ProcessImportPds.h:237
ProcessImportPds()
Constructor.
Definition: ProcessImportPds.cpp:55