73 PvlObject::FindOptions::Traverse).findKeyword(
"InstrumentId")[0];
91 if (lab.
findObject(
"IsisCube").hasGroup(
"Mapping")) {
185 bool success =
false;
259 bool success =
false;
314 if (shape->
name() !=
"Plane") {
373 if (tproj->
SetWorld(sample, line)) {
421 if (shape->
name() !=
"Plane") {
449 if (!surfacePt.Valid()) {
559 const double radius) {
630 double a = sB[0] - pB[0];
631 double b = sB[1] - pB[1];
632 double c = sB[2] - pB[2];
633 double dist = sqrt(a * a + b * b + c * c) * 1000.0;
694 return (lineRes + sampRes) / 2.0;
709 return (lineRes + sampRes) / 2.0;
762 if (
target()->shape()->name() ==
"Plane") {
763 IString msg =
"Images with plane targets should use Camera method RingRangeResolution ";
764 msg +=
"instead of GroundRangeResolution";
773 double originalSample =
Sample();
774 double originalLine =
Line();
775 int originalBand =
Band();
792 for (
int band = 1; band <= eband; band++) {
796 for (
int line = 1; line <=
p_lines + 1; line++) {
800 for (samp = 1; samp <=
p_samples + 1; samp++) {
802 if (
SetImage((
double)samp - 0.5, (
double)line - 0.5)) {
810 if (lon > 180.0) lon -= 360.0;
821 if (obliqueres > 0.0) {
826 if ((line != 1) && (line !=
p_lines + 1))
break;
831 if (line == 1)
continue;
832 if (line ==
p_lines + 1)
continue;
836 for (samp =
p_samples + 1; samp >= 1; samp--) {
837 if (
SetImage((
double)samp - 0.5, (
double)line - 0.5)) {
845 if (lon > 180.0) lon -= 360.0;
857 if (obliqueres > 0.0) {
893 if (obliqueres > 0.0) {
975 SetImage(originalSample, originalLine);
982 string message =
"Camera missed planet or SPICE data off.";
1010 double originalSample =
Sample();
1011 double originalLine =
Line();
1012 int originalBand =
Band();
1029 for (
int band = 1; band <= eband; band++) {
1033 for (
int line = 1; line <=
p_lines + 1; line++) {
1038 for (samp = 1; samp <=
p_samples + 1; samp++) {
1040 if (
SetImage((
double)samp - 0.5, (
double)line - 0.5)) {
1048 if (azimuth > 180.0) azimuth -= 360.0;
1057 if ((line != 1) && (line !=
p_lines + 1))
break;
1061 if (line == 1)
continue;
1062 if (line ==
p_lines + 1)
continue;
1066 for(samp =
p_samples + 1; samp >= 1; samp--) {
1067 if (
SetImage((
double)samp - 0.5, (
double)line - 0.5)) {
1075 if (azimuth > 180.0) azimuth -= 360.0;
1161 SetImage(originalSample, originalLine);
1170 string message =
"RingPlane ShapeModel - Camera missed plane or SPICE data off.";
1185 double minlat, minlon, maxlat, maxlon;
1186 return GroundRange(minlat, maxlat, minlon, maxlon, pvl);
1202 double &minlon,
double &maxlon,
1226 QString latType = (QString) map[
"LatitudeType"];
1227 if (latType.toUpper() ==
"PLANETOGRAPHIC") {
1228 if (abs(minlat) < 90.0) {
1229 minlat *=
PI / 180.0;
1230 minlat = atan(tan(minlat) * (a / b) * (a / b));
1231 minlat *= 180.0 /
PI;
1234 if(abs(maxlat) < 90.0) {
1235 maxlat *=
PI / 180.0;
1236 maxlat = atan(tan(maxlat) * (a / b) * (a / b));
1237 maxlat *= 180.0 /
PI;
1245 bool domain360 =
true;
1247 QString lonDomain = (QString) map[
"LongitudeDomain"];
1248 if(lonDomain.toUpper() ==
"180") {
1257 QString lonDirection = (QString) map[
"LongitudeDirection"];
1258 if(lonDirection.toUpper() ==
"POSITIVEWEST") {
1259 double swap = minlon;
1267 while(minlon < 0.0) {
1271 while(minlon > 360.0) {
1277 while(minlon < -180.0) {
1281 while(minlon > 180.0) {
1288 if((maxlon - minlon) > 359.0)
return true;
1306 double &minRingLongitude,
double &maxRingLongitude,
Pvl &pvl) {
1320 bool domain360 =
true;
1322 QString ringLongitudeDomain = (QString) map[
"RingLongitudeDomain"];
1323 if (ringLongitudeDomain ==
"180") {
1331 if (map.
hasKeyword(
"RingLongitudeDirection")) {
1332 QString ringLongitudeDirection = (QString) map[
"RingLongitudeDirection"];
1333 if (ringLongitudeDirection.toUpper() ==
"Clockwise") {
1334 double swap = minRingLongitude;
1335 minRingLongitude = -maxRingLongitude;
1336 maxRingLongitude = -swap;
1342 while (minRingLongitude < 0.0) {
1343 minRingLongitude += 360.0;
1344 maxRingLongitude += 360.0;
1346 while (minRingLongitude > 360.0) {
1347 minRingLongitude -= 360.0;
1348 maxRingLongitude -= 360.0;
1352 while (minRingLongitude < -180.0) {
1353 minRingLongitude += 360.0;
1354 maxRingLongitude += 360.0;
1356 while (minRingLongitude > 180.0) {
1357 minRingLongitude -= 360.0;
1358 maxRingLongitude -= 360.0;
1363 if ((maxRingLongitude - minRingLongitude) > 359.0) {
1383 map +=
PvlKeyword(
"LatitudeType",
"Planetocentric");
1384 map +=
PvlKeyword(
"LongitudeDirection",
"PositiveEast");
1394 map +=
PvlKeyword(
"ProjectionName",
"Sinusoidal");
1405 if (
target()->shape()->name() !=
"Plane") {
1407 IString msg =
"A ring plane projection has been requested on an image whose shape is not a ring plane. ";
1408 msg +=
"Rerun spiceinit with shape=RINGPLANE. ";
1415 map +=
PvlKeyword(
"RingLongitudeDirection",
"CounterClockwise");
1416 map +=
PvlKeyword(
"RingLongitudeDomain",
"360");
1425 map +=
PvlKeyword(
"ProjectionName",
"Planar");
1432 QString key =
"INS" +
toString(code) +
"_FOCAL_LENGTH";
1439 QString key =
"INS" +
toString(code) +
"_PIXEL_PITCH";
1482 else if (
target()->shape()->hasIntersection()) {
1512 normal[0] = normal[1] = normal[2] = 0.0;
1521 if (!shapeModel->
isDEM()) {
1528 double origin[3] = {0, 0, 0};
1529 unusedNeighborPoints.fill(origin);
1530 shapeModel->calculateLocalNormal(unusedNeighborPoints);
1538 double line =
Line();
1542 surroundingPoints.append(qMakePair(samp, line - 0.5));
1543 surroundingPoints.append(qMakePair(samp, line + 0.5 - DBL_MIN));
1544 surroundingPoints.append(qMakePair(samp - 0.5, line));
1545 surroundingPoints.append(qMakePair(samp + 0.5 - DBL_MIN, line));
1548 double originalSample = samp;
1549 double originalLine = line;
1552 for (
int i = 0; i < cornerNeighborPoints.size(); i++) {
1553 cornerNeighborPoints[i] =
new double[3];
1561 for (
int i = 0; i < cornerNeighborPoints.size(); i++) {
1563 if (!(
SetImage(surroundingPoints[i].first, surroundingPoints[i].second))) {
1564 surroundingPoints[i].first = samp;
1565 surroundingPoints[i].second = line;
1568 if (!(
SetImage(surroundingPoints[i].first, surroundingPoints[i].second))) {
1570 normal[0] = normal[1] = normal[2] = 0.0;
1574 SetImage(originalSample, originalLine);
1581 for (
int i = 0; i < cornerNeighborPoints.size(); i++) {
1582 delete [] cornerNeighborPoints[i];
1599 if ((surroundingPoints[0].first == surroundingPoints[1].first &&
1600 surroundingPoints[0].second == surroundingPoints[1].second) ||
1601 (surroundingPoints[2].first == surroundingPoints[3].first &&
1602 surroundingPoints[2].second == surroundingPoints[3].second)) {
1604 normal[0] = normal[1] = normal[2] = 0.0;
1608 SetImage(originalSample, originalLine);
1615 for (
int i = 0; i < cornerNeighborPoints.size(); i++)
1616 delete [] cornerNeighborPoints[i];
1622 SetImage(originalSample, originalLine);
1623 shapeModel->calculateLocalNormal(cornerNeighborPoints);
1626 for (
int i = 0; i < cornerNeighborPoints.size(); i++) {
1627 delete [] cornerNeighborPoints[i];
1644 std::vector<double> localNormal(3);
1645 localNormal = shapeModel->
normal();
1646 memcpy(normal, (
double *) &localNormal[0],
sizeof(
double) * 3);
1662 Angle & emission,
bool &success) {
1671 unorm_c(normal,normal,&mag);
1678 SpiceDouble surfSpaceVect[3], unitizedSurfSpaceVect[3], dist;
1688 vsub_c((SpiceDouble *) &sB[0], pB, surfSpaceVect);
1689 unorm_c(surfSpaceVect, unitizedSurfSpaceVect, &dist);
1692 SpiceDouble surfaceSunVect[3];
1693 vsub_c(
m_uB, pB, surfaceSunVect);
1694 SpiceDouble unitizedSurfSunVect[3];
1695 unorm_c(surfaceSunVect, unitizedSurfSunVect, &dist);
1699 phase =
Angle(vsep_c(unitizedSurfSpaceVect, unitizedSurfSunVect),
1704 emission =
Angle(vsep_c(unitizedSurfSpaceVect, normal),
1709 incidence =
Angle(vsep_c(unitizedSurfSunVect, normal),
1727 double &mindec,
double &maxdec) {
1731 double originalSample =
Sample();
1732 double originalLine =
Line();
1733 int originalBand =
Band();
1750 for (
int band = 1; band <= eband; band++) {
1753 for (
int line = 1; line <=
p_lines; line++) {
1756 for (samp = 1; samp <=
p_samples; samp++) {
1757 SetImage((
double)samp, (
double)line);
1765 if (ra > 180.0) ra -= 360.0;
1769 if ((line != 1) && (line !=
p_lines))
break;
1774 for (samp =
p_samples; samp >= 1; samp--) {
1775 SetImage((
double)samp, (
double)line);
1783 if (ra > 180.0) ra -= 360.0;
1853 SetImage(originalSample, originalLine);
1871 double originalSample =
Sample();
1872 double originalLine =
Line();
1873 int originalBand =
Band();
1883 double dist = (ra1 - ra2) * (ra1 - ra2) + (dec1 - dec2) * (dec1 - dec2);
1885 double lineRes = dist / (
p_lines - 1);
1891 dist = (ra1 - ra2) * (ra1 - ra2) + (dec1 - dec2) * (dec1 - dec2);
1893 double sampRes = dist / (
p_samples - 1);
1898 SetImage(originalSample, originalLine);
1904 return (sampRes < lineRes) ? sampRes : lineRes;
1913 if (
target()->shape()->name() ==
"Plane") {
1914 QString msg =
"North Azimuth is not available for plane target shapes.";
1927 if (azimuth > 360.0) azimuth = azimuth - 360.0;
2070 SpiceDouble azimuthOrigin[3];
2073 if (!originRadius.
isValid()) {
2080 SpiceDouble pointOfInterestFromBodyCenter[3];
2082 lat *
PI / 180.0, pointOfInterestFromBodyCenter);
2090 SpiceDouble pointOfInterest[3];
2091 vsub_c(pointOfInterestFromBodyCenter, azimuthOrigin, pointOfInterest);
2097 SpiceDouble pointOfInterestProj[3];
2098 vperp_c(pointOfInterest, azimuthOrigin, pointOfInterestProj);
2101 SpiceDouble pointOfInterestProjUnit[3];
2102 vhat_c(pointOfInterestProj, pointOfInterestProjUnit);
2108 SpiceDouble pointOfInterestProjUnitScaled[3];
2109 vscl_c(scale, pointOfInterestProjUnit, pointOfInterestProjUnitScaled);
2114 SpiceDouble adjustedPointOfInterestFromBodyCenter[3];
2115 vadd_c(azimuthOrigin, pointOfInterestProjUnitScaled, adjustedPointOfInterestFromBodyCenter);
2118 double azimuthOriginSample =
Sample();
2119 double azimuthOriginLine =
Line();
2122 double adjustedPointOfInterestRad, adjustedPointOfInterestLon, adjustedPointOfInterestLat;
2123 reclat_c(adjustedPointOfInterestFromBodyCenter,
2124 &adjustedPointOfInterestRad,
2125 &adjustedPointOfInterestLon,
2126 &adjustedPointOfInterestLat);
2127 adjustedPointOfInterestLat = adjustedPointOfInterestLat * 180.0 /
PI;
2128 adjustedPointOfInterestLon = adjustedPointOfInterestLon * 180.0 /
PI;
2129 if (adjustedPointOfInterestLon < 0) adjustedPointOfInterestLon += 360.0;
2135 adjustedPointOfInterestLon,
2140 SetImage(azimuthOriginSample, azimuthOriginLine);
2144 double adjustedPointOfInterestSample =
Sample();
2145 double adjustedPointOfInterestLine =
Line();
2173 double deltaSample = adjustedPointOfInterestSample - azimuthOriginSample;
2174 double deltaLine = adjustedPointOfInterestLine - azimuthOriginLine;
2183 double azimuth = 0.0;
2184 if (deltaSample != 0.0 || deltaLine != 0.0) {
2185 azimuth = atan2(deltaLine, deltaSample);
2186 azimuth *= 180.0 /
PI;
2190 if (azimuth < 0.0) azimuth += 360.0;
2191 if (azimuth > 360.0) azimuth -= 360.0;
2199 SetImage(azimuthOriginSample, azimuthOriginLine);
2218 double coord[3], spCoord[3];
2223 double a = vsep_c(coord, spCoord) * 180.0 /
PI;
2227 double c = 180.0 - (a + b);
2257 double slat,
double slon) {
2261 a = (90.0 - slat) *
PI / 180.0;
2262 b = (90.0 - glat) *
PI / 180.0;
2265 a = (90.0 + slat) *
PI / 180.0;
2266 b = (90.0 + glat) *
PI / 180.0;
2269 double cslon = slon;
2270 double cglon = glon;
2271 if (cslon > cglon) {
2272 if ((cslon-cglon) > 180.0) {
2273 while ((cslon-cglon) > 180.0) cslon = cslon - 360.0;
2276 if (cglon > cslon) {
2277 if ((cglon-cslon) > 180.0) {
2278 while ((cglon-cslon) > 180.0) cglon = cglon - 360.0;
2285 if (cslon > cglon) {
2288 else if (cslon < cglon) {
2295 else if (slat < glat) {
2296 if (cslon > cglon) {
2299 else if (cslon < cglon) {
2307 if (cslon > cglon) {
2310 else if (cslon < cglon) {
2318 double C = (cglon - cslon) *
PI / 180.0;
2320 double c = acos(cos(a)*cos(b) + sin(a)*sin(b)*cos(C));
2321 double azimuth = 0.0;
2322 if (sin(b) == 0.0 || sin(c) == 0.0) {
2325 double A = acos((cos(a) - cos(b)*cos(c))/(sin(b)*sin(c))) * 180.0 /
PI;
2328 if (quad == 1 || quad == 4) {
2331 else if (quad == 2 || quad == 3) {
2332 azimuth = 360.0 - A;
2336 if (quad == 1 || quad == 4) {
2337 azimuth = 180.0 - A;
2339 else if (quad == 2 || quad == 3) {
2340 azimuth = 180.0 + A;
2439 int cacheSize =
CacheSize(ephemerisTimes.first, ephemerisTimes.second);
2447 double altitudeMeters;
2449 altitudeMeters = 1.0;
2462 setTime(ephemerisTimes.first);
2492 pair<double,double> ephemerisTimes;
2493 double startTime = -DBL_MAX;
2494 double endTime = -DBL_MAX;
2496 for (
int band = 1; band <=
Bands(); band++) {
2499 double etStart =
time().
Et();
2502 double etEnd =
time().
Et();
2504 startTime = min(etStart, etEnd);
2505 endTime = max(etStart, etEnd);
2507 startTime = min(startTime, min(etStart, etEnd));
2508 endTime = max(endTime, max(etStart, etEnd));
2510 if (startTime == -DBL_MAX || endTime == -DBL_MAX) {
2511 string msg =
"Unable to find time range for the spice kernels";
2514 ephemerisTimes.first = startTime;
2515 ephemerisTimes.second = endTime;
2516 return ephemerisTimes;
2543 if (startTime == endTime) {
2571 if (startSize == 2 && endSize == 2) {
2577 if (endSize > startSize) {
2578 IString message =
"Camera::SetGeometricTilingHint End size must be smaller than the start size";
2582 if (startSize < 4) {
2583 IString message =
"Camera::SetGeometricTilingHint Start size must be at least 4";
2587 bool foundEnd =
false;
2588 while (powerOf2 > 0 && startSize != powerOf2) {
2589 if (powerOf2 == endSize) foundEnd =
true;
2596 IString message =
"Camera::SetGeometricTilingHint Start size must be a power of 2";
2601 IString message =
"Camera::SetGeometricTilingHint End size must be a power of 2 less than the start size, but greater than 2";
3050 double orgLine =
Line();
3051 double orgSample =
Sample();
3056 double y =
Line() - orgLine;
3057 double x =
Sample() - orgSample;
3058 double celestialNorthClockAngle = atan2(-y, x) * 180.0 /
Isis::PI;
3059 celestialNorthClockAngle = 90.0 - celestialNorthClockAngle;
3061 if (celestialNorthClockAngle < 0.0) {
3062 celestialNorthClockAngle += 360.0;
3066 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).
SpicePosition * instrumentPosition() const
Accessor method for the instrument position.
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.
void Coordinate(double p[3]) const
Returns the x,y,z of the surface intersection in BodyFixed km.
QString instrumentNameShort() const
This method returns the shortened instrument name.
void SetFocalLength()
Reads the focal length from the instrument kernel.
double RightAscension()
Returns the right ascension angle (sky longitude).
double meters() const
Get the distance in meters.
CameraDetectorMap * DetectorMap()
Returns a pointer to the CameraDetectorMap object.
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
int CacheSize(double startTime, double endTime)
This method calculates the spice cache size.
void SetSkyMap(CameraSkyMap *map)
Sets the Sky Map.
double ObliqueLineResolution()
Returns the oblique line resolution at the current position in meters.
const double Null
Value for an Isis Null pixel.
virtual int SpkTargetId() const
Provides target code for instruments SPK NAIF kernel.
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.
double p_minlon
The minimum longitude.
double p_minobliqueres
The minimum oblique resolution.
double DetectorSample() const
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 FocalPlaneY() const
double SunAzimuth()
Returns the Sun Azimuth.
bool ringRange(double &minRingRadius, double &maxRingRadius, double &minRingLongitude, double &maxRingLongitude, Pvl &pvl)
Analogous to the above Ground Range method.
ProjectionType projectionType() const
Returns an enum value for the projection type.
void SetDetectorMap(CameraDetectorMap *map)
Sets the Detector Map.
const double PI
The mathematical constant PI.
CameraDistortionMap * DistortionMap()
Returns a pointer to the CameraDistortionMap object.
double UniversalLatitude() const
Returns the planetocentric latitude, in degrees, at the surface intersection point in the body fixed ...
int BetaLines() const
Returns the number of lines in the beta cube.
double FocalPlaneX() const
double UndistortedFocalPlaneZ() const
Gets the z-value in the undistorted focal plane coordinate system.
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.
void SetGroundMap(CameraGroundMap *map)
Sets the Ground Map.
double FocalPlaneY() const
double radians() const
Convert an angle to a double.
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.
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.
SpiceRotation * bodyRotation() const
Accessor method for the body rotation.
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.
int AlphaLines() const
Returns the number of lines in the alpha cube.
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 HALFPI
The mathematical constant PI/2.
void SetPixelPitch()
Reads the Pixel Pitch from the instrument kernel.
Namespace for the standard library.
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.
double ObliquePixelResolution()
Returns the oblique pixel resolution at the current position in meters/pixel.
virtual ~Camera()
Destroys the Camera Object.
QString instrumentNameLong() const
This method returns the full instrument name.
double p_maxobliqueres
The maximum oblique resolution.
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.
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 kilometers() const
Get the distance in kilometers.
int AlphaSamples() const
Returns the number of samples in the alpha cube.
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.
double DetectorSample() const
Return detector sample.
Distance measurement, usually in meters.
Latitude GetLatitude() const
Return the body-fixed latitude for the surface point.
bool RawFocalPlanetoImage()
Computes the image coordinate for the current universal ground point.
double p_maxres
The maximum resolution.
double degrees() const
Get the angle in units of Degrees.
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...
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.
double BetaLine(double alphaLine)
Returns a beta line given an alpha line.
int ParentLines() const
Returns the number of lines in the parent alphacube.
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group...
virtual double SampleScaleFactor() const
Return scaling factor for computing sample resolution.
CameraSkyMap * SkyMap()
Returns a pointer to the CameraSkyMap object.
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
double p_minRingLongitude
The minimum ring longitude (azimuth)
int p_bands
The number of bands in the image.
bool HasReferenceBand() const
Checks to see if the Camera object has a reference band.
Distance LocalRadius() const
Returns the local radius at the intersection point.
bool SetUniversalGround(const double latitude, const double longitude)
Sets the lat/lon values to get the sample/line values.
void setHasIntersection(bool b)
Sets the flag to indicate whether this ShapeModel has an intersection.
double EmissionAngle() const
Returns the emission angle in degrees.
double WorldX() const
This returns the world X coordinate provided SetGround, SetCoordinate, SetUniversalGround, or SetWorld returned with success.
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.
This class is designed to encapsulate the concept of a Longitude.
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.
Convert between undistorted focal plane and ground coordinates.
double p_minlat
The minimum latitude.
double FocalPlaneY() const
Gets the y-value in the focal plane coordinate system.
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.
Target * target() const
Returns a pointer to the target object.
QString m_instrumentNameShort
Shortened instrument name.
CameraGroundMap * GroundMap()
Returns a pointer to the CameraGroundMap object.
virtual bool SetUndistortedFocalPlane(double ux, double uy)
Compute distorted focal plane x/y.
QString instrumentId()
This method returns the InstrumentId as it appears in the cube.
virtual bool SetSky(const double ra, const double dec)
Compute undistorted focal plane coordinate from ra/dec.
double Longitude() const
This returns a longitude with correct longitude direction and domain as specified in the label object...
Contains multiple PvlContainers.
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.
SpiceInt naifIkCode() const
This returns the NAIF IK code to use when reading from instrument kernels.
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 IsSky() const
Returns true if projection is sky and false if it is land.
double Sample()
Returns the current sample number.
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.
int BetaSamples() const
Returns the number of samples in the beta cube.
CameraFocalPlaneMap * p_focalPlaneMap
A pointer to the FocalPlaneMap.
QString m_instrumentId
The InstrumentId as it appears on the cube.
A type of error that cannot be classified as any of the other error types.
double FocalLength() const
Returns the focal length.
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.
double FocalPlaneX() const
QString spacecraftNameLong() const
This method returns the full spacecraft name.
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
A pointer to the AlphaCube.
double PixelPitch() const
Returns the pixel pitch.
int ParentSamples() const
Returns the number of samples in the parent alphacube.
bool isValid() const
Test if this distance has been initialized or not.
ShapeModel * shape() const
Return the shape.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
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.
double UniversalLongitude() const
Returns the positive east, 0-360 domain longitude, in degrees, at the surface intersection point in t...
virtual void clearSurfacePoint()
Clears or resets the current surface point.
double SpacecraftAltitude()
Returns the distance from the spacecraft to the subspacecraft point in km.
double ParentSample() const
Return parent sample.
double UniversalLatitude()
This returns a universal latitude (planetocentric).
const double DEG2RAD
Multiplier for converting from degrees to radians.
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
int Band()
Returns the current band.
double FocalPlaneY() const
void LoadCache()
This loads the spice cache big enough for this image.
bool p_groundRangeComputed
Flag showing if ground range was computed successfully.
Define shapes and provide utilities for Isis3 targets.
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.
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.
double LowestObliqueImageResolution()
Returns the lowest/worst oblique resolution in the entire image.
double DetectorLine() const
double BetaSample(double alphaSample)
Returns a beta sample given an alpha sample.
QString name() const
Gets the shape name.
QString m_spacecraftNameLong
Full spacecraft name.
int p_samples
The number of samples in the image.
Longitude GetLongitude() const
Return the body-fixed longitude for the surface point.
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...
double ParentLine() const
Return parent line.
Base class for Map Projections of plane shapes.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
double p_maxlon
The maximum longitude.
void SetDistortionMap(CameraDistortionMap *map, bool deleteExisting=true)
Sets the Distortion Map.
double FocalPlaneX() const
double LowestImageResolution()
Returns the lowest/worst resolution in the entire image.
CameraGroundMap * p_groundMap
A pointer to the GroundMap.
double p_maxRingLongitude180
The maximum ring longitude in the 180 domain.
int Bands() const
Returns the number of bands in the image.
QString spacecraftNameShort() const
This method returns the shortened spacecraft name.
double Line()
Returns the current line number.
int Lines() const
Returns the number of lines in the image.
int Samples() const
Returns the number of samples in the image.
static void CheckErrors(bool resetNaif=true)
This method looks for any naif errors that might have occurred.
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.
SurfacePoint GetSurfacePoint() const
Returns the surface point (most efficient accessor).
double p_minres
The minimum resolution.
double p_minlon180
The minimum longitude in the 180 domain.
Adds specific functionality to C++ strings.
SpiceInt naifBodyCode() const
This returns the NAIF body code of the target indicated in the labels.
Namespace for ISIS/Bullet specific routines.
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
double p_minra
The minimum right ascension.
virtual int bandCount() const
Returns the number of virtual bands for the cube.
bool p_ringRangeComputed
Flag showing if ring range was computed successfully.
double LineResolution()
Returns the line resolution at the current position in meters.
virtual int SpkCenterId() const
Provides the center of motion body for SPK NAIF kernel.
virtual double LineScaleFactor() const
Return scaling factor for computing line resolution.
Convert between undistorted focal plane and ra/dec coordinates.
double DetectorLine() const
Return detector line.
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.
bool isValid() const
This indicates whether we have a legitimate angle stored or are in an unset, or invalid, state.
virtual QList< QPointF > PixelIfovOffsets()
Returns the pixel ifov offsets from center of pixel, which defaults to the (pixel pitch * summing mod...
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
double kilometers() const
Get the displacement in kilometers.
virtual double exposureDuration() const
Return the exposure duration for the pixel that the camera is set to.
Projection * p_projection
A pointer to the Projection.
SpiceInt naifSpkCode() const
This returns the NAIF SPK code to use when reading from SPK kernels.
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
The minimum ring radius.
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...
int ReferenceBand() const
Returns the reference band.
SpiceDouble m_uB[3]
This contains the sun position (u) in the bodyfixed reference frame (B).
double UndistortedFocalPlaneY() const
Gets the y-value in the undistorted focal plane coordinate system.
int p_geometricTilingStartSize
The ideal geometric tile size to start with when projecting.
void radii(Distance r[3]) const
Returns the radii of the body in km.
CameraSkyMap * p_skyMap
A pointer to the SkyMap.
double UndistortedFocalPlaneX() const
Gets the x-value in the undistorted focal plane coordinate system.
double SampleResolution()
Returns the sample resolution at the current position in meters.
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.
bool hasNormal() const
Returns surface point normal status.
double UniversalRingLongitude()
This returns a universal ring longitude (clockwise in 0 to 360 domain).
double WorldY() const
This returns the world Y coordinate provided SetGround, SetCoordinate, SetUniversalGround, or SetWorld returned with success.
bool p_pointComputed
Flag showing if Sample/Line has been computed.
double p_childLine
Line value for child.
bool p_raDecRangeComputed
Flag showing if the raDec range has been computed successfully.
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.
bool HasSurfaceIntersection() const
Returns if the last call to either SetLookDirection or SetUniversalGround had a valid intersection wi...
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.
std::vector< Distance > radii() const
Returns the radii of the body in km.
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 method returns the Oblique Detector Resolution if the Look Vector intersects the target and if t...
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
double Declination()
Returns the declination angle (sky latitude).
These projections are used to map triaxial and irregular-shaped bodies.
double FocalPlaneX() const
Gets the x-value in the focal plane coordinate system.
IO Handler for Isis Cubes.
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...
void subSpacecraftPoint(double &lat, double &lon)
Returns the sub-spacecraft latitude/longitude in universal coordinates (0-360 positive east...