58 if(inst[
"InstrumentId"][0] !=
"Marci") {
59 string msg =
"The image does not appear to be a Marci Image";
72 int sumMode = inst[
"SummingMode"];
76 QString stime = inst[
"SpacecraftClockCount"];
82 map<QString, int> filterToDetectorOffset;
83 filterToDetectorOffset.insert(pair<QString, int>(
"BLUE", 709));
84 filterToDetectorOffset.insert(pair<QString, int>(
"GREEN", 734));
85 filterToDetectorOffset.insert(pair<QString, int>(
"ORANGE", 760));
86 filterToDetectorOffset.insert(pair<QString, int>(
"RED", 786));
87 filterToDetectorOffset.insert(pair<QString, int>(
"NIR", 811));
88 filterToDetectorOffset.insert(pair<QString, int>(
"LONG_UV", 266));
89 filterToDetectorOffset.insert(pair<QString, int>(
"SHORT_UV", 293));
91 map<QString, int> filterToFilterNumbers;
92 filterToFilterNumbers.insert(pair<QString, int>(
"BLUE", 0));
93 filterToFilterNumbers.insert(pair<QString, int>(
"GREEN", 1));
94 filterToFilterNumbers.insert(pair<QString, int>(
"ORANGE", 2));
95 filterToFilterNumbers.insert(pair<QString, int>(
"RED", 3));
96 filterToFilterNumbers.insert(pair<QString, int>(
"NIR", 4));
97 filterToFilterNumbers.insert(pair<QString, int>(
"LONG_UV", 5));
98 filterToFilterNumbers.insert(pair<QString, int>(
"SHORT_UV", 6));
100 int frameletOffsetFactor = inst[
"ColorOffset"];
102 if((
int)inst[
"DataFlipped"] != 0) frameletOffsetFactor *= -1;
103 map<QString, int> filterToFrameletOffset;
104 filterToFrameletOffset.insert(pair<QString, int>(
"NIR", 0 * frameletOffsetFactor));
105 filterToFrameletOffset.insert(pair<QString, int>(
"RED", 1 * frameletOffsetFactor));
106 filterToFrameletOffset.insert(pair<QString, int>(
"ORANGE", 2 * frameletOffsetFactor));
107 filterToFrameletOffset.insert(pair<QString, int>(
"GREEN", 3 * frameletOffsetFactor));
108 filterToFrameletOffset.insert(pair<QString, int>(
"BLUE", 4 * frameletOffsetFactor));
109 filterToFrameletOffset.insert(pair<QString, int>(
"LONG_UV", 5 * frameletOffsetFactor));
110 filterToFrameletOffset.insert(pair<QString, int>(
"SHORT_UV", 6 * frameletOffsetFactor));
114 const PvlKeyword &filtNames = bandBin[
"FilterName"];
116 for(
int i = 0; i < filtNames.
size(); i++) {
117 if(filterToDetectorOffset.find(filtNames[i]) == filterToDetectorOffset.end()) {
118 QString msg =
"Unrecognized filter name [" + filtNames[i] +
"]";
122 p_detectorStartLines.push_back(filterToDetectorOffset.find(filtNames[i])->second);
123 p_filterNumbers.push_back(filterToFilterNumbers.find(filtNames[i])->second);
124 p_frameletOffsets.push_back(filterToFrameletOffset.find(filtNames[i])->second);
136 bool flippedFramelets = (int)inst[
"DataFlipped"] != 0;
158 bool evenFramelets = (inst[
"Framelets"][0] ==
"Even");
167 else if(sumMode == 2) {
170 else if(sumMode == 4) {
199 distmap->SetFilter(p_filterNumbers[vband-1]);
void SetBandFirstDetectorLine(int firstLine)
Change the starting line in the detector based on band.
void SetFocalLength()
Reads the focal length from the instrument kernel.
void SetFrameletOrderReversed(bool frameletOrderReversed, int nframelets)
Changes the direction of the framelets.
void SetBand(const int band)
Sets the band in the camera model.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Distort/undistort focal plane coordinates.
CameraDistortionMap * DistortionMap()
Returns a pointer to the CameraDistortionMap object.
void SetFrameletOffset(int frameletOffset)
Reset the frame offset.
QString m_instrumentNameLong
Full instrument name.
Isis::Camera * MarciCameraPlugin(Isis::Cube &cube)
This is the function that is called in order to instantiate a MarciCamera object. ...
double p_etStart
Ephemeris Start iTime.
void SetDetectorSampleSumming(const double summing)
Set sample summing mode.
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void SetFrameletsGeometricallyFlipped(bool frameletsFlipped)
Mirrors the each framelet in the file.
Namespace for the standard library.
Convert between undistorted focal plane and ground coordinates.
double p_interframeDelay
Interframe Delay value from labels.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
void SetDetectorOrigin(const double sample, const double line)
Set the detector origin.
PushFrameCameraDetectorMap * DetectorMap()
Returns a pointer to the PushFrameCameraDetectorMap object.
This error is for when a programmer made an API call that was illegal.
void SetDetectorLineSumming(const double summing)
Set line summing mode.
int ParentLines() const
Returns the number of lines in the parent alphacube.
virtual int CkFrameId() const
CK frame ID - - Instrument Code from spacit run on CK.
virtual int SpkReferenceId() const
SPK Reference ID - J2000.
Generic class for Push Frame Cameras.
bool IsBandIndependent()
The camera model is band dependent, so this method returns false.
int size() const
Returns the number of values stored in this keyword.
Convert between distorted focal plane and detector coordinates.
double p_exposureDur
Exposure Duration value from labels.
QString m_instrumentNameShort
Shortened instrument name.
Contains multiple PvlContainers.
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
#define _FILEINFO_
Macro for the filename and line number.
A type of error that could only have occurred due to a mistake on the user's part (e...
A single keyword-value pair.
iTime getClockTime(QString clockValue, int sclkCode=-1, bool clockTicks=false)
This converts the spacecraft clock ticks value (clockValue) to an iTime.
Convert between parent image coordinates and detector coordinates.
Container for cube-like labels.
virtual int CkReferenceId() const
CK Reference ID - MRO_MME_OF_DATE.
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
void LoadCache()
This loads the spice cache big enough for this image.
QString m_spacecraftNameLong
Full spacecraft name.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
Adds specific functionality to C++ strings.
Namespace for ISIS/Bullet specific routines.
Convert between undistorted focal plane and ra/dec coordinates.
QString m_spacecraftNameShort
Shortened spacecraft name.
void SetGeometricTilingHint(int startSize=128, int endSize=8)
This method sets the best geometric tiling size for projecting from this camera model.
~MarciCamera()
Destroys the Themis Vis Camera object.
int p_nframelets
Number of framelets in whole image.
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
virtual void SetBand(const int band)
Virtual method that sets the band number.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
IO Handler for Isis Cubes.