Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSM Camera Qview Try Catches #5295

Merged
merged 3 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ release.
- Fixed `cubeit` attribute error to allow attribute specification on the output cube filename [#5234](https://github.com/DOI-USGS/ISIS3/issues/5234)
- Fixed `campt` to handle input band selection attribute correctly [#5234](https://github.com/DOI-USGS/ISIS3/issues/5235)
- Fixed target name translation for any dawn images with target "4 CERES" [#5294](https://github.com/DOI-USGS/ISIS3/pull/5294)
- Fixed exception pop ups in qview when viewing images created using the CSM Camera [#5259](https://github.com/DOI-USGS/ISIS3/pull/5295/files)

## [8.0.0] - 2023-04-19

Expand Down
79 changes: 56 additions & 23 deletions isis/src/qisis/objs/AdvancedTrackTool/AdvancedTrackTool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,37 +463,70 @@ namespace Isis {
}

// Write out columns solar lon, slant distance, local solar time
double solarLon = cvp->camera()->solarLongitude().degrees();
p_tableWin->table()->item(row, getIndex("Solar Longitude"))->
setText(QString::number(solarLon));
try {
double solarLon = cvp->camera()->solarLongitude().degrees();
p_tableWin->table()->item(row, getIndex("Solar Longitude"))->
setText(QString::number(solarLon));
}
catch (IException &e) {
p_tableWin->table()->item(row, getIndex("Solar Longitude"))->
setText("");
}

double slantDistance = cvp->camera()->SlantDistance();
p_tableWin->table()->item(row, getIndex("Slant Distance"))->
setText(QString::number(slantDistance));
double lst = cvp->camera()->LocalSolarTime();
p_tableWin->table()->item(row, getIndex("Local Solar Time"))->
setText(QString::number(lst));
try {
double lst = cvp->camera()->LocalSolarTime();
p_tableWin->table()->item(row, getIndex("Local Solar Time"))->
setText(QString::number(lst));
}
catch (IException &e) {
p_tableWin->table()->item(row, getIndex("Local Solar Time"))->
setText("");
}

} // end if set image succeeds

// Always write out the x/y/z of the undistorted focal plane
CameraDistortionMap *distortedMap = cvp->camera()->DistortionMap();
double undistortedFocalPlaneX = distortedMap->UndistortedFocalPlaneX();
p_tableWin->table()->item(row, getIndex("Undistorted Focal X"))->
setText(QString::number(undistortedFocalPlaneX));
double undistortedFocalPlaneY = distortedMap->UndistortedFocalPlaneY();
p_tableWin->table()->item(row, getIndex("Undistorted Focal Y"))->
setText(QString::number(undistortedFocalPlaneY));
double undistortedFocalPlaneZ = distortedMap->UndistortedFocalPlaneZ();
p_tableWin->table()->item(row, getIndex("Undistorted Focal Z"))->
setText(QString::number(undistortedFocalPlaneZ));
if (cvp->camera()->DistortionMap() != NULL) {
CameraDistortionMap *distortedMap = cvp->camera()->DistortionMap();
double undistortedFocalPlaneX = distortedMap->UndistortedFocalPlaneX();
p_tableWin->table()->item(row, getIndex("Undistorted Focal X"))->
setText(QString::number(undistortedFocalPlaneX));
double undistortedFocalPlaneY = distortedMap->UndistortedFocalPlaneY();
p_tableWin->table()->item(row, getIndex("Undistorted Focal Y"))->
setText(QString::number(undistortedFocalPlaneY));
double undistortedFocalPlaneZ = distortedMap->UndistortedFocalPlaneZ();
p_tableWin->table()->item(row, getIndex("Undistorted Focal Z"))->
setText(QString::number(undistortedFocalPlaneZ));
}
else {
p_tableWin->table()->item(row, getIndex("Undistorted Focal X"))->
setText("");
p_tableWin->table()->item(row, getIndex("Undistorted Focal Y"))->
setText("");
p_tableWin->table()->item(row, getIndex("Undistorted Focal Z"))->
setText("");
}

// Always write out the x/y of the distorted focal plane
CameraFocalPlaneMap *focalPlaneMap = cvp->camera()->FocalPlaneMap();
double distortedFocalPlaneX = focalPlaneMap->FocalPlaneX();
p_tableWin->table()->item(row, getIndex("Focal Plane X"))->
setText(QString::number(distortedFocalPlaneX));
double distortedFocalPlaneY = focalPlaneMap->FocalPlaneY();
p_tableWin->table()->item(row, getIndex("Focal Plane Y"))->
setText(QString::number(distortedFocalPlaneY));
if (cvp->camera()->FocalPlaneMap() != NULL) {
CameraFocalPlaneMap *focalPlaneMap = cvp->camera()->FocalPlaneMap();
double distortedFocalPlaneX = focalPlaneMap->FocalPlaneX();
p_tableWin->table()->item(row, getIndex("Focal Plane X"))->
setText(QString::number(distortedFocalPlaneX));
double distortedFocalPlaneY = focalPlaneMap->FocalPlaneY();
p_tableWin->table()->item(row, getIndex("Focal Plane Y"))->
setText(QString::number(distortedFocalPlaneY));
}
else {
p_tableWin->table()->item(row, getIndex("Focal Plane X"))->
setText("");
p_tableWin->table()->item(row, getIndex("Focal Plane Y"))->
setText("");
}


// Always write out columns ra/dec, regardless of whether set image succeeds
double ra = cvp->camera()->RightAscension();
Expand Down