InsightSoftwareConsortium / InsightSoftwareConsortium/ITK

Cuberille: nondeterministic vertex count for itk::Mesh output (QuadEdgeMesh stable)

Open
#6,301 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.7k
Forks
748
Avg merge
1d 1h
Merged PRs (30d)
64

Description

Discovered while taking over the archived `ITKCuberille#80` reproducer and fixing the unrelated out-of-range crash (see #6284, #6285).

`CuberilleImageToMeshFilter` produces a **nondeterministic vertex count** when the output mesh is a plain `itk::Mesh` (the `itk::QuadEdgeMesh` instantiation is stable).

**Repro:** `TC_prob_float_9021791_96M_right_cropped.nrrd` (from `ITKCuberille#80`), `float` input image, iso-value `0.5`, `CuberilleTest01` (runs the QEMesh then the Mesh instantiation).

Across 5 consecutive runs of the same binary on the same input:

| Mesh type | Points | Cells |
|---|---|---|
| `itk::QuadEdgeMesh` | 134 (stable) | 222 (stable) |
| `itk::Mesh` | **132 / 132 / 137 / 134 / 132** | 230 (stable) |

The point count for the `itk::Mesh` path varies run-to-run while the cell count is stable, which points at an order-/thread-dependent vertex de-duplication or point-insertion path specific to the non-QuadEdge mesh output (the filter uses `itk::PoolMultiThreader`, 16 threads).

This is a **separate defect** from the out-of-range crash fixed for #6284/#6285 (that fix — keying the vertex lookup by the full `(z,y,x)` grid identity — is deterministic and regression-free for the tibial and prostate fixtures). TC_prob is therefore *not* included as a CTest in the supersedes-#80 PR; this issue tracks the remaining nondeterminism.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.