Ebrains Sibra Atlas Tool & DICOM Prepocessor #3
Open
tamara-kostova wants to merge 8 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
agents/sibra_tool.py- SiibraAtlasTool wrappingsiibra-python(Julich-Brain v2.9). Takes the SAM3 binary mask centroid, converts pixel coordinates to MNI152 mm (via NIfTI affine → DICOM header → pixel fallback), and queries the EBRAINS probabilistic atlas to assign the lesion to a named cytoarchitectonic region (e.g. "Frontal-I (GapMap) left") with probability scores.agents/dicom_tool.py- DICOMPreprocessor that accepts a single .dcm slice or a full series directory, normalises pixel arrays to PNG (ready for CNN/MedGemma), selects the representative mid-slice from multi-slice series, and extracts DICOM header metadata (ImagePositionPatient, PixelSpacing, etc.) injected into NeuroimagingState.serialised in FHIR output. NeuroimagingState extended with atlas_enrichment,
dicom_metadata, anddicom_pathfields.utils/convert_h5.py- BraTS2020 h5-to-PNG+NIfTI converter. Stacks per-slice h5 files into a 3D volume with the known BraTS MNI152 affine, auto-selects the slice with most tumour content.tests/test_atlas_enrichment.py- Standalone test for the atlas node; supports PNG-only, PNG+NIfTI, PNG+DICOM inputs and--outputflag to save result JSON.