2D Image area and diameter include the flat-axis spacing
メンテナーはふだん 6 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Read src/Plugins/SimplnxCore/vv/deviations/ComputeFeatureSizesFilter.md and the cited calculations in ComputeFeatureSizesDirect.cpp, ComputeFeatureSizesScanline.cpp, and ImageGeom.cpp; the issue first requires a decision on the slab convention. Compare the current behavior with the named tests in ComputeFeatureSizesTest.cpp and GeometryTest.cpp. Done means the convention is decided and applied consistently across the affected filters and geometry code, with tests updated to record the chosen behavior.
索引モデルが issue の本文から書いたものです。
説明
Summary
For a 2D Image Geometry (one dimension has size 1), Compute Feature Sizes multiplies all three spacings to get the cell "area". It then calculates the equivalent circle diameter from that value. When the flat dimension's spacing is not 1, the value is a volume, not an area, and the diameter is incorrect. DREAM.3D v6.5.171 uses only the two non-flat spacings.
This behavior came from PR #1590 (e76ad508e). PR #1590 also documents it as the intended "slab" convention in wrapping/python/docs/source/Geometry.rst:37-52: a user who wants a true 2D result must set the flat spacing to 1.0. Thus a fix is a design decision first, and a code change second.
This is deviation ComputeFeatureSizes-D3 in src/Plugins/SimplnxCore/vv/deviations/ComputeFeatureSizesFilter.md.
Example
Four cells, non-flat spacings 2 and 3, flat spacing 5:
- True area: 4 × 2 × 3 = 24. DREAM.3D v6.5.171 reports 24.
- SIMPLNX reports 4 × 2 × 3 × 5 = 120.
- The diameter is too large by a factor of √5.
Affected code (same calculation)
src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeFeatureSizesDirect.cpp:173(diameter at:195)src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeFeatureSizesScanline.cpp:257(diameter at:261-262)src/simplnx/DataStructure/Geometry/ImageGeom.cpp:150(findElementSizes). This is the source of the convention. Compute Feature Sizes calls it when Save Element Sizes is on.ComputeNeighborhoodsuses the diameter to set the neighborhood radius. In 2D, the larger diameter gives a larger radius.
The RectGrid path in Compute Feature Sizes has no 2D branch. A single-layer RectGrid always gets a volume and an equivalent sphere diameter. That is a different inconsistency.
Other 2D axis defects found in the same check
These are not the slab convention. They are defects under either convention.
- Compute Biased Features (regression).
src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/ComputeBiasedFeatures.cpp:232-263. When X or Y is the flat axis, the code swaps the point counts, origins and centroid offsets. The bounding box at line 263 still usesspacing[0]andspacing[1]. DREAM.3D v6.5.171 (FindBoundingBoxFeatures.cpp:350-377) swaps the spacing too. The final check at:318-334also compares the box against unshifted centroid components. DREAM.3D v6.5.171 has that second defect too. - Compute Shapes (inherited).
src/Plugins/OrientationAnalysis/src/OrientationAnalysis/Filters/Algorithms/ComputeShapes.cpp,findMoments2D(:432-542) andfindAxes2D(:621-664). When X or Y is the flat axis, the moments use the wrong spacing, origin and centroid components. The 2D area written to Volumes (:527) isspacing[0] * spacing[1], so it includes the flat spacing when X or Y is flat. When Z is flat, it is sx·sy, which does not agree with Compute Feature Sizes (sx·sy·sz). DREAM.3D v6.5.171FindShapes.cpphas the same code.
Checked and correct (or following the documented convention): Compute Feature Neighbors shared surface area, Compute Surface Area To Volume, Compute Largest Cross Sections, Compute Euclidean Distance Map, and the topology-only filters changed in PR #1590.
Compute Feature Neighbors has one documentation error: docs/ComputeFeatureNeighborsFilter.md:26 says the shared surface area is a count of cell faces. The code adds physical face areas.
Tests that record the current behavior
ComputeFeatureSizesTest.cpp:1003("2D area excludes the flat-dimension spacing",[2DFlatSpacing][!shouldfail]) expects the DREAM.3D value 24 for X, Y and Z flat. It is an expected failure now.ComputeFeatureSizesTest.cpp:327and:456-466assert the slab values (volumes == 60, diameter8.7403879).Create2DImageDataStructure(ComputeFeatureSizesTest.cpp:508) uses flat spacing 1.0, so the "Valid: Image 2D" tests cannot detect the problem.test/GeometryTest.cpp:297-316asserts the slab convention forfindElementSizes.ComputeFeatureNeighborsTest.cpp:167-201and:417-449assert slab values for flat X, Y and Z.- Compute Shapes has no 2D test. The Compute Biased Features 2D test uses a Z-flat exemplar, so it cannot detect the X/Y-flat defect.
Decisions needed
- Keep the slab convention, or change 2D area and diameter to ignore the flat spacing (DREAM.3D v6.5.171 behavior). The answer applies to
ImageGeom::findElementSizes, Compute Feature Sizes, Compute Shapes and Compute Feature Neighbors together. - If the slab convention stays: should Compute Feature Sizes call the 2D output an area and calculate a circle diameter from it?
- Fix the Compute Biased Features and Compute Shapes axis defects separately. They do not depend on decision 1.
- 主要言語
- C++
- スター
- 18
- フォーク
- 15
- 平均マージ
- 4日 23時間
- マージ済み PR(30日)
- 42
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
BlueQuartzSoftware/simplnx のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BlueQuartzSoftware/simplnx#1987 ·
メンテナーはふだん 6 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
BlueQuartzSoftware/simplnx#1980 ·
メンテナーはふだん 6 日以内に返信
-
Testing
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
BlueQuartzSoftware/simplnx#1979 ·
メンテナーはふだん 6 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
BlueQuartzSoftware/simplnx#1978 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
BlueQuartzSoftware/simplnx#1945 ·
メンテナーはふだん 6 日以内に返信
BlueQuartzSoftware/simplnx の issue をすべて見る
似ている issue
-
bug triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
26.04 bug dark-mode Easy Hack impress symptom: visual
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CollaboraOnline/online#16421 · コメント 1 件 ·
-
area/cs bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ydb-platform/ydb#59881 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
documentation enhancement lua server
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100