BlueQuartzSoftware / BlueQuartzSoftware/SIMPL

BUG: Major Issues in BadDataNeighborOrientationCheck

Aperta
#439 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
8
Fork
22
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

This filter has 2 major known bugs that won't be back patched, but are fixed in DREAM3DNX version 7.5+.

## Issue 1: Only values more than the supplied min number of neighbors is checked

### Example

Consider this case:

You have three target voxels (`A`,`B`,`C`). `A` has 6 good neighbors, `B` has 5 good neighbors, `C` has 4 good neighbors. If you set 4 as the min number of neighbors, you would expect all of the voxels to be flipped. However, only `A` and `B` get flipped. Similarly if you set 6 as the min number of neighbors, none will be flipped even though `A` should be valid.

### Fix

To fix this supply less than what you actually want to be valid by 1. From the example above, instead of supplying 4 as the min number of neighbors you would supply 3 to flip all the voxels.

### Ramifications

There are more good voxels that are not being considered potentially skewing downstream results.

## Issue 2: Invalid neighbor voxels potentially flagged good

The algorithm did not clear variables between iterations allowing a case where a neighbor voxel with a different phase was counted if the last valid neighbor was less than the supplied tolerance. This led to mask values being flipped that did not meet the correct number of neighbors, which potentially caused a chain of invalid values to be marked valid.

#### Example

Consider this case:

You have three target voxels (`A`,`B`,`C`). `A` has 6 good neighbors, `B` has 5 good neighbors, `C` has 4 good neighbors. Say `B` and `C` are close by in parsing order, `B` gets parsed first correctly and the last neighbor it checks was valid and updated misorientation value. When it gets to `C` the first two neighbors are supposed to be ignored because they have different phases than `C`, however, because of the bug the misorientation value from `B`s last valid neighbor is used and the invalid neighbor gets counted. Then when it comes time to check min number of neighbors `C` gets 5 instead of 4 and gets flipped potentially causing voxels checked after to be flipped as well since `C` is now valid.

### Fix

None

### Ramifications

This filter is sequentially dependent in nature, in that if a value gets flipped the neighboring values have their good neighbor counts updated and reevaluated. Thus, when this bug is hit it can cause a chain that flips many invalid cells to valid.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start at the BadDataNeighborOrientationCheck implementation and compare its behavior with DREAM3DNX version 7.5+. Reproduce the supplied A/B/C neighbor cases, checking the minimum-neighbor boundary and whether per-voxel state is reset. Done means valid cells are evaluated at the stated threshold and invalid neighbors are not counted or propagated as valid.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
data
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.