Skip to content

Commit

Permalink
Updated trimfilter to correctly use high/low filters (#5340)
Browse files Browse the repository at this point in the history
* Added high/low filters to trimfilter

* Updated changelog

* Updated changelog

---------

Co-authored-by: acpaquette <[email protected]>
  • Loading branch information
AustinSanders and acpaquette authored Nov 28, 2023
1 parent 50d5d98 commit adfadd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ release.
- Fixed exception pop ups in qview when viewing images created using the CSM Camera [#5259](https://github.com/DOI-USGS/ISIS3/pull/5295/files)
- Fixed shadowtau input file parseing errors when using example file [#5316](https://github.com/DOI-USGS/ISIS3/pull/5316)
- Fixed ProgramLauncher failing while reporting errors from launched programs [#5331](https://github.com/DOI-USGS/ISIS3/pull/5331)
- Fixed high/low filter functionality in trimfilter [#5311](https://github.com/DOI-USGS/ISIS3/issues/5311)

## [8.0.1] - 2023-08-23

Expand Down
8 changes: 8 additions & 0 deletions isis/src/base/apps/trimfilter/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ void IsisMain() {
double low = -DBL_MAX;
double high = DBL_MAX;
int minimum;

if(ui.WasEntered("LOW")) {
low = ui.GetDouble("LOW");
}
if(ui.WasEntered("HIGH")) {
high = ui.GetDouble("HIGH");
}
if(ui.GetString("MINOPT") == "PERCENTAGE") {
int size = lines * samples;
double perc = ui.GetDouble("MINIMUM") / 100;
Expand All @@ -35,6 +42,7 @@ void IsisMain() {
else {
minimum = (int) ui.GetDouble("MINIMUM");
}

p.SetFilterParameters(samples, lines, low, high, minimum);

// Process each line
Expand Down

0 comments on commit adfadd9

Please sign in to comment.