{"id":50365580,"url":"https://github.com/thalesmms/mtk-demo","last_synced_at":"2026-05-30T04:00:48.154Z","repository":{"id":321137239,"uuid":"1084636471","full_name":"ThalesMMS/MTK-Demo","owner":"ThalesMMS","description":"MTK Library and DICOM-Decoder demonstration","archived":false,"fork":false,"pushed_at":"2026-05-18T19:32:33.000Z","size":51531,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T21:45:40.916Z","etag":null,"topics":["dicom","ios","macos","medical-imaging","metal","mtk","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThalesMMS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-28T00:27:57.000Z","updated_at":"2026-05-18T19:33:03.000Z","dependencies_parsed_at":"2025-10-28T02:39:53.772Z","dependency_job_id":"1c38253a-7772-4eec-94b2-6ed41618caa3","html_url":"https://github.com/ThalesMMS/MTK-Demo","commit_stats":null,"previous_names":["thalesmms/mtk-demo"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ThalesMMS/MTK-Demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThalesMMS%2FMTK-Demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThalesMMS%2FMTK-Demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThalesMMS%2FMTK-Demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThalesMMS%2FMTK-Demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThalesMMS","download_url":"https://codeload.github.com/ThalesMMS/MTK-Demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThalesMMS%2FMTK-Demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33679306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dicom","ios","macos","medical-imaging","metal","mtk","swift"],"created_at":"2026-05-30T04:00:19.661Z","updated_at":"2026-05-30T04:00:48.139Z","avatar_url":"https://github.com/ThalesMMS.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MTK Demo (iOS)\nSwiftUI reference viewer for the official MTK clinical path. The demo uses the public `ClinicalViewportSession` contract, one shared `VolumeResourceHandle`, four `MetalViewportSurface` instances, and explicit `TextureSnapshotExporter` readback only for user-requested export.\n\n\u003ctable align=\"center\"\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cb\u003e3D Volume Rendering\u003c/b\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cb\u003eMPR View\u003c/b\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"screenshots/screenshot1.PNG\" width=\"300\" alt=\"3D Volume Rendering\" /\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"screenshots/screenshot2.PNG\" width=\"300\" alt=\"MPR View\" /\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Features\n- Fixed 2x2 `ClinicalViewportGrid`: axial, coronal, sagittal, and one volume/projection viewport.\n- Shared dataset upload: all four panes reuse the same `VolumeResourceHandle`.\n- Metal-native presentation only: interactive frames stay as `MPRTextureFrame` or `VolumeRenderFrame` until `PresentationPass`.\n- Explicit snapshot/export: `TextureSnapshotExporter` is called only from the export button.\n- HUD: render, presentation, upload, memory, and conditional snapshot readback timing.\n- DICOM import: `DicomVolumeDatasetImporter` converts the pure-Swift `DICOM-Decoder` output into an MTK `VolumeDataset`.\n- CT + PET fusion: import a CT volume, then add a PT series as a DICOM-backed PET layer with SUV cursor/ROI values, per-layer opacity, visibility, and source-over/additive blend controls.\n\n## User-visible reference workflows\n- DICOM import into the 2x2 clinical grid: choose a supported local series, convert it through `MTKDicomBridge`, and inspect axial, coronal, sagittal, and 3D views backed by one shared volume resource.\n- Snapshot/export from rendered texture output: use the explicit export action; interactive viewport rendering remains texture-backed and readback happens only for the requested snapshot.\n- CT plus PET fusion: import a CT series, add the registered PT series as a scalar layer, then compare SUV-aware cursor/ROI values with layer visibility, opacity, and blend mode controls.\n- Feature parity diagnostics: open the in-app feature parity page to inspect codec, clinical-object, network, and demo-workflow availability without exposing imported subject data or local fixture paths.\n\n## Project layout\n- `Source/` — SwiftUI views, clinical-grid integration, and DICOM loading helpers.\n- `Resource/TransferFunction/` — CT/MR presets consumed at runtime.\n- `Examples/MTK_Integration_Example.swift` — Reference-only integration sample for the MTK APIs (not part of the shipping UI).\n- `MTK-DemoTests/` — Tests for transfer functions, histograms, DICOM loading, and integration with MTKCore.\n\n## Requirements\n- Xcode 16, iOS 17+ deployment target.\n- Metal-capable device or Apple Silicon simulator; GPU-dependent tests check this requirement and skip when Metal is absent.\n- MTK package is consumed from GitHub (https://github.com/ThalesMMS/MTK.git) at version 1.1.1.\n- DICOM import is provided by DICOM-Decoder from GitHub (https://github.com/ThalesMMS/DICOM-Decoder.git) at version 1.2.1 through MTKDicomBridge and direct DicomCore integration.\n\n## Running the app\n1. Open `MTK-Demo.xcodeproj`; Swift Package Manager resolves MTK and DICOM-Decoder from their GitHub repositories.\n2. Select `iPhone 17 Pro Max (26.5)` or `iPad Pro 13-inch (M5) (26.5)` for simulator verification.\n3. Build and run. If DICOM import cannot load a study, the import UI surfaces a descriptive error and does not treat the study as loaded.\n4. For viewport-path investigation and regression debugging, see `DEBUGGING.md`.\n\n## DICOM fixtures and tests\n- Tests expect sample assets under `MTK-Demo/DICOM_Example/` (e.g., `dicom_series_example.zip` from `sample_dicom/b.zip`, and optionally `dicom_slice_example.dcm`). Missing fixtures cause skips.\n- The app path uses `DICOM-Decoder` through `MTKDicomBridge`. Unit tests may inject `VolumeDatasetImporting` stubs for UI-state coverage, but the demo does not expose runtime loader switching.\n\n## Notes on MTK integration\n- `ClinicalViewportSession` is the demo's public viewer contract. It owns the shared clinical grid implementation and exposes stable viewport IDs, surfaces, debug snapshots, render mode, timing, and snapshot export entrypoints.\n- `ClinicalViewportGrid(session:)` is the reference SwiftUI layout for the public clinical session contract.\n- The demo does not expose legacy 3D wrappers, compatibility paths, or `CGImage`-backed interactive presentation paths.\n- The demo requires Metal for rendering. Baseline Metal ray marching is the primary rendering path; MPS empty-space acceleration is an optional enhancement on supported devices.\n- Multi-volume fusion uses the DICOM Frame of Reference UID plus preserved volume geometry for the initial CT/PT layer alignment. 3D rendering still expects render-compatible scalar layer texture space; MPR picking and overlays use each layer's DICOM geometry.\n- Transfer function presets can be extended by adding `.tf` files to `Resource/TransferFunction/` with matching bundle paths in tests and runtime loaders.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthalesmms%2Fmtk-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthalesmms%2Fmtk-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthalesmms%2Fmtk-demo/lists"}