Skip to content

BUG: MultiThresholdObjects unit testing#1599

Open
mmarineBlueQuartz wants to merge 12 commits intoBlueQuartzSoftware:developfrom
mmarineBlueQuartz:mtr/MultiThresholdObjects
Open

BUG: MultiThresholdObjects unit testing#1599
mmarineBlueQuartz wants to merge 12 commits intoBlueQuartzSoftware:developfrom
mmarineBlueQuartz:mtr/MultiThresholdObjects

Conversation

@mmarineBlueQuartz
Copy link
Copy Markdown
Collaborator

@mmarineBlueQuartz mmarineBlueQuartz commented Apr 22, 2026

  • Adding more comprehensive unit tests for MultiThresholdObjects.
    • Tested single thresholds for int, float, and multi-component arrays.
    • Tested multiple thresholds at once.
    • Tested inverting threshold outputs.
    • Tested sets of thresholds including nested sets with their inversion flags set.
  • Fixed a bug where a threshold's inversion flag was ignored.
  • Fixed ThresholdSets being handled incorrectly in the filter algorithm.
  • Removed special cases in the algorithm that did not need to exist.
  • Removed unnecessary preflight error on component size mismatch.
  • Increased the required memory for running the filter algorithm.
  • Consolidated copy-pasted code into standardized methods to fix incorrectly updated code depending on the control flow followed.

* Updated MultiThresholdObjects algorithm to account for the IsInverted state allowed by individual thresholds.
* WIP: Replacing unit tests with smaller datasets and standardized testing functions. Integer and floating point single component DataArrays are tested for all comparison types and inversion states using a single threshold. Multicomponent arrays are in the process of being tested and the filter was updated for assumptions that may be wrong. The documentation and GUI need to be referenced before moving forward. Multicomponent threshold tests and threshold creation will likely need to be adjusted based on new information.
* TODO: Create tests for entire threshold sets and even nested sets.
* Mask array is always 1 component.
* Update unit tests for multicomponent array thresholds
* Consolidated unit tests of the same array type and component count using GENERATE.
* Added additional value checks.
* All single threshold tests pass.
* Removed requirement for input arrays to all have the same number of components, Each threshold specifies the target component.
* MultiThresholdObjects no longer writes directly to the DataStore when running Thresholds. Instead Sets and Thresholds both store temporary vectors that are copied to the parent set's vector. The topmost ThresholdSet copies the vector to the DataStore upon completion.
* Added ThresholdSet unit tests.
* Standardized apply threshold values between thresholds and sets.
* Removed unnecessary inversion parameter in threshold and set algorithm
* Re-enabled unit test without the Mismatched components section. That case is no longer an error.
* Added function documentation for ApplyThresholdValues
* Simplified InsertThreshold parameters.
* Deleted unused ThresholdValueFunctor struct.
* Re-enabled invalid execution and mask DataType unit tests and updated for new tuple counts.
* Simplified mask DataType unit tests to remove duplicated code.
* Removed unused legacy unit tests.
@mmarineBlueQuartz mmarineBlueQuartz force-pushed the mtr/MultiThresholdObjects branch from 19abfa0 to 7038909 Compare April 24, 2026 14:16
@mmarineBlueQuartz mmarineBlueQuartz changed the title WIP: MultiThresholdObjects unit testing BUG: MultiThresholdObjects unit testing Apr 24, 2026
@mmarineBlueQuartz mmarineBlueQuartz marked this pull request as ready for review April 24, 2026 14:29
* Converted std::vector data to AbstractDataStore<T> using DataStoreUtilities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant