Commit 0d827a2b authored by Jeannie Backer's avatar Jeannie Backer
Browse files

Temporarily removing osirisrex directory from branch.

parent 96f25004
Loading
Loading
Loading
Loading

isis/src/osirisrex/Makefile

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
include $(ISISROOT)/make/isismake.cat

isis/src/osirisrex/apps/Makefile

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
include $(ISISROOT)/make/isismake.appstree
+0 −7
Original line number Diff line number Diff line
ifeq ($(ISISROOT), $(BLANK))
.SILENT:
error:
	echo "Please set ISISROOT";
else
	include $(ISISROOT)/make/isismake.apps
endif
 No newline at end of file
+0 −88
Original line number Diff line number Diff line
#include "Isis.h"

#include "Cube.h"
#include "IException.h"
#include "IString.h"
#include "OriginalLabel.h"
#include "ProcessBySample.h"
#include "ProcessImportFits.h"
#include "Pvl.h"
#include "PvlGroup.h"
#include "PvlKeyword.h"
#include "UserInterface.h"

#include <fstream>
#include <iostream>
#include <QString>

using namespace std;
using namespace Isis;

//void Convert(Buffer &buf);

void IsisMain() {

  UserInterface &ui = Application::GetUserInterface();

  ProcessImportFits importFits;

  importFits.setFitsFile(FileName(ui.GetFileName("FROM")));

  importFits.setProcessFileStructure(0);

  Cube *output = importFits.SetOutputCube("TO");

  // Get the directory where the OSIRIS-REx translation tables are.
  PvlGroup dataDir(Preference::Preferences().findGroup("DataDirectory"));
  QString transDir = (QString) dataDir["OsirisRex"] + "/translations/";

  // Temp storage of translated labels
  Pvl outLabel;

  // Get the FITS label
  Pvl fitsLabel;
  fitsLabel.addGroup(importFits.fitsLabel(0));

  // Create an Instrument group
  FileName insTransFile(transDir + "ocamsInstrument_fit.trn");
  PvlTranslationManager insXlater(fitsLabel, insTransFile.expanded());
  insXlater.Auto(outLabel);
  output->putGroup(outLabel.findGroup("Instrument", Pvl::Traverse));

  // Create a Band Bin group
  FileName bandTransFile(transDir + "ocamsBandBin_fit.trn");
  PvlTranslationManager bandBinXlater(fitsLabel, bandTransFile.expanded());
  bandBinXlater.Auto(outLabel);
  output->putGroup(outLabel.findGroup("BandBin", Pvl::Traverse));

  // Create an Archive group
  // OREx team reduced the output keywords, so this was commented out
  // Remove if all goes well with next release
  //FileName archiveTransFile(transDir + "ocamsArchive_fit.trn");
  //PvlTranslationManager archiveXlater(fitsLabel, archiveTransFile.expanded());
  //archiveXlater.Auto(outLabel);
  //output->putGroup(outLabel.findGroup("Archive", Pvl::Traverse));

  // Create a Kernels group
  FileName kernelsTransFile(transDir + "ocamsKernels_fit.trn");
  PvlTranslationManager kernelsXlater(fitsLabel, kernelsTransFile.expanded());
  kernelsXlater.Auto(outLabel);
  output->putGroup(outLabel.findGroup("Kernels", Pvl::Traverse));

  // Save the input FITS label in the Cube original labels
  Pvl pvl;
  pvl += importFits.fitsLabel(0);
  OriginalLabel originals(pvl);
  output->write(originals);

  // Convert the image data
  //importFits.StartProcess(Convert);
  importFits.StartProcess();
  importFits.Finalize();
}

/*void Convert(Buffer &buf) {
  for (int i=0; i<buf.size(); i++) {
    cout << buf[i] << endl;
  }
}*/
+0 −68
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>

<application name="ocams2isis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://isis.astrogeology.usgs.gov/Schemas/Application/application.xsd">
  
  <brief>
    Import Osiris Rex Camera Suite (OCAMS) files into ISIS format.
  </brief>
  <description>
    <p>
      This program will import FITS (Flexible Image Transport System) formatted files from the 
      Osiris Rex MapCam, SamCam, and PolyCam instruments into ISIS cube formatted files. 
    </p>
  </description>
  
  <history>
    <change name="Janet Barrett" date="2014-04-02">
      Original version
    </change> 
    <change name="Stuart C. Sides" date="2015-09-28">
      Updated to only include labels requested by the OSIRIS-REx team
    </change> 
  </history>

  <seeAlso>
    <applications>
      <item>fits2isis</item>
    </applications>
  </seeAlso>

  <category>
    <categoryItem>Osiris Rex</categoryItem>
  </category>

  <groups>
    <group name="Files">
      <parameter name="FROM">
        <type>filename</type>
        <fileMode>input</fileMode>
        <brief>
          An Osiris Rex OCAMS FITS file to be converted to an ISIS cube.
        </brief>
        <description>
          Use this parameter to select the filename of an Osiris Rex MapCam, SamCam,
          or PolyCam file to be converted to an ISIS cube. This is expected to be a 
          FITS formatted file. 
        </description>
        <filter>
          *.fits
        </filter>
      </parameter>

      <parameter name="TO">
        <type>cube</type>
        <fileMode>output</fileMode>
        <brief>
          Output ISIS cube file
        </brief>
        <description>
          The output cube file that will contain the Osiris Rex OCAMS image in ISIS format.
        </description>
        <filter>
          *.cub
        </filter>
      </parameter>
    </group>
  </groups>

</application>
Loading