Generators & UtilitiesEnglish

Create Synthetic Images

Create Synthetic Images is a Dragonfly Prototype Apps plugin that generates many kinds of synthetic 2D / 3D image data and imports them straight into the current Dragonfly session as Channels. It ships 26 generators orga

Updated 2026-07-04User manual

Create Synthetic Images - User Manual

Dragonfly Prototype Apps · Create Synthetic Images...

Version 1.0 · 2026-07-04


English Manual

Contents

1. Overview

2. Use Cases

3. Installation and Enabling

4. Runtime Environment and First-Run Setup

5. User Interface

5.1 Generator group

5.2 Output size group

5.3 Output group and actions

6. Step-by-Step Usage

7. Parameter Reference

7.1 Shared parameters (all generators)

7.2 Per-generator parameters

8. Output

9. FAQ and Troubleshooting

10. Notes and Known Limitations

11. References

1. Overview

Create Synthetic Images is a Dragonfly Prototype Apps plugin that generates many kinds of synthetic 2D / 3D image data and imports them straight into the current Dragonfly session as Channels. It ships 26 generators organised into six families:

  • Shapes & Phantoms — Shepp-Logan phantom, sphere / disk, cube / square, cylinder, concentric-shells phantom (5 generators);
  • Noise — Gaussian, uniform, salt & pepper, value-noise fractal (fBm) (4 generators);
  • Porous & Particles — correlated blobs (porous), overlapping spheres, polydisperse spheres, random spheres (RSA), lattice sphere packings, fiber / cylinder networks (6 generators);
  • Microstructure — Voronoi grain edges, Voronoi grains (label map), Sierpinski foam (fractal), random Cantor dust (fractal) (4 generators);
  • Cells & Blobs — binary blobs (cells), fluorescence spots / nuclei (2 generators);
  • Test Patterns — gradient ramp, checkerboard, sinusoidal grating, Siemens star, concentric rings (5 generators).

All engines are permissively licensed open source: numpy / scipy (BSD), scikit-image (BSD; Dragonfly bundles 0.19.3) and PoreSpy (MIT; Dragonfly bundles 2.4.2; Gostick et al. 2019, JOSS, doi:10.21105/joss.01296). The fractal (fBm) noise is a self-contained numpy + scipy value-noise implementation, so no extra noise library is required. The plugin code is written to work with both the bundled and newer releases of porespy / scikit-image.

Pick a generator and its parameters, choose 2D or 3D and the output size, click Generate + Import, and the result is published as a new Channel while a mid-slice grayscale preview appears in the panel. Binary / label generators produce a mask or label map (colour it with a LUT); noise / phantom / pattern generators produce a float grayscale image.

2. Use Cases

  • Algorithm testing and teaching demos — demonstrate or validate filtering, segmentation, skeletonisation, visualisation and other features on images with fully known, parameter-controlled structure;
  • Producing known ground truth — generate test data with exactly controlled structure for segmentation / measurement / reconstruction pipelines, e.g. porous media with a known porosity, Voronoi label maps with a known grain count, sphere packings with a known radius;
  • Quickly validating a workflow when no real data is at hand — smoke-test a new script, recipe or plugin on synthetic data first;
  • Imaging and display chain tests — classic targets such as the Siemens star, sinusoidal gratings, checkerboards and gradients help evaluate resolution, interpolation and window-levelling;
  • Reproducible experiments — every random generator is driven by the Seed; identical parameters plus an identical seed give an identical image.

3. Installation and Enabling

1. Download the Prototype Apps online package from ImageFly and extract it. Close Dragonfly, run install_prototype_apps.exe and select the Dragonfly version to install into.

2. Start Dragonfly, open Prototype Apps ▸ App Store and search for Create Synthetic Images. If an Enable button is shown, click it and follow the sign-in, download or installation prompts.

3. Restart Dragonfly when prompted, then open Create Synthetic Images from the Prototype Apps menu. Return to App Store to enable or disable it later.

To uninstall all Prototype Apps, close Dragonfly and run uninstall_prototype_apps.exe from the online package.

4. Runtime Environment and First-Run Setup

