87 if (lab.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
113 p_groundRangeComputed =
false;
114 p_raDecRangeComputed =
false;
115 p_ringRangeComputed =
false;
181 bool success =
false;
255 bool success =
false;
310 if (shape->
name() !=
"Plane") {
369 if (tproj->
SetWorld(sample, line)) {
417 if (shape->
name() !=
"Plane") {
446 if (!surfacePt.Valid()) {
556 const double radius) {
652 double a = sB[0] - pB[0];
653 double b = sB[1] - pB[1];
654 double c = sB[2] - pB[2];
655 double rho = sqrt(a * a + b * b + c * c) * 1000.0;
662 return nadirResolution/sqrt(cos(thetaRad));
685 double a = sB[0] - pB[0];
686 double b = sB[1] - pB[1];
687 double c = sB[2] - pB[2];
688 double dist = sqrt(a * a + b * b + c * c) * 1000.0;
749 return (lineRes + sampRes) / 2.0;
764 return (lineRes + sampRes) / 2.0;
817 if (
target()->shape()->name() ==
"Plane") {
818 IString msg =
"Images with plane targets should use Camera method RingRangeResolution ";
819 msg +=
"instead of GroundRangeResolution";
824 if (p_groundRangeComputed)
return;
825 p_groundRangeComputed =
true;
828 double originalSample =
Sample();
829 double originalLine =
Line();
830 int originalBand =
Band();
847 for (
int band = 1; band <= eband; band++) {
851 for (
int line = 1; line <=
p_lines + 1; line++) {
855 for (samp = 1; samp <=
p_samples + 1; samp++) {
857 if (
SetImage((
double)samp - 0.5, (
double)line - 0.5)) {
865 if (lon > 180.0) lon -= 360.0;
876 if (obliqueres > 0.0) {
881 if ((line != 1) && (line !=
p_lines + 1))
break;
886 if (line == 1)
continue;
887 if (line ==
p_lines + 1)
continue;
891 for (samp =
p_samples + 1; samp >= 1; samp--) {
892 if (
SetImage((
double)samp - 0.5, (
double)line - 0.5)) {
900 if (lon > 180.0) lon -= 360.0;
912 if (obliqueres > 0.0) {
948 if (obliqueres > 0.0) {
1030 SetImage(originalSample, originalLine);
1037 string message =
"Camera missed planet or SPICE data off.";
1060 if (p_ringRangeComputed)
return;
1062 p_ringRangeComputed =
true;
1065 double originalSample =
Sample();
1066 double originalLine =
Line();
1067 int originalBand =
Band();
1084 for (
int band = 1; band <= eband; band++) {
1088 for (
int line = 1; line <=
p_lines + 1; line++) {
1093 for (samp = 1; samp <=
p_samples + 1; samp++) {
1095 if (
SetImage((
double)samp - 0.5, (
double)line - 0.5)) {
1103 if (azimuth > 180.0) azimuth -= 360.0;
1112 if ((line != 1) && (line !=
p_lines + 1))
break;
1116 if (line == 1)
continue;
1117 if (line ==
p_lines + 1)
continue;
1121 for(samp =
p_samples + 1; samp >= 1; samp--) {
1122 if (
SetImage((
double)samp - 0.5, (
double)line - 0.5)) {
1130 if (azimuth > 180.0) azimuth -= 360.0;
1216 SetImage(originalSample, originalLine);
1225 string message =
"RingPlane ShapeModel - Camera missed plane or SPICE data off.";
1240 double minlat, minlon, maxlat, maxlon;
1241 return GroundRange(minlat, maxlat, minlon, maxlon, pvl);
1257 double &minlon,
double &maxlon,
1281 QString latType = (QString) map[
"LatitudeType"];
1282 if (latType.toUpper() ==
"PLANETOGRAPHIC") {
1283 if (abs(minlat) < 90.0) {
1284 minlat *=
PI / 180.0;
1285 minlat = atan(tan(minlat) * (a / b) * (a / b));
1286 minlat *= 180.0 /
PI;
1289 if(abs(maxlat) < 90.0) {
1290 maxlat *=
PI / 180.0;
1291 maxlat = atan(tan(maxlat) * (a / b) * (a / b));
1292 maxlat *= 180.0 /
PI;
1300 bool domain360 =
true;
1302 QString lonDomain = (QString) map[
"LongitudeDomain"];
1303 if(lonDomain.toUpper() ==
"180") {
1312 QString lonDirection = (QString) map[
"LongitudeDirection"];
1313 if(lonDirection.toUpper() ==
"POSITIVEWEST") {
1314 double swap = minlon;
1322 while(minlon < 0.0) {
1326 while(minlon > 360.0) {
1332 while(minlon < -180.0) {
1336 while(minlon > 180.0) {
1343 if((maxlon - minlon) > 359.0)
return true;
1361 double &minRingLongitude,
double &maxRingLongitude,
Pvl &pvl) {
1375 bool domain360 =
true;
1377 QString ringLongitudeDomain = (QString) map[
"RingLongitudeDomain"];
1378 if (ringLongitudeDomain ==
"180") {
1386 if (map.
hasKeyword(
"RingLongitudeDirection")) {
1387 QString ringLongitudeDirection = (QString) map[
"RingLongitudeDirection"];
1388 if (ringLongitudeDirection.toUpper() ==
"Clockwise") {
1389 double swap = minRingLongitude;
1390 minRingLongitude = -maxRingLongitude;
1391 maxRingLongitude = -swap;
1397 while (minRingLongitude < 0.0) {
1398 minRingLongitude += 360.0;
1399 maxRingLongitude += 360.0;
1401 while (minRingLongitude > 360.0) {
1402 minRingLongitude -= 360.0;
1403 maxRingLongitude -= 360.0;
1407 while (minRingLongitude < -180.0) {
1408 minRingLongitude += 360.0;
1409 maxRingLongitude += 360.0;
1411 while (minRingLongitude > 180.0) {
1412 minRingLongitude -= 360.0;
1413 maxRingLongitude -= 360.0;
1418 if ((maxRingLongitude - minRingLongitude) > 359.0) {
1438 map +=
PvlKeyword(
"LatitudeType",
"Planetocentric");
1439 map +=
PvlKeyword(
"LongitudeDirection",
"PositiveEast");
1449 map +=
PvlKeyword(
"ProjectionName",
"Sinusoidal");
1460 if (
target()->shape()->name() !=
"Plane") {
1462 IString msg =
"A ring plane projection has been requested on an image whose shape is not a ring plane. ";
1463 msg +=
"Rerun spiceinit with shape=RINGPLANE. ";
1470 map +=
PvlKeyword(
"RingLongitudeDirection",
"CounterClockwise");
1471 map +=
PvlKeyword(
"RingLongitudeDomain",
"360");
1480 map +=
PvlKeyword(
"ProjectionName",
"Planar");
1487 QString key =
"INS" +
toString(code) +
"_FOCAL_LENGTH";
1494 QString key =
"INS" +
toString(code) +
"_PIXEL_PITCH";
1537 else if (
target()->shape()->hasIntersection()) {
1567 normal[0] = normal[1] = normal[2] = 0.0;
1576 if (!shapeModel->
isDEM()) {
1583 double origin[3] = {0, 0, 0};
1584 unusedNeighborPoints.fill(origin);
1585 shapeModel->calculateLocalNormal(unusedNeighborPoints);
1593 double line =
Line();
1597 surroundingPoints.append(qMakePair(samp, line - 0.5));
1598 surroundingPoints.append(qMakePair(samp, line + 0.5 - DBL_MIN));
1599 surroundingPoints.append(qMakePair(samp - 0.5, line));
1600 surroundingPoints.append(qMakePair(samp + 0.5 - DBL_MIN, line));
1603 double originalSample = samp;
1604 double originalLine = line;
1607 for (
int i = 0; i < cornerNeighborPoints.size(); i++) {
1608 cornerNeighborPoints[i] =
new double[3];
1616 for (
int i = 0; i < cornerNeighborPoints.size(); i++) {
1618 if (!(
SetImage(surroundingPoints[i].first, surroundingPoints[i].second))) {
1619 surroundingPoints[i].first = samp;
1620 surroundingPoints[i].second = line;
1623 if (!(
SetImage(surroundingPoints[i].first, surroundingPoints[i].second))) {
1625 normal[0] = normal[1] = normal[2] = 0.0;
1629 SetImage(originalSample, originalLine);
1636 for (
int i = 0; i < cornerNeighborPoints.size(); i++) {
1637 delete [] cornerNeighborPoints[i];
1654 if ((surroundingPoints[0].first == surroundingPoints[1].first &&
1655 surroundingPoints[0].second == surroundingPoints[1].second) ||
1656 (surroundingPoints[2].first == surroundingPoints[3].first &&
1657 surroundingPoints[2].second == surroundingPoints[3].second)) {
1659 normal[0] = normal[1] = normal[2] = 0.0;
1663 SetImage(originalSample, originalLine);
1670 for (
int i = 0; i < cornerNeighborPoints.size(); i++)
1671 delete [] cornerNeighborPoints[i];
1677 SetImage(originalSample, originalLine);
1678 shapeModel->calculateLocalNormal(cornerNeighborPoints);
1681 for (
int i = 0; i < cornerNeighborPoints.size(); i++) {
1682 delete [] cornerNeighborPoints[i];
1699 std::vector<double> localNormal(3);
1700 localNormal = shapeModel->
normal();
1701 memcpy(normal, (
double *) &localNormal[0],
sizeof(
double) * 3);
1718 Angle & emission,
bool &success) {
1727 unorm_c(normal,normal,&mag);
1734 SpiceDouble surfSpaceVect[3], unitizedSurfSpaceVect[3], dist;
1744 vsub_c((SpiceDouble *) &sB[0], pB, surfSpaceVect);
1745 unorm_c(surfSpaceVect, unitizedSurfSpaceVect, &dist);
1748 SpiceDouble surfaceSunVect[3];
1749 vsub_c(
m_uB, pB, surfaceSunVect);
1750 SpiceDouble unitizedSurfSunVect[3];
1751 unorm_c(surfaceSunVect, unitizedSurfSunVect, &dist);
1755 phase =
Angle(vsep_c(unitizedSurfSpaceVect, unitizedSurfSunVect),
1760 emission =
Angle(vsep_c(unitizedSurfSpaceVect, normal),
1765 incidence =
Angle(vsep_c(unitizedSurfSunVect, normal),
1783 double &mindec,
double &maxdec) {
1787 double originalSample =
Sample();
1788 double originalLine =
Line();
1789 int originalBand =
Band();
1792 if (!p_raDecRangeComputed) {
1793 p_raDecRangeComputed =
true;
1806 for (
int band = 1; band <= eband; band++) {
1809 for (
int line = 1; line <=
p_lines; line++) {
1812 for (samp = 1; samp <=
p_samples; samp++) {
1813 SetImage((
double)samp, (
double)line);
1821 if (ra > 180.0) ra -= 360.0;
1825 if ((line != 1) && (line !=
p_lines))
break;
1830 for (samp =
p_samples; samp >= 1; samp--) {
1831 SetImage((
double)samp, (
double)line);
1839 if (ra > 180.0) ra -= 360.0;
1909 SetImage(originalSample, originalLine);
1927 double originalSample =
Sample();
1928 double originalLine =
Line();
1929 int originalBand =
Band();
1939 double dist = (ra1 - ra2) * (ra1 - ra2) + (dec1 - dec2) * (dec1 - dec2);
1941 double lineRes = dist / (p_lines - 1);
1947 dist = (ra1 - ra2) * (ra1 - ra2) + (dec1 - dec2) * (dec1 - dec2);
1949 double sampRes = dist / (p_samples - 1);
1954 SetImage(originalSample, originalLine);
1960 return (sampRes < lineRes) ? sampRes : lineRes;
1969 if (
target()->shape()->name() ==
"Plane") {
1970 QString msg =
"North Azimuth is not available for plane target shapes.";
1983 if (azimuth > 360.0) azimuth = azimuth - 360.0;
2127 SpiceDouble azimuthOrigin[3];
2130 if (!originRadius.
isValid()) {
2137 SpiceDouble pointOfInterestFromBodyCenter[3];
2139 lat *
PI / 180.0, pointOfInterestFromBodyCenter);
2147 SpiceDouble pointOfInterest[3];
2148 vsub_c(pointOfInterestFromBodyCenter, azimuthOrigin, pointOfInterest);
2154 SpiceDouble pointOfInterestProj[3];
2155 vperp_c(pointOfInterest, azimuthOrigin, pointOfInterestProj);
2158 SpiceDouble pointOfInterestProjUnit[3];
2159 vhat_c(pointOfInterestProj, pointOfInterestProjUnit);
2165 SpiceDouble pointOfInterestProjUnitScaled[3];
2166 vscl_c(scale, pointOfInterestProjUnit, pointOfInterestProjUnitScaled);
2171 SpiceDouble adjustedPointOfInterestFromBodyCenter[3];
2172 vadd_c(azimuthOrigin, pointOfInterestProjUnitScaled, adjustedPointOfInterestFromBodyCenter);
2175 double azimuthOriginSample =
Sample();
2176 double azimuthOriginLine =
Line();
2179 double adjustedPointOfInterestRad, adjustedPointOfInterestLon, adjustedPointOfInterestLat;
2180 reclat_c(adjustedPointOfInterestFromBodyCenter,
2181 &adjustedPointOfInterestRad,
2182 &adjustedPointOfInterestLon,
2183 &adjustedPointOfInterestLat);
2184 adjustedPointOfInterestLat = adjustedPointOfInterestLat * 180.0 /
PI;
2185 adjustedPointOfInterestLon = adjustedPointOfInterestLon * 180.0 /
PI;
2186 if (adjustedPointOfInterestLon < 0) adjustedPointOfInterestLon += 360.0;
2192 adjustedPointOfInterestLon,
2197 SetImage(azimuthOriginSample, azimuthOriginLine);
2201 double adjustedPointOfInterestSample =
Sample();
2202 double adjustedPointOfInterestLine =
Line();
2230 double deltaSample = adjustedPointOfInterestSample - azimuthOriginSample;
2231 double deltaLine = adjustedPointOfInterestLine - azimuthOriginLine;
2240 double azimuth = 0.0;
2241 if (deltaSample != 0.0 || deltaLine != 0.0) {
2242 azimuth = atan2(deltaLine, deltaSample);
2243 azimuth *= 180.0 /
PI;
2247 if (azimuth < 0.0) azimuth += 360.0;
2248 if (azimuth > 360.0) azimuth -= 360.0;
2256 SetImage(azimuthOriginSample, azimuthOriginLine);
2275 double coord[3], spCoord[3];
2280 double a = vsep_c(coord, spCoord) * 180.0 /
PI;
2284 double c = 180.0 - (a + b);
2314 double slat,
double slon) {
2318 a = (90.0 - slat) *
PI / 180.0;
2319 b = (90.0 - glat) *
PI / 180.0;
2322 a = (90.0 + slat) *
PI / 180.0;
2323 b = (90.0 + glat) *
PI / 180.0;
2326 double cslon = slon;
2327 double cglon = glon;
2328 if (cslon > cglon) {
2329 if ((cslon-cglon) > 180.0) {
2330 while ((cslon-cglon) > 180.0) cslon = cslon - 360.0;
2333 if (cglon > cslon) {
2334 if ((cglon-cslon) > 180.0) {
2335 while ((cglon-cslon) > 180.0) cglon = cglon - 360.0;
2342 if (cslon > cglon) {
2345 else if (cslon < cglon) {
2352 else if (slat < glat) {
2353 if (cslon > cglon) {
2356 else if (cslon < cglon) {
2364 if (cslon > cglon) {
2367 else if (cslon < cglon) {
2375 double C = (cglon - cslon) *
PI / 180.0;
2377 double c = acos(cos(a)*cos(b) + sin(a)*sin(b)*cos(C));
2378 double azimuth = 0.0;
2379 if (sin(b) == 0.0 || sin(c) == 0.0) {
2382 double A = acos((cos(a) - cos(b)*cos(c))/(sin(b)*sin(c))) * 180.0 /
PI;
2385 if (quad == 1 || quad == 4) {
2388 else if (quad == 2 || quad == 3) {
2389 azimuth = 360.0 - A;
2393 if (quad == 1 || quad == 4) {
2394 azimuth = 180.0 - A;
2396 else if (quad == 2 || quad == 3) {
2397 azimuth = 180.0 + A;
2496 int cacheSize =
CacheSize(ephemerisTimes.first, ephemerisTimes.second);
2504 double altitudeMeters;
2506 altitudeMeters = 1.0;
2519 setTime(ephemerisTimes.first);
2547 pair<double,double> ephemerisTimes;
2548 double startTime = -DBL_MAX;
2549 double endTime = -DBL_MAX;
2551 for (
int band = 1; band <=
Bands(); band++) {
2554 double etStart =
time().
Et();
2557 double etEnd =
time().
Et();
2559 startTime = min(etStart, etEnd);
2560 endTime = max(etStart, etEnd);
2562 startTime = min(startTime, min(etStart, etEnd));
2563 endTime = max(endTime, max(etStart, etEnd));
2565 if (startTime == -DBL_MAX || endTime == -DBL_MAX) {
2566 string msg =
"Unable to find time range for the spice kernels";
2569 ephemerisTimes.first = startTime;
2570 ephemerisTimes.second = endTime;
2571 return ephemerisTimes;
2593 if (startTime == endTime) {
2621 if (startSize == 2 && endSize == 2) {
2627 if (endSize > startSize) {
2628 IString message =
"Camera::SetGeometricTilingHint End size must be smaller than the start size";
2632 if (startSize < 4) {
2633 IString message =
"Camera::SetGeometricTilingHint Start size must be at least 4";
2637 bool foundEnd =
false;
2638 while (powerOf2 > 0 && startSize != powerOf2) {
2639 if (powerOf2 == endSize) foundEnd =
true;
2646 IString message =
"Camera::SetGeometricTilingHint Start size must be a power of 2";
2651 IString message =
"Camera::SetGeometricTilingHint End size must be a power of 2 less than the start size, but greater than 2";
3088 double orgLine =
Line();
3089 double orgSample =
Sample();
3094 double y =
Line() - orgLine;
3095 double x =
Sample() - orgSample;
3096 double celestialNorthClockAngle = atan2(-y, x) * 180.0 /
Isis::PI;
3097 celestialNorthClockAngle = 90.0 - celestialNorthClockAngle;
3099 if (celestialNorthClockAngle < 0.0) {
3100 celestialNorthClockAngle += 360.0;
3104 return celestialNorthClockAngle;
This class defines a body-fixed surface point.
void LocalPhotometricAngles(Angle &phase, Angle &incidence, Angle &emission, bool &success)
Calculates LOCAL photometric angles using the DEM (not ellipsoid).
double WorldX() const
This returns the world X coordinate provided SetGround, SetCoordinate, SetUniversalGround, or SetWorld returned with success.
double FocalPlaneX() const
Return undistorted focal plane x.
virtual bool SetFocalPlane(const double ux, const double uy, const double uz)
Compute ground position from focal plane coordinate.
double p_maxlat
The maximum latitude.
std::vector< double > normal()
Returns the local surface normal at the current intersection point.
double FocalPlaneY() const
Return undistorted focal plane y.
void SetFocalLength()
Reads the focal length from the instrument kernel.
double RightAscension()
Returns the right ascension angle (sky longitude).
CameraDetectorMap * DetectorMap()
Returns a pointer to the CameraDetectorMap object.
virtual double SampleScaleFactor() const
Return scaling factor for computing sample resolution.
int CacheSize(double startTime, double endTime)
This method calculates the spice cache size.
void SetSkyMap(CameraSkyMap *map)
Sets the Sky Map.
double ParentSample() const
Return parent sample.
double ObliqueLineResolution()
Returns the oblique line resolution at the current position in meters.
const double Null
Value for an Isis Null pixel.
static Isis::Projection * CreateFromCube(Isis::Cube &cube)
This method is a helper method.
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
double p_mindec
The minimum declination.
int BetaLines() const
Returns the number of lines in the beta cube.
double p_minlon
The minimum longitude.
double p_minobliqueres
The minimum oblique resolution.
QString spacecraftNameShort() const
This method returns the shortened spacecraft name.
bool IsSky() const
Returns true if projection is sky and false if it is land.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
int p_referenceBand
The reference band.
double p_minra180
The minimum right ascension in the 180 domain.
double SunAzimuth()
Returns the Sun Azimuth.
std::vector< Distance > radii() const
Returns the radii of the body in km.
bool ringRange(double &minRingRadius, double &maxRingRadius, double &minRingLongitude, double &maxRingLongitude, Pvl &pvl)
Analogous to the above Ground Range method.
double degrees() const
Get the angle in units of Degrees.
QString name() const
Gets the shape name.
void SetDetectorMap(CameraDetectorMap *map)
Sets the Detector Map.
CameraDistortionMap * DistortionMap()
Returns a pointer to the CameraDistortionMap object.
double radians() const
Convert an angle to a double.
virtual int SpkTargetId() const
Provides target code for instruments SPK NAIF kernel.
int AlphaLines() const
Returns the number of lines in the alpha cube.
virtual bool SetFocalPlane(const double dx, const double dy)
Compute detector position (sample,line) from focal plane coordinates.
int p_lines
The number of lines in the image.
virtual double LineScaleFactor() const
Return scaling factor for computing line resolution.
void SetGroundMap(CameraGroundMap *map)
Sets the Ground Map.
Base class for Map TProjections.
QString m_instrumentNameLong
Full instrument name.
double p_maxRingLongitude
The maximum ring longitude (azimuth)
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
QString spacecraftNameLong() const
This method returns the full spacecraft name.
double SpacecraftAzimuth()
Return the Spacecraft Azimuth.
bool SetRightAscensionDeclination(const double ra, const double dec)
Sets the right ascension declination.
bool HasProjection()
Checks to see if the camera object has a projection.
bool hasIntersection()
Returns intersection status.
double p_maxra180
The maximum right ascension in the 180 domain.
void basicRingMapping(Pvl &map)
Writes the basic mapping group for ring plane to the specified Pvl.
double OffNadirAngle()
Return the off nadir angle in degrees.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
void radii(Distance r[3]) const
Returns the radii of the body in km.
double FocalPlaneX() const
Return undistorted focal plane x.
virtual double resolution()
Returns the resolution of the camera.
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
bool InCube()
This returns true if the current Sample() or Line() value is outside of the cube (meaning the point m...
const double PI(3.14159265358979323846)
The mathematical constant PI.
double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
int ReferenceBand() const
Returns the reference band.
const double DEG2RAD(0.017453292519943295769237)
Multiplier for converting from degrees to radians.
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
double DetectorLine() const
Return detector line.
virtual double exposureDuration(const double sample, const double line, const int band) const
This virtual method is for returning the exposure duration of a given pixel.
double UndistortedFocalPlaneY() const
Return undistorted focal plane y.
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target indicated in the labels.
This class is designed to encapsulate the concept of a Latitude.
double UniversalLongitude()
This returns a universal longitude (positive east in 0 to 360 domain).
Class for computing sensor ground coordinates.
double p_maxlon180
The maximum longitude in the 180 domain.
The distance is being specified in kilometers.
double p_focalLength
The focal length, in units of millimeters.
SpicePosition * instrumentPosition() const
Accessor method for the instrument position.
double ObliquePixelResolution()
Returns the oblique pixel resolution at the current position in meters/pixel.
double ParentLine() const
Return parent line.
virtual ~Camera()
Destroys the Camera Object.
double p_maxobliqueres
The maximum oblique resolution.
const double HALFPI(1.57079632679489661923)
The mathematical constant PI/2.
CameraDistortionMap * p_distortionMap
A pointer to the DistortionMap.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
void createCache(iTime startTime, iTime endTime, const int size, double tol)
This method creates an internal cache of spacecraft and sun positions over a specified time range...
double ObliqueSampleResolution()
Returns the oblique sample resolution at the current position in m.
double toDouble(const QString &string)
Global function to convert from a string to a double.
This error is for when a programmer made an API call that was illegal.
double FocalLength() const
Returns the focal length.
double p_minRingLongitude180
The minimum ring longitude in the 180 domain.
bool IntersectsLongitudeDomain(Pvl &pvl)
Checks whether the ground range intersects the longitude domain or not.
Distance measurement, usually in meters.
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
bool RawFocalPlanetoImage()
Computes the image coordinate for the current universal ground point.
double p_maxres
The maximum resolution.
static double GroundAzimuth(double glat, double glon, double slat, double slon)
Computes and returns the ground azimuth between the ground point and another point of interest...
Longitude GetLongitude() const
Return the body-fixed longitude for the surface point.
virtual bool SetDetector(const double sample, const double line)
Compute distorted focal plane coordinate from detector position (sampel,line)
bool SetGround(Latitude latitude, Longitude longitude)
Sets the lat/lon values to get the sample/line values.
int Bands() const
Returns the number of bands in the image.
double BetaLine(double alphaLine)
Returns a beta line given an alpha line.
SpiceInt naifSpkCode() const
This returns the NAIF SPK code to use when reading from SPK kernels.
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group...
CameraSkyMap * SkyMap()
Returns a pointer to the CameraSkyMap object.
double DetectorLine() const
Return detector line.
bool HasReferenceBand() const
Checks to see if the Camera object has a reference band.
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
double p_minRingLongitude
The minimum ring longitude (azimuth)
virtual double exposureDuration() const
Return the exposure duration for the pixel that the camera is set to.
int p_bands
The number of bands in the image.
bool SetUniversalGround(const double latitude, const double longitude)
Sets the lat/lon values to get the sample/line values.
int BetaSamples() const
Returns the number of samples in the beta cube.
double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
void setHasIntersection(bool b)
Sets the flag to indicate whether this ShapeModel has an intersection.
bool SetImage(const double sample, const double line)
Sets the sample/line values of the image to get the lat/lon values.
Convert between parent image coordinates and detector coordinates.
double DetectorSample() const
Return detector sample.
This class is designed to encapsulate the concept of a Longitude.
Target * target() const
Returns a pointer to the target object.
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...
bool p_ignoreProjection
Whether or no to ignore the Projection.
virtual bool SetGround(const Latitude &lat, const Longitude &lon)
Compute undistorted focal plane coordinate from ground position.
CameraDetectorMap * p_detectorMap
A pointer to the DetectorMap.
QString instrumentNameLong() const
This method returns the full instrument name.
Convert between undistorted focal plane and ground coordinates.
double meters() const
Get the distance in meters.
double p_minlat
The minimum latitude.
Degrees are generally considered more human readable, 0-360 is one circle, however most math does not...
Convert between distorted focal plane and detector coordinates.
std::vector< double > ReferenceVector(const std::vector< double > &jVec)
Given a direction vector in J2000, return a reference frame direction.
SpiceRotation * bodyRotation() const
Accessor method for the body rotation.
QString m_instrumentNameShort
Shortened instrument name.
CameraGroundMap * GroundMap()
Returns a pointer to the CameraGroundMap object.
Latitude GetLatitude() const
Return the body-fixed latitude for the surface point.
int Samples() const
Returns the number of samples in the image.
virtual bool SetUndistortedFocalPlane(double ux, double uy)
Compute distorted focal plane x/y.
virtual bool SetSky(const double ra, const double dec)
Compute undistorted focal plane coordinate from ra/dec.
double EmissionAngle() const
Returns the emission angle in degrees.
Contains multiple PvlContainers.
double kilometers() const
Get the displacement in kilometers.
void ringRangeResolution()
Analogous to above GroundRangeResolution method.
void subSolarPoint(double &lat, double &lon)
Returns the sub-solar latitude/longitude in universal coordinates (0-360 positive east...
double HighestImageResolution()
Returns the highest/best resolution in the entire image.
double p_pixelPitch
The pixel pitch, in millimeters per pixel.
bool GroundRange(double &minlat, double &maxlat, double &minlon, double &maxlon, Pvl &pvl)
Computes the Ground Range.
#define _FILEINFO_
Macro for the filename and line number.
bool RaDecRange(double &minra, double &maxra, double &mindec, double &maxdec)
Computes the RaDec range.
virtual bool SetFocalPlane(double dx, double dy)
Compute undistorted focal plane x/y.
bool isValid() const
Test if this distance has been initialized or not.
double Sample()
Returns the current sample number.
bool hasNormal() const
Returns surface point normal status.
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
A type of error that could only have occurred due to a mistake on the user's part (e...
A single keyword-value pair.
CameraFocalPlaneMap * p_focalPlaneMap
A pointer to the FocalPlaneMap.
A type of error that cannot be classified as any of the other error types.
int bandCount() const
Returns the number of virtual bands for the cube.
double UniversalRingRadius()
This returns a universal radius, which is just the radius in meters.
void SetFocalPlaneMap(CameraFocalPlaneMap *map)
Sets the Focal Plane Map.
int p_childBand
Band value for child.
void GetLocalNormal(double normal[3])
This method will find the local normal at the current (sample, line) and set it to the passed in arra...
double HighestObliqueImageResolution()
Returns the highest/best oblique resolution in the entire image.
Distort/undistort focal plane coordinates.
double NorthAzimuth()
Returns the North Azimuth.
std::pair< double, double > StartEndEphemerisTimes()
Calculates the start and end ephemeris times.
double p_childSample
Sample value for child.
AlphaCube * p_alphaCube
!< Flag showing if ring range was computed successfully.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
bool HasSurfaceIntersection() const
Returns if the last call to either SetLookDirection or SetUniversalGround had a valid intersection wi...
virtual bool isDEM() const =0
Indicates whether this shape model is from a DEM.
void BasicMapping(Pvl &map)
Writes the basic mapping group to the specified Pvl.
Container for cube-like labels.
void clearSurfacePoint()
Clears or resets the current surface point.
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
bool isValid() const
This indicates whether we have a legitimate angle stored or are in an unset, or invalid, state.
QString instrumentNameShort() const
This method returns the shortened instrument name.
double UniversalLatitude()
This returns a universal latitude (planetocentric).
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
int Band()
Returns the current band.
double UndistortedFocalPlaneZ() const
Return undistorted focal plane z.
void LoadCache()
This loads the spice cache big enough for this image.
Define shapes and provide utilities for Isis3 targets.
double FocalPlaneY() const
Return undistorted focal plane y.
double ComputeAzimuth(const double lat, const double lon)
Computes the image azimuth value from your current position (origin) to a point of interest specified...
double CelestialNorthClockAngle()
Computes the celestial north clock angle at the current line/sample or ra/dec.
void Coordinate(double p[3]) const
Returns the x,y,z of the surface intersection in BodyFixed km.
bool SetWorld(const double x, const double y)
This method is used to set a world coordinate.
Defines an angle and provides unit conversions.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
double p_maxra
The maxumum right ascension.
Distance LocalRadius() const
Returns the local radius at the intersection point.
double LowestObliqueImageResolution()
Returns the lowest/worst oblique resolution in the entire image.
double BetaSample(double alphaSample)
Returns a beta sample given an alpha sample.
QString m_spacecraftNameLong
Full spacecraft name.
int p_samples
The number of samples in the image.
double Longitude() const
This returns a longitude with correct longitude direction and domain as specified in the label object...
double FocalPlaneY() const
Return distorted focal plane y.
virtual bool IsBandIndependent()
Virtual method that checks if the band is independent.
bool SetImageMapProjection(const double sample, const double line, ShapeModel *shape)
Sets the sample/line values of the image to get the lat/lon values for a Map Projected image...
Base class for Map Projections of plane shapes.
double p_maxlon
The maximum longitude.
double DetectorSample() const
Return detector sample.
double LowestImageResolution()
Returns the lowest/worst resolution in the entire image.
CameraGroundMap * p_groundMap
A pointer to the GroundMap.
double PixelPitch() const
Returns the pixel pitch.
double p_maxRingLongitude180
The maximum ring longitude in the 180 domain.
double Line()
Returns the current line number.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
double FocalPlaneY() const
Return distorted focal plane y.
double RaDecResolution()
Returns the RaDec resolution.
virtual bool SetUniversalGround(const double coord1, const double coord2)
This method is used to set the lat/lon or radius/azimuth (i.e.
double PixelResolution()
Returns the pixel resolution at the current position in meters/pixel.
double p_minres
The minimum resolution.
double p_minlon180
The minimum longitude in the 180 domain.
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
Adds specific functionality to C++ strings.
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
double p_minra
The minimum right ascension.
double LineResolution()
Returns the line resolution at the current position in meters.
void SetDistortionMap(CameraDistortionMap *map)
Sets the Distortion Map.
Convert between undistorted focal plane and ra/dec coordinates.
QString m_spacecraftNameShort
Shortened spacecraft name.
The distance is being specified in meters.
void IgnoreProjection(bool ignore)
Set whether or not the camera should ignore the Projection.
double p_maxRingRadius
The maximum ring radius.
double kilometers() const
Get the distance in kilometers.
virtual QList< QPointF > PixelIfovOffsets()
Returns the pixel ifov offsets from center of pixel, which defaults to the (pixel pitch * summing mod...
double FocalPlaneX() const
Return distorted focal plane x.
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
virtual int SpkCenterId() const
Provides the center of motion body for SPK NAIF kernel.
int ParentLines() const
Returns the number of lines in the parent alphacube.
Projection * p_projection
A pointer to the Projection.
ShapeModel * shape() const
Return the shape.
void SetGeometricTilingHint(int startSize=128, int endSize=8)
This method sets the best geometric tiling size for projecting from this camera model.
double p_minRingRadius
!< Flag showing if the raDec range has been computed successfully.
double p_maxdec
The maximum declination.
bool SetImageSkyMapProjection(const double sample, const double line, ShapeModel *shape)
Sets the sample/line values of the image to get the lat/lon values for a Skymap Projected image...
ProjectionType projectionType() const
Returns an enum value for the projection type.
SpiceDouble m_uB[3]
This contains the sun position (u) in the bodyfixed reference frame (B).
double FocalPlaneX() const
Return distorted focal plane x.
int ParentSamples() const
Returns the number of samples in the parent alphacube.
int p_geometricTilingStartSize
The ideal geometric tile size to start with when projecting.
CameraSkyMap * p_skyMap
A pointer to the SkyMap.
double UndistortedFocalPlaneX() const
Return undistorted focal plane x.
double SampleResolution()
Returns the sample resolution at the current position in meters.
virtual void SetBand(const int band)
Virtual method that sets the band number.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
int AlphaSamples() const
Returns the number of samples in the alpha cube.
double UniversalRingLongitude()
This returns a universal ring longitude (clockwise in 0 to 360 domain).
bool p_pointComputed
!< Flag showing if ground range was computed successfully.
int Lines() const
Returns the number of lines in the image.
double p_childLine
Line value for child.
void GetGeometricTilingHint(int &startSize, int &endSize)
This will get the geometric tiling hint; these values are typically used for ProcessRubberSheet::SetT...
double DetectorResolution()
Returns the detector resolution at the current position in meters.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
void GroundRangeResolution()
Computes the ground range and min/max resolution.
int p_geometricTilingEndSize
The ideal geometric tile size to end with when projecting.
double ObliqueDetectorResolution()
This function provides an improved estimate of the detector resolution (in meters) when the target is...
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
double WorldY() const
This returns the world Y coordinate provided SetGround, SetCoordinate, SetUniversalGround, or SetWorld returned with success.
double Declination()
Returns the declination angle (sky latitude).
These projections are used to map triaxial and irregular-shaped bodies.
IO Handler for Isis Cubes.
void subSpacecraftPoint(double &lat, double &lon)
Returns the sub-spacecraft latitude/longitude in universal coordinates (0-360 positive east...