Implement volume-rendering for patient-data on iOS. Direct volume rendering, projection modes, and multi-planar reconstruction on iOS using SceneKit + Metal.
This fork extends the original sample with enhanced projection pipelines, tri-planar multi-planar reconstruction (MPR), and optional DICOM loading through GDCM.
- Metal Shader (Graphic)
- SceneKit (Scene Graph)
- Metal fragment ray-marching for DVR/MIP/MinIP/AIP
- Optional GDCM bridge for native DICOM series loading
- Snapshot helpers for debugging transfer functions and volume slices
- Sample volumes are included in the app bundle under
VolumeRendering-iOS/Resource/Images/chest.raw.zip(Int16 signed LE)head.raw.zip(Int16 signed LE)
- Transfer Functions (TF) in
VolumeRendering-iOS/Resource/TransferFunction/ct_arteries.tf,ct_entire.tf,ct_lung.tf
- DICOM: when GDCM libraries are linked (see below),
.dcmseries and zipped folders can be imported at runtime
- Rendering Modes: Direct Volume Rendering (DVR), Surface, Maximum Intensity Projection (MIP), Minimum Intensity Projection (MinIP), Average Intensity Projection (AIP)
- Projection Enhancements: optional transfer function application, HU windowing, and min/max/mean slab thickness controls
- Tri-planar MPR: simultaneous axial/coronal/sagittal reconstructions with draggable crosshairs, slab thickness control, oblique rotation, and shared 1D transfer function
- Transfer Function 1D: shared between DVR and MPR with presets for common CT windows
- Empty-space skipping (conservative) for DVR performance
- Snapshot helpers for exporting volume slices and transfer function textures during development
- Thales Matheus Mendonça Santos — refined MinIP, AIP, and DVR pipelines, and implemented the tri-planar MPR workflow with optional GDCM-based DICOM integration.
You should set git-lfs setting.
Because raw data file is so bigger than supported in git.
install git-lfs first,
brew install git-lfsand set git lfs on in your local
git-lfs installand pull lfs from server
git lfs pull- Open the Xcode project
VolumeRendering-iOS.xcodeproj. - Select a device (prefer iPhone 15 Pro Max) and run.
- Build GDCM for iOS (static libs or an XCFramework). A simple path is to use CMake with the iOS toolchain or to reuse prebuilt binaries from your toolchain.
- Copy the resulting headers and libraries into
Vendor/GDCM/includeandVendor/GDCM/librespectively. The Xcode target already adds these locations to the header and library search paths. - Add the required static libraries (for example
libgdcmCommon,libgdcmMSFF,libexpat,libz,libopenjp2,libcharls) to Link Binary With Libraries. If you use an.xcframework, drop it in the folder and drag it into Xcode. - Run the app, tap Import DICOM, and select a
.zip, folder, or file representing a series. When GDCM is not linked, the importer gracefully reports that the native loader is unavailable.
| Surface Rendering | Direct Volume Rendering | Maximum Intensity Projection |
|---|---|---|
![]() |
![]() |
![]() |
surface rendring
direct volume rendering
maximum intensity projection
| CT-Coronary-Arteries | CT-Chest-Entire | CT-Lung |
|---|---|---|
![]() |
![]() |
![]() |
CT-Coronary-Arteries
CT-Chest-Entire
CT-Lung
| Lighting Off | Lighting On |
|---|---|
![]() |
![]() |
Lighting Off
Lighting On
- This project is based on
Unity Volume Rendering(mlavik1/UnityVolumeRendering). See upstream for original license. - All new code in this repository is released under the Apache License 2.0 (
LICENSE).
- Performance metrics depend on device; baseline validation targets iPhone 15 Pro Max.
- Some presets may require TF shift adjustments for best visual results.
- Large RAW datasets require Git LFS; ensure
git lfs pullcompleted successfully.











