Skip to content

Integrate NIfTI overlay support#237

Open
erinaldidb wants to merge 15 commits into
mainfrom
feature/nifti_integration
Open

Integrate NIfTI overlay support#237
erinaldidb wants to merge 15 commits into
mainfrom
feature/nifti_integration

Conversation

@erinaldidb

@erinaldidb erinaldidb commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This PR addresses a key item on the roadmap by introducing native NIfTI (Neuroimaging Informatics Technology Initiative) integration into the Pixels solution accelerator. Previously focused on DICOM imaging datasets, this expansion allows the framework to scale, ingest, and process NIfTI data formats directly within the Databricks Data Intelligence Platform.

Key Changes

NIfTI Ingestion Pipeline: Extends Pixels' parallel processing framework to parse, read, and ingest NIfTI format imaging data (.nii / .nii.gz).

Metadata & Property Extraction: Enables seamless extraction of NIfTI-specific headers, dimensional properties, and coordinate information to map them into Delta Lake tables for fast, downstream Spark SQL metadata analytics.

Pipeline Enhancements: Introduces underlying utilities to cleanly handle, extract, and convert neuroimaging file streams alongside the existing DICOM processing architecture.

Example notebook available here: notebooks/nifti/IRCAD Sample Data Loader.ipynb
Sample file used: ircad_e01_package.tar.gz

image

erinaldidb added 11 commits June 3, 2026 17:35
- Introduced optional NIfTI segmentation table configuration in `app.yml` and `app-config.yml`.
- Implemented new API endpoints for fetching NIfTI overlay metadata and files.
- Updated handlers and query builders to support NIfTI overlay functionality.
- Enhanced documentation in the deployment notebook regarding NIfTI integration.
- Updated documentation to clarify feature gating based on pixels_table and NIFTI_SEGMENTATION_TABLE.
- Refactored table resolution logic to derive NIfTI table from pixels_table cookie or environment variable.
- Improved error handling for cases when no valid table configuration is available.
@erinaldidb
erinaldidb requested a review from dmoore247 July 8, 2026 13:07

@dmoore247 dmoore247 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please confirm PR has been a full install tested, end to end, starting from nothing.

Big question what happens if feature is on (by default) and NIFTI_SEGMENTATION table is not loaded. Possible 404 error.

WHERE study_instance_uid = %(study)s
AND series_instance_uid = %(series)s
AND (status IS NULL OR status <> 'archived')
ORDER BY version DESC NULLS LAST, created_at DESC

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No limit to # rows returned. The client has a limit of 25?

WHERE study_instance_uid = %(study)s
AND series_instance_uid = %(series)s
AND id = %(id)s
LIMIT 1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No order by so it is indeterministic as to which one would be returned.

valueFrom: "sql_warehouse"
- name: "DATABRICKS_PIXELS_TABLE"
value: "{PIXELS_TABLE}"
- name: "NIFTI_SEGMENTATION_TABLE"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On by default, chance that upon fresh deploy, code will hit 404 until is populated.

@dmoore247 dmoore247 added the enhancement New feature or request label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants