Skip to content

Commit dce1694

Browse files
nyoungbqJDuffeyBQ
andauthored
FILTER: Compute Feature Bounds Filter (#1303)
Added: - Compute Feature Bounding Boxes filter ComputeFeatureBoundsFilter - added documentation - added additional functionality outside issue request for split output (documentation has use cases and rationale) - 12 Test Cases (10 Valid; 2 for each Geometry; 2 Invalid - 1 preflight error check; 1 runtime error check) Co-authored-by: Jared Duffey <[email protected]>
1 parent bb620cf commit dce1694

File tree

8 files changed

+1650
-0
lines changed

8 files changed

+1650
-0
lines changed

src/Plugins/SimplnxCore/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ set(FilterList
2727
ComputeBoundaryElementFractionsFilter
2828
ComputeDifferencesMapFilter
2929
ComputeEuclideanDistMapFilter
30+
ComputeFeatureBoundsFilter
3031
ComputeFeatureCentroidsFilter
3132
ComputeFeatureClusteringFilter
3233
ComputeFeatureNeighborsFilter
@@ -171,6 +172,7 @@ set(AlgorithmList
171172
ComputeBiasedFeatures
172173
ComputeBoundaryCells
173174
ComputeEuclideanDistMap
175+
ComputeFeatureBounds
174176
ComputeFeatureCentroids
175177
ComputeFeatureClustering
176178
ComputeFeatureRect
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Compute Feature Bounding Boxes
2+
3+
## Group (Subgroup)
4+
5+
Geometry
6+
7+
## Description
8+
9+
**Warning**: _Potential Runtime Error_ - It is expected that the max feature id plus one (`max_feature_id_value` + 1) is equal to or less than the number of tuples in the supplied feature Attribute Matrix. This cannot be checked in preflight and will terminate the pipeline if encountered.
10+
11+
This filter calculates the bounding boxes for each feature given Feature Ids and Geometry (refer to table below for supported geometry types and their corresponding feature id sizing). The bounding boxes are defined and stored as two points in space, a lower and upper point. The optimal storage solution is use case defined, and as such there are two options provided `split` and `unified`.
12+
13+
| Geometry Type | Expected Feature ID Length|
14+
|---------------|---------------------------|
15+
| Image | Equal to Image Dimesions; typically equivalent to the `Cell Data` Attribute Matrix |
16+
| Vertex | Equal to the Number of Vertices/Points; typically equivalent to the `Vertex Data` Attribute Matrix |
17+
| Edge | Equal to the Number of Edges; ; typically equivalent to the `Edge Data` Attribute Matrix |
18+
| Triangle | Equal to the Number of Triangles/Faces; typically equivalent to the `Face Data` Attribute Matrix |
19+
| Quad | Equal to the Number of Quads/Faces; typically equivalent to the `Face Data` Attribute Matrix |
20+
21+
### Split Output
22+
23+
Two 3-component `float32` **DataArray**s. Min/Lower Bound and Max/Upper Bound.
24+
25+
The intended use case for `split` is primarily for output compatibility. By logically segmenting them users could:
26+
27+
- color min and max differently in visualization
28+
- print the points in separate columns for distinction
29+
- simplify parsing complexity for users who may want to adapt the bounding box representation to another format (primarily for Python-bindings) (e.g. min-x, max-x, min-y, max-y, min-z, max-z || adapting to non-standard bounding shapes)
30+
31+
### Unified Output
32+
33+
One 6-component `float32` **DataArray**. Bounds array in the format of min-x, min-y, min-z, max-x, max-y, max-z.
34+
35+
The intended use case for `unified` is primarily for simplicity of internal calculations. Essentially, this format is the result of appending the max array onto the min array. It is easier to pass around and parse one array within `simplnx` API's. For mainline `simplnx` filters this will be the expected/preferred input format.
36+
37+
% Auto generated parameter table will be inserted here
38+
39+
## Example Pipelines
40+
41+
## License & Copyright
42+
43+
Please see the description file distributed with this **Plugin**
44+
45+
## DREAM3D-NX Help
46+
47+
If you need help, need to file a bug report or want to request a new feature, please head over to the [DREAM3DNX-Issues](https://github.com/BlueQuartzSoftware/DREAM3DNX-Issues/discussions) GitHub site where the community of DREAM3D-NX users can help answer your questions.

0 commit comments

Comments
 (0)