VV: Multi-Threshold Objects - #1688
Conversation
* 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.
* Converted std::vector data to AbstractDataStore<T> using DataStoreUtilities.
Removed stale testing constant.
|
Full V&V review of this PR: every claim in the V&V documents was re-verified against head Independent A/B validation (run for this review)Shared legacy-format input (100 tuples,
Same three configs at 50M random tuples: this branch matches the oracle exactly. All 17 ctest entries pass locally. The same pipelines run against Also confirmed from legacy source: Actionable itemsCorrectness / behavior
V&V document corrections (each verified against head)
CPU / memoryMeasured on 50M tuples (3 threshold filters per pipeline, Release): develop 18.2s / 774MB peak RSS → this PR 21.9s / 861MB. Filter-only time roughly +50%; peak temp usage is now (nesting depth + 2) full-size stores vs 1
Test quality / cleanup
Verified good
|
Naming Conventions
Naming of variables should descriptive where needed. Loop Control Variables can use
iif warranted. Most of these conventions are enforced through the clang-tidy and clang-format configuration files. See the filesimplnx/docs/Code_Style_Guide.mdfor a more in depth explanation.Filter Checklist
The help file
simplnx/docs/Porting_Filters.mdhas documentation to help you port or write new filters. At the top is a nice checklist of items that should be noted when porting a filter.Unit Testing
The idea of unit testing is to test the filter for proper execution and error handling. How many variations on a unit test each filter needs is entirely dependent on what the filter is doing. Generally, the variations can fall into a few categories:
Code Cleanup