USGS

Isis 3.0 Object Programmers' Reference

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;
216 
217  public:
218  enum PdsFileType {
219  Image = 1,
220  Qube = 2,
221  SpectralQube = 4,
222  L0 = 8,
223  Rdn = 16,
224  Loc = 32,
225  Obs = 64,
226  All = Image | Qube | SpectralQube | L0 | Rdn | Loc | Obs
227  };
229  virtual ~ProcessImportPds();
230  void SetPdsFile(const QString &pdsLabelFile, const QString &pdsDataFile,
231  Pvl &pdsLabel, PdsFileType allowedTypes = All);
232  void SetPdsFile(const Pvl &pdsLabelPvl, const QString &pdsDataFile,
233  PdsFileType allowedTypes = All);
234  void ProcessLabel(const QString &pdsDataFile, PdsFileType allowedTypes);
235 
236  void TranslatePdsProjection(Pvl &lab);
237  void TranslateIsis2Labels(Pvl &lab);
238  void TranslatePdsLabels(Pvl &lab);
239 
240  bool IsIsis2();
241 
242  void OmitOriginalLabel();
243 
244  Table &ImportTable(QString pdsTableName);
245  // since we are overriding StartProcess(), we must specify for other
246  // overloaded calls to StartProcess(), the ProcessImport class method
247  // definitions should be used.
249  void StartProcess();
250  void StartProcess(void funct(Isis::Buffer &out));
251  void EndProcess();
252  void Finalize();
253  private:
254 
255 
256  enum Source {
257  NOSOURCE,
258  PDS,
259  ISIS2
260  };
261 
262  enum EncodingType {
263  NONE,
264  JP2
265  };
266 
268  const bool & calcOffsetOnly);
270  void ProcessSpecialPixels(PvlTranslationManager & pdsXlater, const bool & isQube);
271 
272  void ProcessPdsImageLabel(const QString &pdsDataFile);
273  void ProcessPdsQubeLabel(const QString &pdsDataFile, const QString &transFile);
274  void ProcessPdsM3Label(const QString &pdsDataFile, PdsFileType fileType);
275 
277  void GetProjectionOffsetMults(double &xoff, double &yoff,
278  double &xmult, double &ymult);
279 
280  void IdentifySource(Pvl &lab);
281 
282  void TranslateIsis2BandBin(Pvl &lab);
283  void TranslateIsis2Instrument(Pvl &lab);
284  void TranslatePdsBandBin(Pvl &lab);
285  void TranslatePdsArchive(Pvl &lab);
286 
288  QString p_labelFile;
289 
290  QString p_transDir;
291 
292  // Encoding info
293  EncodingType p_encodingType;
296  QString p_jp2File;
299  // Projection info
300  QString p_projection;
302  QString p_targetName;
305  double p_polarRadius;
311  QString p_latitudeType;
323  double p_scaleFactor;
325  double p_rotation;
327  double p_sampleProjectionOffset;
328  double p_lineProjectionOffset;
329  double p_upperLeftX;
330  double p_upperLeftY;
331 
334  std::vector<Table> p_tables;
338  Source p_source;
339  };
340 };
341 
342 #endif
343 
344