This is one of the lightest plugins in the whole Prototype Apps line: there is no Setup Environment step, no virtual environment, and nothing to download — just click and go. Every dependency it needs (numpy, scipy, scikit-image, porespy) already ships with Dragonfly 2025.1 / 2027.1.

  • Internet: not required. Fully usable offline;
  • GPU: not required. All generators run on the CPU;
  • WSL / external applications: not required.
  • Python environment: generation runs as a subprocess of Dragonfly's own bundled Python (`Python_env\python.exe`), isolated from the Dragonfly UI process so heavy numeric libraries never destabilise Dragonfly itself. The panel's Engine row shows Uses Dragonfly's own Python - no setup needed.;
  • Temporary files: each run creates a job folder starting with synth_ in the system temp directory, holding config.json, status.json, results.json, the generated synth_output.npy and the subprocess log runner_stdout.log — useful for troubleshooting;
  • Remembered settings: the panel stores the last-used Channel name in synth_config.json next to the plugin code and restores it on the next open.

When the subprocess starts, the plugin automatically re-creates Dragonfly's DLL search path so that Pillow / porespy load correctly in the fresh process — no manual configuration is ever needed.

5. User Interface

From top to bottom the panel shows: an intro text, the Generator group, the Output size group, the Output group, the Generate + Import button, the preview area, a status line and a log box. Every control below matches the actual code.

5.1 Generator group

  • Generator combo box — lists all 26 generators as Family / Name (e.g. Porous & Particles / Correlated blobs (porous)), sorted by family and name;
  • Description line (gray text) — shows the current generator's description, output type (binary / float / label) and reference;
  • Parameter form (dynamic) — rebuilt whenever the generator changes: integer parameters use integer spin boxes, real parameters use 3-decimal spin boxes (step 0.05), and enumerated parameters (e.g. lattice type, gradient axis) use drop-downs. See Chapter 7 for every parameter.

5.2 Output size group

  • Dimensionality — 2D / 3D radio buttons, default 3D. Availability follows the generator: the Shepp-Logan phantom and Siemens star are 2D-only; the cylinder and the fiber / cylinder network are 3D-only; the other 22 generators support both;
  • Z (slices) — number of slices, range 1–4096, default 64; editable only in 3D mode;
  • Y — image height in pixels, range 2–8192, default 128;
  • X — image width in pixels, range 2–8192, default 128;
  • Voxel spacing — range 0.0001–100000 (4 decimals), default 1.0; the same value is applied to X, Y and Z (isotropic);
  • Seed — range 0–2000000000, default 0; controls the reproducibility of every random generator.

5.3 Output group and actions

  • Channel name — text field, default `Synthetic`; the created Channel is named <Channel name> - <generator name>, e.g. Synthetic - Correlated blobs (porous). The name is remembered across sessions;
  • Engine row — status hint: normally Uses Dragonfly's own Python - no setup needed.; if run outside Dragonfly it shows Dragonfly Python not found (run inside Dragonfly).;
  • Generate + Import button (blue) — starts generation and import; disabled while a job is running to prevent double submission;
  • Preview area — after generation shows the result's middle slice (mid-Z slice for 3D, the image itself for 2D), grayscale-normalised; the initial placeholder reads Preview (mid-slice) appears here after Generate.;
  • Status line and log box — the status line reports success (Imported new Channel: ...) or the failure reason; the read-only log box streams progress percentages and subprocess messages.

6. Step-by-Step Usage

Basic workflow (applies to all 26 generators):

1. Open Prototype Apps ▸ Create Synthetic Images...;

2. Pick a generator in the Generator combo and read the gray description line to confirm the output type;

3. Adjust the generator's parameters in the form (the defaults already give sensible results);

4. In Output size, choose 2D or 3D (some generators lock the choice) and set X / Y (plus Z in 3D). For a first try keep the default 128×128×64, then scale up once you are happy;

5. Optionally set Voxel spacing (the spacing of the resulting Channel) and Seed (fix a seed for reproducible results; change it for another random realisation of the same structure);

6. Enter a name prefix in Channel name (default Synthetic);

7. Click Generate + Import. The log shows === Generate '<generator>' (shape) === plus progress messages (10% generating, 85% writing output);

8. When finished, the status line shows Imported new Channel: <name> (shape), the mid-slice preview appears in the panel, and the new Channel is already published in Dragonfly's data list — drop it into any 2D / 3D view.

Example A — a 3D porous medium with known porosity for segmentation testing: choose Porous & Particles / Correlated blobs (porous), set Porosity=0.5 and Blobiness=1, pick 3D at 128×128×64, click Generate + Import; the binary Channel has approximately the requested porosity and validates threshold-segmentation and porosity-measurement pipelines.

Example B — a ground-truth grain label map: choose Microstructure / Voronoi grains (label map) and set Number of grains=40; the output assigns one integer label (1–40) per grain, ideal as ground truth for grain statistics.

Example C — a resolution test target: choose Test Patterns / Siemens star (2D only) with Spokes=36 to get the classic star target for evaluating resampling and display.

Generation runs in a background thread and subprocess, so Dragonfly stays usable meanwhile. A single run is limited to 30 minutes, after which it is terminated with a 'processing timed out' error. Closing the panel terminates a running job.

7. Parameter Reference

This chapter lists the shared panel parameters and the specific parameters of all 26 generators. Defaults match the UI exactly.

7.1 Shared parameters (all generators)

Parameter

Default

Range

Description

Dimensionality

3D

2D / 3D

Output dimensionality; a few generators support only one (see 7.2)

Z (slices)

64

1–4096

Slice count in 3D; disabled in 2D

Y

128

2–8192

Image height (pixels)

X

128

2–8192

Image width (pixels)

Voxel spacing

1.0

0.0001–100000

Voxel spacing, one value for X/Y/Z (isotropic)

Seed

0

0–2000000000

Random seed; same parameters + same seed = identical result

Channel name

Synthetic

any text

Output Channel name prefix; the final name is "prefix - generator name"

7.2 Per-generator parameters

Shapes & Phantoms

Generator (dims / output)

Parameter

Default

Range

Description

Shepp-Logan phantom (2D / float)

—

—

—

Classic CT head phantom (Shepp & Logan 1974); no parameters

Sphere / disk (2D/3D / binary)

Radius (fraction of size)

0.4

0.02–0.5

Sphere / disk radius as a fraction of the image size

Cube / square (2D/3D / binary)

Side (fraction of size)

0.5

0.05–1.0

Cube / square side length fraction

Cylinder (3D / binary)

Radius (fraction)

0.3

0.02–0.5

Radius fraction of a cylinder extruded along Z

Concentric shells phantom (2D/3D / float)

Number of shells

5

1–30

Number of radial cosine shells

Noise

Generator (dims / output)

Parameter

Default

Range

Description

Gaussian noise (2D/3D / float)

Mean

0.5

-10–10

Mean of the Gaussian distribution

Std dev

0.15

0–10

Standard deviation

Uniform noise (2D/3D / float)

Low

0.0

-10–10

Lower bound of the uniform distribution

High

1.0

-10–10

Upper bound

Salt & pepper (2D/3D / float)

Fraction corrupted

0.05

0–1

Fraction of pixels set to 0 or 1 (base value 0.5)

Value-noise fractal (fBm) (2D/3D / float)

Base frequency

0.05

0.005–0.5

Base frequency; larger = finer structure

Octaves

4

1–8

Number of summed octaves

Gain (persistence)

0.5

0.1–0.9

Amplitude decay per octave

Porous & Particles

Generator (dims / output)

Parameter

Default

Range

Description

Correlated blobs (porous) (2D/3D / binary)

Porosity

0.5

0.05–0.95

Target porosity

Blobiness

1

1–5

Blob fineness; larger = finer texture

Overlapping spheres (2D/3D / binary)

Sphere radius (px)

6

1–60

Sphere radius in pixels

Porosity

0.6

0.05–0.95

Target porosity

Polydisperse spheres (2D/3D / binary)

Mean radius (px)

8

2–60

Mean of the normal radius distribution

Radius spread

2.0

0.1–20

Standard deviation of the radius distribution

Porosity

0.6

0.1–0.95

Target porosity

Random spheres (RSA) (2D/3D / binary)

Radius (px)

6

1–60

Sphere radius; random sequential adsorption, non-overlapping

