isis/src/mex/apps/hrsc2isis/main.cpp
void TranslateHrscLabels(Pvl &inLabels, Pvl &outLabel) {

  // Get the directory where the translation tables are.
  QString transDir = "$ISISROOT/appdata/translations/";

  // Translate the Instrument group
  FileName transFile(transDir + "MexHrscInstrument.trn");
  PvlToPvlTranslationManager instrumentXlater(inLabels, transFile.expanded());
  instrumentXlater.Auto(outLabel);

  // Remove 'Z' from times
  QString startTime = outLabel.findGroup("Instrument", Pvl::Traverse)["StartTime"][0];
  startTime = startTime.mid(0, startTime.size() - 1);
  outLabel.findGroup("Instrument", Pvl::Traverse)["StartTime"] = startTime;

  QString stopTime = outLabel.findGroup("Instrument", Pvl::Traverse)["StopTime"][0];
  stopTime = stopTime.mid(0, stopTime.size() - 1);
  outLabel.findGroup("Instrument", Pvl::Traverse)["StopTime"] = stopTime;

  // Translate the BandBin group
  transFile  = transDir + "MexHrscBandBin.trn";
  PvlToPvlTranslationManager bandBinXlater(inLabels, transFile.expanded());
  bandBinXlater.Auto(outLabel);

  // Translate the Archive group
  transFile  = transDir + "MexHrscArchive.trn";
  PvlToPvlTranslationManager archiveXlater(inLabels, transFile.expanded());
  archiveXlater.Auto(outLabel);

  // Translate the Kernels group
  transFile  = transDir + "MexHrscKernels.trn";
  PvlToPvlTranslationManager kernelsXlater(inLabels, transFile.expanded());
  kernelsXlater.Auto(outLabel);

}
// Translate HRSC Stereo lables into ISIS labels
Translate HRSC Stereo lables into ISIS labels
Translate HRSC Stereo lables into ISIS labels
void TranslateHrscLabels(Pvl &inLabels, Pvl &outLabel) {
  QString transDir = "$ISISROOT/appdata/translations/";
  FileName transFile(transDir + "MexHrscInstrument.trn");
  PvlToPvlTranslationManager instrumentXlater(inLabels, transFile.expanded());
  instrumentXlater.Auto(outLabel);
  QString startTime = outLabel.findGroup("Instrument", Pvl::Traverse)["StartTime"][0];
  startTime = startTime.mid(0, startTime.size() - 1);
  outLabel.findGroup("Instrument", Pvl::Traverse)["StartTime"] = startTime;
  QString stopTime = outLabel.findGroup("Instrument", Pvl::Traverse)["StopTime"][0];
  stopTime = stopTime.mid(0, stopTime.size() - 1);
  outLabel.findGroup("Instrument", Pvl::Traverse)["StopTime"] = stopTime;
  transFile  = transDir + "MexHrscBandBin.trn";
  PvlToPvlTranslationManager bandBinXlater(inLabels, transFile.expanded());
  bandBinXlater.Auto(outLabel);
  transFile  = transDir + "MexHrscArchive.trn";
  PvlToPvlTranslationManager archiveXlater(inLabels, transFile.expanded());
  archiveXlater.Auto(outLabel);
  transFile  = transDir + "MexHrscKernels.trn";
  PvlToPvlTranslationManager kernelsXlater(inLabels, transFile.expanded());
  kernelsXlater.Auto(outLabel);
}
void TranslateHrscLabels ( Pvl & inLabels , Pvl & outLabel ) { QString transDir = " " ; FileName transFile ( transDir + " " ) ; PvlToPvlTranslationManager instrumentXlater ( inLabels , transFile . expanded ( ) ) ; instrumentXlater . Auto ( outLabel ) ; QString startTime = outLabel . findGroup ( " " , Pvl :: Traverse ) [ " " ] [ 0 ] ; startTime = startTime . mid ( 0 , startTime . size ( ) - 1 ) ; outLabel . findGroup ( " " , Pvl :: Traverse ) [ " " ] = startTime ; QString stopTime = outLabel . findGroup ( " " , Pvl :: Traverse ) [ " " ] [ 0 ] ; stopTime = stopTime . mid ( 0 , stopTime . size ( ) - 1 ) ; outLabel . findGroup ( " " , Pvl :: Traverse ) [ " " ] = stopTime ; transFile = transDir + " " ; PvlToPvlTranslationManager bandBinXlater ( inLabels , transFile . expanded ( ) ) ; bandBinXlater . Auto ( outLabel ) ; transFile = transDir + " " ; PvlToPvlTranslationManager archiveXlater ( inLabels , transFile . expanded ( ) ) ; archiveXlater . Auto ( outLabel ) ; transFile = transDir + " " ; PvlToPvlTranslationManager kernelsXlater ( inLabels , transFile . expanded ( ) ) ; kernelsXlater . Auto ( outLabel ) ; }
Translate HRSC Stereo lables into ISIS labels
Translate HRSC Stereo lables into ISIS labels
// Get the directory where the translation tables are. // Translate the Instrument group // Remove 'Z' from times // Translate the BandBin group // Translate the Archive group // Translate the Kernels group