10.1. Add Bad Data

Group (Subgroup)

Synthetic Building (Misc)

Description

This Filter adds synthetic bad data to a clean Image Geometry. It is intended to make synthetic microstructures look more like real experimental data, which always contains some unindexed cells, noise points, and boundary artifacts. The user controls how much noise to add and where (random throughout the volume, along feature boundaries, or both).

Why Use This Filter?

Synthetic microstructures generated by reconstruction or packing pipelines have perfectly clean cell data – every cell is assigned to a feature with a valid orientation. Real EBSD scans never look like that. When a synthetic structure is used to seed a downstream simulation that will eventually be compared against experimental measurements, that perfection becomes a problem: the cleanup filters in the experimental pipeline (e.g., Fill Bad Data, Neighbor Orientation Correlation) have nothing to do, and the comparison stops being apples-to-apples. Adding synthetic bad data lets you exercise the same cleanup pipeline on synthetic data as on experimental data.

Random vs. Boundary Noise

The filter supports two independent noise modes; either, both, or neither can be enabled.

  • Random Noise (Poisson) – bad cells are scattered uniformly throughout the volume. Models random non-indexed points caused by detector dropout, surface contamination, or low signal.

  • Boundary Noise – bad cells are placed only on cells near a Feature boundary. Models the practical reality that EBSD signal is weakest right at grain boundaries, where the beam straddles two crystal orientations.

Volume Fraction Semantics

For each enabled noise mode, the user specifies a volume fraction between 0 and 1. The fraction applies only to the cells that the noise mode would affect, not the whole volume:

  • Random volume fraction = 0.2 -> each cell anywhere in the volume has a 20% chance of being marked bad.

  • Boundary volume fraction = 0.2 -> each boundary cell has a 20% chance of being marked bad. Non-boundary cells are unaffected (0% chance).

This means a volume fraction of 0.2 in boundary-only mode introduces far fewer bad cells than 0.2 in random mode, because only boundary cells are at risk.

What “Bad” Means in Output

To flag a cell as bad, the filter sets the corresponding tuple in every Attribute Array in the same Attribute Matrix as the Boundary Euclidean Distances input to 0. This includes Feature Ids, Phases, Quaternions, and any other cell-level data sharing that matrix. Be aware that “0” may be a legitimate value for some arrays (e.g., a phase index) and that the convention here is shared with experimental cleanup filters that interpret Feature Id 0 as bad.

Prerequisite Steps

This filter needs to know which cells are near a feature boundary. That information comes from a Manhattan-distance map, which must be computed and converted before this filter runs:

  1. Run Compute Euclidean Distance Map on the segmented data to produce a Boundary Euclidean Distances array (cell-level, float32).

  2. Run Convert Data Type on that array to cast it to an integer type. This filter’s input requires an integer array.

Required Input Sources

  • Boundary Euclidean Distances (integer array) – produced by Compute Euclidean Distance Map, then cast to integer with Convert Data Type.

  • Image Geometry containing cell-level data – typically a synthetic structure from a packing or reconstruction pipeline.

Random Number Seed Parameters

Parameter Name

Parameter Type

Parameter Notes

Description

Use Seed for Random Generation

Bool

When true the user will be able to put in a seed for random generation

Seed Value

Scalar Value

UInt64

The seed fed into the random generator

Stored Seed Value Array Name

DataObjectName

Name of array holding the seed value

Optional Parameters

Parameter Name

Parameter Type

Parameter Notes

Description

Add Random Noise

Bool

If true the user may set the poisson volume fraction

Volume Fraction of Random Noise

Scalar Value

Float32

A value between 0 and 1 inclusive that is compared against random generation

Add Boundary Noise

Bool

If true the user may set the boundary volume fraction

Volume Fraction of Boundary Noise

Scalar Value

Float32

A value between 0 and 1 inclusive that is compared against random generation

Input Image Geometry

Parameter Name

Parameter Type

Parameter Notes

Description

Image Geometry

Geometry Selection

Image

The selected image geometry

Input Cell Data

Parameter Name

Parameter Type

Parameter Notes

Description

Boundary Euclidean Distances

Array Selection

Allowed Types: int32

This is the GB Manhattan Distances array

DREAM3D-NX Help

If you need help, need to file a bug report or want to request a new feature, please head over to the DREAM3DNX-Issues GitHub site where the community of DREAM3D-NX users can help answer your questions.