Quickstart¶
Goal¶
Use this page when you want the shortest path to a successful AutoFlow run.
Install¶
Full local install for GUI, automatic segmentation, and tests:
CLI-only install:
Both normal and editable installs include the bundled nnUNet final checkpoint and its required metadata. The gui extra installs both the GUI and nnUNet inference dependencies; there is no separate automatic-segmentation extra.
To enable the optional SpatioTemporal Labeler v0.4.0 exchange workflow, initialize the pinned source submodule and install its extra:
Known working test environment in this repo:
~/miniconda3/envs/ryy/bin/python -m pytest tests/test_smoke_phantoms.py tests/test_pressure_gradient_phantom.py -q
Run One H5 Case From The CLI¶
What this does:
- load data
- generate skeleton
- generate graph
- generate planes
- calculate plane metrics
- only run PWV, WSS, TKE, or pressure gradient when requested
- only export videos when requested
Typical outputs under ./results/demo/<case_name>/:
- multi-group H5 files create one output folder per H5 data-group path, for example
stem__StudyA_Series1 planes.jsonplanes.h5plane_positions.jsonplane_metrics.jsonplane_qc.jsonquality_report.jsonsummary.json- source H5
segmaskis updated in place for reuse, plus*_auto_segmentation.nii.gzand*_auto_segmentation_feature_*.nii.gzwhen auto segmentation runs on an H5 input
Run One DICOM Root From The CLI¶
Open The GUI¶
Typical GUI flow:
File > Open H5orFile > Import DICOM Directory- inspect the case in the 3D view and ortho viewer
- if needed, choose or generate segmentation
- click
Run All - inspect planes, metrics, and derived volumes
Run From Python¶
from autoflow import AutoFlowConfig, run_batch
config = AutoFlowConfig(
inputs=["./data/demo_data.h5"],
output_dir="./results/demo",
)
results, last_case_out = run_batch(config)
Common First Steps¶
Batch planes by distance¶
autoflow-run ./data/demo_data.h5 \
--output-dir ./results/demo \
--plane-mode distance \
--cross-section-dist 15 \
--start-dist 5 \
--end-dist 0
Default center fixed-step planes¶
Generated planes default to three symmetric planes at 25% of the usable
centerline length on either side of the center (fixed_step, center, both).
The segmentation filter is enabled by default; disable it with
--no-segmentation-filter when working with a binary mask.
Auto segmentation when no segmentation is present¶
Opt in to extra metrics and videos¶
autoflow-run ./data/demo_data.h5 \
--output-dir ./results/demo \
--with pwv,wss,tke,pg,vortex \
--video plane,wss,tke,pg
vortex computes whole-volume vorticity, Q-criterion, and swirling strength. It is not a plane-video family, so it is intentionally omitted from --video.