Skip to content

Commit fe56765

Browse files
authored
Merge branch 'dev' into web_spice_calls
2 parents a125394 + 2d275e1 commit fe56765

File tree

128 files changed

+14259
-1093
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+14259
-1093
lines changed

.github/workflows/gitlab-lts.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ jobs:
6060
git clone https://isis-codebuild-ci:[email protected]/astrogeology/isis-codebuild-ci.git
6161
echo $LTS_VERSION
6262
cd isis-codebuild-ci
63-
if [[ "git ls-remote --exit-code origin $LTS_VERSION" == 2 ]]; then
63+
if [[ $(git ls-remote --heads origin $LTS_VERSION | wc -l) -eq 0 ]]; then
64+
echo "Branch $LTS_VERSION does not exist, will create"
6465
git checkout -b $LTS_VERSION
6566
else
67+
echo "Branch $LTS_VERSION already exists"
6668
git checkout $LTS_VERSION
6769
git reset --hard origin/main
6870
fi
6971
echo -e "\nenv: \n shell: bash \n variables: \n LTS_VERSION: $LTS_VERSION \n BASE_LTS: $BASE_LTS \n ANACONDA_API_TOKEN: $ANACONDA_TOKEN \n GITHUB_SHA: $GITHUB_SHA" >> buildspec-lts.yml
7072
git commit -a -m "$LTS_VERSION"
71-
git push origin $LTS_VERSION --force
73+
git push origin $LTS_VERSION --force

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,22 @@ release.
3636
## [Unreleased]
3737

3838
### Added
39+
- Added adjusted XYZ point coordinate sigmas to the points.csv jigsaw output file. Modified
40+
ctest FunctionalTestJigsawApollo to validate this output. [#5710](https://github.com/DOI-USGS/ISIS3/issues/5710)
41+
- Added OFFBODY and OFFBODYTRIM parameters to cam2cam. Added tests and updated documentation. [#3602] (https://github.com/DOI-USGS/ISIS3/issues/3602)
42+
- Added support for reading, writing, and viewing GeoTIFFs in ISIS. [#5618](https://github.com/DOI-USGS/ISIS3/pull/5618)
43+
- Added GDAL SRS propagation for systems outside of ISIS to display projected GTiffs. [#5736](https://github.com/DOI-USGS/ISIS3/pull/5736)
3944

4045
### Changed
46+
- Enhanced csminit by removing the need to specify model and plugin [#5585](https://github.com/DOI-USGS/ISIS3/issues/5585)
47+
- Changed file format to propagate from the input image format to the output image format [#5737](https://github.com/DOI-USGS/ISIS3/pull/5737)
4148

4249
### Fixed
4350
- Fixed kaguyatc2isis invalid BandBin values [#5629](https://github.com/DOI-USGS/ISIS3/issues/5629)
4451
- Fixed SpiceClient to handle redirect requests.
4552
- Fixed jigsaw to default OUTADJUSTMENTH5 option to false and allow this feature to run on read-only images [#5700](https://github.com/DOI-USGS/ISIS3/issues/5700)
4653
- Fixed Cube::fromIsd to add "LineScanTimes" table from HRSC isds [#5668](https://github.com/DOI-USGS/ISIS3/issues/5668)
54+
- Fixed segfault in SpiceClient when an authentication error was encountered. [#5735](https://github.com/DOI-USGS/ISIS3/pull/5735)
4755

4856
## [9.0.0] - 09-25-2024
4957

environment.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ dependencies:
66
- ale =0.10.0,<1
77
- aom
88
- armadillo
9-
- boost >=1.78.0,<1.79
10-
- boost-cpp >=1.78.0,<1.79
9+
- boost >=1.76.0,<1.82
10+
- boost-cpp >=1.76.0,<1.82
1111
- blas
1212
- usgs-astrogeology::bullet
1313
- bz2file
@@ -23,6 +23,7 @@ dependencies:
2323
- ffmpeg
2424
- geos >=3.12, <3.13
2525
- geotiff
26+
- gdal >=3.5 ,<3.9.0a0
2627
- gmp
2728
- graphviz
2829
- conda-forge::gsl >=2.6, <2.7
@@ -35,10 +36,10 @@ dependencies:
3536
- kalasiris
3637
- krb5
3738
- libgdal >=3.7,<3.8
38-
- libopencv >=4.7,<4.8
39+
- libopencv >=4.5,<4.8
3940
- libpng >=1.6.34,<1.7
4041
- libprotobuf
41-
- libtiff >=4.5,<4.6
42+
- libtiff >=4.5,<4.8
4243
- libxml2
4344
- make
4445
- mesalib
@@ -48,17 +49,17 @@ dependencies:
4849
- nlohmann_json=3.11.2
4950
- ninja >=1.7.2,<1.8
5051
- nn
51-
- opencv >=4.7,<4.8
52+
- opencv >=4.5,<4.8
5253
- openssl >=3.1.2,<3.2
5354
- pcl >=1.13,<1.14
5455
- plio
5556
- protobuf
56-
- python >=3.10
57-
- python_abi >=3.10
57+
- python >=3.9
58+
- python_abi >=3.9
5859
- pytest
5960
- rclone
6061
- qhull
61-
- qt-main>=5.15.8, <5.16
62+
- qt-main>=5.15, <5.16
6263
- qwt <6.3.0
6364
- usgs-astrogeology/label/dev::spiceql
6465
- sqlite >=3.46.0,<3.47

gtest

isis/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ find_package(CSM 3.0.3.3 REQUIRED)
267267
find_package(CSPICE 65 REQUIRED)
268268
find_package(Eigen REQUIRED)
269269
find_package(Embree 3.13.0 REQUIRED)
270+
find_package(GDAL REQUIRED CONFIG)
270271
find_package(GeoTIFF 2 REQUIRED)
271272
SET(GSL_ROOT_DIR $ENV{CONDA_PREFIX})
272273
find_package(GSL 2.2.1 REQUIRED)
@@ -354,7 +355,7 @@ foreach (_variableName ${_variableNames})
354355
endforeach()
355356

356357
# add target based linkages to ALLLIBS variable
357-
list(APPEND ALLLIBS pantor::inja sensorutilities protobuf::libprotobuf embree)
358+
list(APPEND ALLLIBS pantor::inja sensorutilities protobuf::libprotobuf embree GDAL::GDAL)
358359

359360
# Sometimes we add the same lib more than once (especially with LIBDIRS)
360361
list(REMOVE_DUPLICATES ALLLIBDIRS)

isis/cmake/BuildDocs.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ function(build_object_docs)
312312
file(MAKE_DIRECTORY ${docInstallFolder}/${docVersion}/Object/apps)
313313
file(MAKE_DIRECTORY ${docInstallFolder}/${docVersion}/Object/Developer)
314314
file(MAKE_DIRECTORY ${docInstallFolder}/${docVersion}/Object/Programmer)
315-
file(MAKE_DIRECTORY ${docInstallFolder}/${docVersion}/documents/DocStyle/assets)
316315
copy_wildcard("${docBuildFolder}/Object/*.html" ${docInstallFolder}/${docVersion}/Object/)
317316
#copy_file(${objBuildDir}/isisDoxyDefs.doxydef ${docInstallFolder}/documents/DocStyle/assets/isisDoxyDefs.doxydef)
318317

isis/src/apollo/apps/apollopanstitcher/apollopanstitcher.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -715,11 +715,11 @@ namespace Isis {
715715
att.setFileFormat( panC[0]->format() );
716716
att.setByteOrder( panC[0]->byteOrder() );
717717
att.setPixelType( panC[0]->pixelType() );
718-
if (panC[0]->labelsAttached()) {
719-
att.setLabelAttachment(AttachedLabel);
718+
if (panC[0]->labelsAttached() == Cube::AttachedLabel) {
719+
att.setLabelAttachment(Cube::AttachedLabel);
720720
}
721721
else {
722-
att.setLabelAttachment(DetachedLabel);
722+
att.setLabelAttachment(Cube::DetachedLabel);
723723
}
724724

725725
//define an output cube
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Group = ShapeModel
2+
RayTraceEngine = Bullet
3+
OnError = Continue
4+
EndGroup
5+
End
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
3+
# Get example image acquired by OREX OCAMS during "Detailed Survey" phase\
4+
dtype="map_iofL2b"\
5+
fbase="20190509T180552S020"\
6+
7+
# Download the OSIRIS-REx image. Note wget can be installed using the command\
8+
# "conda install wget"\
9+
wget -P . "https://sbnarchive.psi.edu/pds4/orex/orex.ocams/data_calibrated/detailed_survey/$\{fbase\}_$\{dtype\}.fits"\
10+
11+
# Import into ISIS\
12+
ocams2isis from="$\{fbase\}_$\{dtype\}.fits" to="$\{fbase\}_pck.cub"\
13+
ocams2isis from="$\{fbase\}_$\{dtype\}.fits" to="$\{fbase\}_dtm.cub"\
14+
15+
spiceinit from="$\{fbase\}_pck.cub" shape=ellipsoid\
16+
spiceinit from="$\{fbase\}_dtm.cub" shape=user model='$osirisrex/kernels/dsk/g_00880mm_alt_ptm_0000n00000_v020.bds' -pref=$ISISROOT/BulletEngineSelect.pref\
17+
18+
# Run cam2cam for each set\
19+
cam2cam from="$\{fbase\}_pck.cub" match="$\{fbase\}_dtm.cub" to="$\{fbase\}_pck_to_dtm_def.cub"\
20+
cam2cam from="$\{fbase\}_pck.cub" match="$\{fbase\}_dtm.cub" to="$\{fbase\}_pck_to_dtm_off.cub" offbody=true offbodytrim=false\
21+
cam2cam from="$\{fbase\}_pck.cub" match="$\{fbase\}_dtm.cub" to="$\{fbase\}_pck_to_dtm_offtrim.cub" offbody=true offbodytrim=true\
22+
23+
cam2cam from="$\{fbase\}_dtm.cub" match="$\{fbase\}_pck.cub" to="$\{fbase\}_dtm_to_pck_def.cub"\
24+
cam2cam from="$\{fbase\}_dtm.cub" match="$\{fbase\}_pck.cub" to="$\{fbase\}_dtm_to_pck_off.cub" offbody=true offbodytrim=false\
25+
cam2cam from="$\{fbase\}_dtm.cub" match="$\{fbase\}_pck.cub" to="$\{fbase\}_dtm_to_pck_offtrim.cub" offbody=true offbodytrim=true\
26+
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

isis/src/base/apps/cam2cam/cam2cam.cpp

Lines changed: 16 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
/** This is free and unencumbered software released into the public domain.
2+
The authors of ISIS do not claim copyright on the contents of this file.
3+
For more details about the LICENSE terms and the AUTHORS, you will
4+
find files of those names at the top level of this repository. **/
5+
6+
/* SPDX-License-Identifier: CC0-1.0 */
7+
18
#include <cmath>
29

310
#include "cam2cam.h"
411

512
#include "Application.h"
613
#include "Camera.h"
714
#include "CameraFactory.h"
8-
#include "Distance.h"
915
#include "ProcessRubberSheet.h"
1016

1117
using namespace std;
@@ -56,10 +62,15 @@ namespace Isis {
5662
referenceBand += (referenceBand % 2);
5763
referenceBand /= 2;
5864

59-
// See if the user wants to override the reference band
65+
// See if the user wants to override the reference band
6066
if (ui.WasEntered("REFBAND")) {
6167
referenceBand = ui.GetInteger("REFBAND");
6268
}
69+
70+
// Check for propagation of off-body (based upon RA/Dec) pixels as well
71+
// but allow for trimming of off target intersections in FROM file.
72+
bool offbody = ui.GetBoolean("OFFBODY");
73+
bool trim = ui.GetBoolean("OFFBODYTRIM");
6374

6475
// Using the Camera method out of the object opack will not work, because the
6576
// filename required by the Camera is not passed by the process class in this
@@ -95,7 +106,9 @@ namespace Isis {
95106
cam2camGlobal::incam,
96107
ocube->sampleCount(),
97108
ocube->lineCount(),
98-
outcam);
109+
outcam,
110+
offbody,
111+
trim);
99112

100113
// Add the reference band to the output if necessary
101114
ocube->putGroup(instgrp);
@@ -127,56 +140,4 @@ namespace Isis {
127140
}
128141

129142

130-
// Transform object constructor
131-
cam2camXform::cam2camXform(const int inputSamples, const int inputLines,
132-
Camera *incam, const int outputSamples,
133-
const int outputLines, Camera *outcam) {
134-
p_inputSamples = inputSamples;
135-
p_inputLines = inputLines;
136-
p_incam = incam;
137-
138-
p_outputSamples = outputSamples;
139-
p_outputLines = outputLines;
140-
p_outcam = outcam;
141-
}
142-
143-
// Transform method mapping output line/samps to lat/lons to input line/samps
144-
bool cam2camXform::Xform(double &inSample, double &inLine,
145-
const double outSample, const double outLine) {
146-
// See if the output image coordinate converts to lat/lon
147-
if (!p_outcam->SetImage(outSample, outLine)) return false;
148-
149-
// Get the universal lat/lon and see if it can be converted to input line/samp
150-
double lat = p_outcam->UniversalLatitude();
151-
double lon = p_outcam->UniversalLongitude();
152-
Distance rad = p_outcam->LocalRadius();
153-
if (rad.isValid()) {
154-
if (!p_incam->SetUniversalGround(lat, lon, rad.meters())) return false;
155-
}
156-
else {
157-
if (!p_incam->SetUniversalGround(lat, lon)) return false;
158-
}
159-
160-
// Make sure the point is inside the input image
161-
if (p_incam->Sample() < 0.5) return false;
162-
if (p_incam->Line() < 0.5) return false;
163-
if (p_incam->Sample() > p_inputSamples + 0.5) return false;
164-
if (p_incam->Line() > p_inputLines + 0.5) return false;
165-
166-
// Everything is good
167-
inSample = p_incam->Sample();
168-
inLine = p_incam->Line();
169-
return true;
170-
}
171-
172-
173-
int cam2camXform::OutputSamples() const {
174-
return p_outputSamples;
175-
}
176-
177-
178-
int cam2camXform::OutputLines() const {
179-
return p_outputLines;
180-
}
181-
182143
}

isis/src/base/apps/cam2cam/cam2cam.h

Lines changed: 82 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
/** This is free and unencumbered software released into the public domain.
2+
The authors of ISIS do not claim copyright on the contents of this file.
3+
For more details about the LICENSE terms and the AUTHORS, you will
4+
find files of those names at the top level of this repository. **/
5+
6+
/* SPDX-License-Identifier: CC0-1.0 */
7+
18
#ifndef cam2cam_h
29
#define cam2cam_h
310

11+
#include <memory>
12+
413
#include "Transform.h"
514

615
#include "Application.h"
716
#include "Camera.h"
817
#include "Cube.h"
18+
#include "Distance.h"
919
#include "UserInterface.h"
1020

1121
namespace Isis {
@@ -26,21 +36,86 @@ namespace Isis {
2636
int p_inputLines;
2737
int p_outputSamples;
2838
int p_outputLines;
39+
bool p_offbody;
40+
bool p_trim;
2941

3042
public:
3143
// constructor
3244
cam2camXform(const int inputSamples, const int inputLines, Isis::Camera *incam,
33-
const int outputSamples, const int outputLines, Isis::Camera *outcam);
45+
const int outputSamples, const int outputLines, Isis::Camera *outcam,
46+
const bool offbody = false, const bool trim = true) {
3447

48+
p_inputSamples = inputSamples;
49+
p_inputLines = inputLines;
50+
p_incam = incam;
51+
52+
p_outputSamples = outputSamples;
53+
p_outputLines = outputLines;
54+
p_outcam = outcam;
55+
p_offbody = offbody;
56+
p_trim = trim;
57+
}
58+
3559
// destructor
36-
~cam2camXform() {};
60+
virtual ~cam2camXform() {};
3761

38-
// Override parent's pure virtual members
39-
bool Xform(double &inSample, double &inLine,
40-
const double outSample, const double outLine);
41-
int OutputSamples() const;
42-
int OutputLines() const;
62+
/** Transform method mapping output line/samps to lat/lons to input line/samps */
63+
inline bool Xform(double &inSample, double &inLine,
64+
const double outSample, const double outLine) {
65+
66+
// See if the output image coordinate converts to lat/lon
67+
if ( p_outcam->SetImage(outSample, outLine) ) {
68+
// Get the universal lat/lon and see if it can be converted to input line/samp
69+
double lat = p_outcam->UniversalLatitude();
70+
double lon = p_outcam->UniversalLongitude();
71+
Distance rad = p_outcam->LocalRadius();
72+
if (rad.isValid()) {
73+
if(!p_incam->SetUniversalGround(lat, lon, rad.meters())) return false;
74+
}
75+
else {
76+
if(!p_incam->SetUniversalGround(lat, lon)) return false;
77+
}
78+
}
79+
else if ( p_offbody ) {
80+
double ra = p_outcam->RightAscension();
81+
double dec = p_outcam->Declination();
82+
if ( !p_incam->SetRightAscensionDeclination(ra,dec) ) return false;
83+
if ( p_trim ) {
84+
if ( p_incam->SetImage(p_incam->Sample(), p_incam->Line()) ) return (false);
85+
}
86+
}
87+
else {
88+
return false;
89+
}
90+
91+
// Make sure the point is inside the input image
92+
if (p_incam->Sample() < 0.5) return false;
93+
if (p_incam->Line() < 0.5) return false;
94+
if (p_incam->Sample() > p_inputSamples + 0.5) return false;
95+
if (p_incam->Line() > p_inputLines + 0.5) return false;
96+
97+
// Everything is good
98+
inSample = p_incam->Sample();
99+
inLine = p_incam->Line();
100+
return true;
101+
}
102+
103+
104+
inline int OutputSamples() const {
105+
return p_outputSamples;
106+
}
107+
108+
109+
inline int OutputLines() const {
110+
return p_outputLines;
111+
}
112+
43113
};
114+
115+
116+
117+
118+
44119
}
45120

46121
#endif

0 commit comments

Comments
 (0)