From adfadd99c6104bd3442d945fac076c3e0a0c1ec0 Mon Sep 17 00:00:00 2001 From: Austin Sanders Date: Tue, 28 Nov 2023 16:35:03 -0700 Subject: [PATCH] Updated trimfilter to correctly use high/low filters (#5340) * Added high/low filters to trimfilter * Updated changelog * Updated changelog --------- Co-authored-by: acpaquette --- CHANGELOG.md | 1 + isis/src/base/apps/trimfilter/main.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 196c61e6d1..5032061396 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/isis/src/base/apps/trimfilter/main.cpp b/isis/src/base/apps/trimfilter/main.cpp index 8b9ba03aa4..3b79ce80cd 100644 --- a/isis/src/base/apps/trimfilter/main.cpp +++ b/isis/src/base/apps/trimfilter/main.cpp @@ -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; @@ -35,6 +42,7 @@ void IsisMain() { else { minimum = (int) ui.GetDouble("MINIMUM"); } + p.SetFilterParameters(samples, lines, low, high, minimum); // Process each line