Clearance (px)

0

0–20

Minimum gap between spheres

Lattice spheres packing (2D/3D / binary)

Radius (px)

6

1–60

Sphere radius

Lattice

sc

sc / tri / fcc / bcc

Lattice type: simple cubic / triangular / face-centred / body-centred

Fiber / cylinder network (3D / binary)

Fiber radius (px)

3

1–30

Fiber radius

Number of fibers

30

1–500

Number of fibers

Out-of-plane spread (deg)

0

0–90

Maximum out-of-plane angle

In-plane spread (deg)

90

0–90

Maximum in-plane direction angle

Microstructure

Generator (dims / output)

Parameter

Default

Range

Description

Voronoi grain edges (2D/3D / binary)

Number of cells

30

2–2000

Number of Voronoi cells

Edge radius (px)

1

0–10

Thickening radius of the grain edges

Voronoi grains (label map) (2D/3D / label)

Number of grains

40

2–5000

Grain count; the output is an integer label map 1–N

Sierpinski foam (fractal) (2D/3D / binary)

Iterations

4

1–6

Fractal iterations (with the bundled porespy 2.4.2, at most 6 take effect in 2D and 4 in 3D)

Random Cantor dust (fractal) (2D/3D / binary)

Iterations

5

1–8

Fractal iterations

Keep probability

0.5

0.1–0.95

Probability of keeping a sub-block per subdivision

Cells & Blobs

Generator (dims / output)

Parameter

Default

Range

Description

Binary blobs (cells) (2D/3D / binary)

Volume fraction

0.3

0.05–0.9

Foreground volume fraction

Blob size fraction

0.1

0.02–0.5

Typical blob size relative to the image

Fluorescence spots / nuclei (2D/3D / float)

Number of spots

40

1–5000

Number of random point sources

Spot radius (px)

4.0

0.5–40

Gaussian blur radius (spot size)

Background noise

0.02

0–0.5

Added Gaussian background noise level

Test Patterns

Generator (dims / output)

Parameter

Default

Range

Description

Gradient ramp (2D/3D / float)

Axis

x

x / y / z

Direction of the grayscale ramp

Checkerboard (2D/3D / float)

Square size (px)

16

2–256

Checker square side length

Sinusoidal grating (2D/3D / float)

Wavelength (px)

20.0

2–512

Wavelength of the sinusoidal stripes

Angle (deg)

0.0

0–180

Stripe orientation angle

Siemens star (2D / float)

Spokes

36

4–200

Number of star spokes

Concentric rings (2D/3D / float)

Ring spacing (px)

12.0

2–256

Spacing between concentric rings

8. Output

Each run produces one new Dragonfly Channel, published automatically into the current session's data list:

  • Name — <Channel name> - <generator name>, e.g. Synthetic - Checkerboard;
  • Data type — always 32-bit float (float32). Binary generators use 255 for foreground and 0 for background; the label map (Voronoi grains) uses integer labels 1..N; noise / phantom / pattern generators produce continuous float values (mostly in 0–1);
  • Geometry — the voxel spacing is the panel's Voxel spacing value (same on all axes), origin (0,0,0); 2D results are imported as a single-slice (Z=1) Channel;
  • Viewing — treat it like any Channel in Dragonfly: drop it into 2D / 3D views, adjust window levelling, apply a LUT (recommended for binary / label results), render it, or feed it into segmentation / measurement workflows.

The panel additionally shows a mid-slice grayscale preview (auto-normalised for display), and the log reports details such as vmin / vmax (also written to results.json in the job folder). Intermediate files (synth_output.npy etc.) stay in the synth_ job folder in the system temp directory and never touch the Dragonfly project; clean the temp directory manually if desired.

To turn a binary result into an ROI for further processing, threshold the Channel in Dragonfly (foreground is 255, so any threshold between 0 and 255 works).

9. FAQ and Troubleshooting

Q1: I cannot find Prototype Apps ▸ Create Synthetic Images... in the menu.

A: Confirm that Create Synthetic Images is enabled in Prototype Apps ▸ App Store, then restart Dragonfly.

Q2: The Engine row says `Dragonfly Python not found (run inside Dragonfly).` and Generate reports `could not locate Dragonfly's Python`.

