Skip to content

Repository files navigation

MTK

MTK is now a core-only Swift package for medical volume rendering. It ships:

  • MTKCore for volume data, Metal rendering, presentation passes, export, and MPR/transfer-function primitives.
  • MTKFixtures for reusable test and rendering fixtures.

Screenshots

Example integrations using MTKCore. The host application UI shown is not shipped as part of this package.

3D volume rendering with MTKCore Multiplanar reconstruction with MTKCore

What is included

  • VolumeDataset as the stable input contract
  • Metal-native rendering, MTLTexture frames, PresentationPass, and MPRPresentationPass
  • CGImage export and snapshot/readback helpers
  • Transfer functions, volume pipeline helpers, and clinical geometry/picking
  • Loaders and adapters that stay inside the core rendering contract

What is not included

  • No shipped product UI module
  • No demo app
  • No SwiftUI, UIKit, or AppKit product surface
  • No external bridge package

Installation

dependencies: [
    .package(url: "https://github.com/ThalesMMS/MTK.git", from: "1.0.0")
]

Then depend on:

.product(name: "MTKCore", package: "MTK")
.product(name: "MTKFixtures", package: "MTK")

Core flow

The package contract ends at frames and textures:

VolumeDataset -> loader/transform -> GPU textures -> render passes -> PresentationPass / MPRPresentationPass -> MTLTexture or explicit CGImage export.

Testing

cd MTK && swift build
cd MTK && swift test
cd MTK && swift build -c release

About

Swift Package for Metal-native medical volume rendering and SwiftUI clinical viewports. Provides MTKCore/MTKUI surfaces for GPU-resident volume, MPR, projections, overlays, transfer functions, and reusable imaging UI.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages