Volume rendering and isosurface extraction of two scientific datasets, using VTK and PyQt5.
The two datasets:
vmhead2is a CT scan of a human head.jet_vortis the vorticity magnitude of a turbulent jet flame.
There are four scripts, one for each dataset/technique combination.
| Script | What it does |
|---|---|
dvr_head.py |
Direct volume rendering of the head. The transfer function pulls three tissue layers out of the same scalar field: skin around value 550, muscle near 1100, skull near 1450. Raising opacity at each range isolates a layer or composites them together. |
dvr_flame.py |
Direct volume rendering of the jet vorticity field, with a colorbar overlay. |
salient_head.py |
Three nested isosurfaces of the head, each at a tissue boundary. |
salient_flame.py |
Five stacked isosurfaces of the vorticity field, colored by scalar value. |
Each script opens a PyQt5 window with an embedded VTK render view.
Python 3, plus the two packages in requirements.txt:
pip install -r requirements.txt
Then from the repo root:
python src/dvr_head.py
python src/dvr_flame.py
python src/salient_head.py
python src/salient_flame.py
The scripts locate their .vti file relative to themselves, so the working directory doesn't matter. Pass -r <w> <h> if you want a different render window size from the 1024x768 default.
.
├── src/ the four scripts
├── Datasets/ .vti volume datasets (small + large variants of each)
└── docs/screenshots/ example renders
Renderings of the vmhead2 CT scan and jet_vort simulation datasets.
Same scalar field, three different opacity settings. Skin sits around scalar value 550, muscle around 1100, skull around 1450. Adjusting opacity at each range reveals one layer or composites them all.
![]() |
![]() |
![]() |
| Skin and bone composited. | Opacity raised on the skull range only. | Skull visible through translucent skin. |
![]() |
![]() |
| One isosurface near the middle of the vorticity range. | Multiple isosurfaces stacked, colored by vorticity. |