A: The panel is not running inside Dragonfly, or Dragonfly's bundled Python_env\python.exe could not be resolved. The plugin must be used as a Dragonfly menu item — open it from the Prototype Apps menu.

Q3: Generation failed — how do I find out why?

A: On failure the status line shows Failed: <reason> and the log box prints the subprocess's error category, message and traceback. For more detail, inspect runner_stdout.log and status.json inside the synth_ job folder in the system temp directory. The most common cause is an output size too large for the available memory — reduce X / Y / Z and retry.

Q4: Large 3D generation is slow or ends with `processing timed out`.

A: A single run is capped at 30 minutes, after which it is terminated. The porespy-based generators (e.g. polydisperse spheres, fiber networks) are computationally heavy at large volumes; validate parameters at a moderate size such as 128×128×64 first, then scale up. Memory use is about 4 bytes per voxel (float32) — a 1024³ volume needs roughly 4 GB — so size accordingly.

Q5: The same parameters give different results on two runs.

A: Check that the Seed is the same. All random generators (noise, spots, sphere packings, Voronoi, Cantor dust, ...) are driven by the seed; identical parameters + seed + size give a pixel-identical result. Deterministic patterns (checkerboard, gradient, Siemens star, ...) ignore the seed.

Q6: A binary result looks all black or all white in the view.

A: Binary outputs contain only the values 0 and 255 — adjust the window levelling or apply a LUT. For the label map (Voronoi grains) a colour LUT is recommended to distinguish grains.

Q7: Increasing Iterations for the Sierpinski foam does not make the image finer.

A: With the porespy 2.4.2 bundled in Dragonfly, this generator effectively supports at most 6 iterations in 2D and 4 in 3D (the result is then resampled to the requested size). Higher values do not fail, but add no further detail — this is a limitation of the bundled library version.

10. Notes and Known Limitations

  • Output is always a float32 Channel: binary results are stored as 0 / 255, label maps as integer-valued floats; the plugin does not create ROI / MultiROI objects directly — threshold the result if you need one;
  • Voxel spacing is isotropic (one value for X / Y / Z); per-axis spacing is not supported, and the origin is fixed at (0,0,0);
  • 2D results are imported as single-slice Channels (Z=1);
  • The panel has no dedicated cancel button: the Generate button is disabled while a job runs, and a job ends when it finishes, hits the 30-minute timeout, or the panel is closed (closing terminates the subprocess);
  • The UI allows sizes up to 8192×8192×4096, far beyond typical memory — choose sizes to match your machine (4 bytes per voxel, float32);
  • porespy version differences: the plugin adapts its calls to both the bundled porespy 2.4.2 and newer releases; a few generators (Sierpinski foam, Cantor dust) may generate on a library-preferred grid first and resample to the requested size under 2.4.2, which can leave slight interpolation marks at block edges;
  • Intermediate .npy files remain in the system temp directory and are cleaned up by the operating system's temp mechanisms; nothing is written into the Dragonfly project folder.

11. References

  • PoreSpy (MIT licence) — engine for the porous-media and particle generators: https://porespy.org ; citation: Gostick et al., 2019, Journal of Open Source Software, doi:10.21105/joss.01296;
  • scikit-image (BSD licence) — Shepp-Logan phantom and binary blobs: https://scikit-image.org ;
  • numpy / scipy (BSD licence) — shapes, patterns, Voronoi grains, fluorescence spots and the fBm fractal noise;
  • Shepp, L.A. & Logan, B.F., 1974 — original publication of the Shepp-Logan CT phantom.
You’ve reached the end of this manual.Explore the library →

PROTOTYPE APPS

Manual assistant

Find an app, understand a parameter, or follow a workflow. Answers include links to the manuals.

Questions and answers are saved long-term to your account. You and site administrators can view them; they may be reviewed to improve the product. Do not submit passwords or confidential data.

All models share a daily allowance. Larger models use more. Chat pauses at the daily protection limit; manual search remains available.

Search the manuals

Cloudflare AI receives your question, recent conversation and relevant public manual excerpts. Records are stored privately in Cloudflare R2 without automatic expiry. Check the cited manual before acting on an answer.