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