https://github.com/benoitberanger/openrecon-ants
Perform ANTs transformations using OpenRecon
https://github.com/benoitberanger/openrecon-ants
Last synced: 3 months ago
JSON representation
Perform ANTs transformations using OpenRecon
- Host: GitHub
- URL: https://github.com/benoitberanger/openrecon-ants
- Owner: benoitberanger
- License: mit
- Created: 2024-09-03T11:53:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T11:23:21.000Z (over 1 year ago)
- Last Synced: 2025-07-31T10:17:44.791Z (10 months ago)
- Language: Python
- Homepage:
- Size: 2.42 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# openrecon-ants
## Screenshots from the MR Host
Siemens 7T Terra.X in XA60A.
Also tested on Siemens 3T Cima.X on XA61(-SP01)
## Brainmasking, Debias, Denoise

_Sequence_: Non-selective 3D SPACE.
_From left to right_: Original, brain mask (SynthStrip), N4BiasFieldCorrection (ANTs) in brain mask, DenoiseImage (ANTs) in brain mask after N4BiasFieldCorrection.
_From top to bottom_: 3D FLAIR with Circular Polarization (CP), 3D FLAIR with Universal Pulses (UP), 3D DIR with UP.
[ANTs](https://github.com/ANTsX/ANTs) using [ANTsPy](https://github.com/ANTsX/ANTsPy) in OpenRecon.
Brain masking is performed by [SynthStrip](https://surfer.nmr.mgh.harvard.edu/docs/synthstrip/)
## SkullStripping

_Sequence_: Angio TOF
_From left to right_: Original, SkullStripped using brainmask from Synthstrip, N4BiasFieldCorrection, DenoiseImage
_From top to bottom_: SAG MIP, COR MIP, TRA MIP
# Features
This OR performs ANTs image operations :
- N4BiasFieldCorrection
- DenoiseImage
- N4BiasFieldCorrection then DenoiseImage (default)
- DenoiseImage then N4BiasFieldCorrection
- None (only for brain masking / skull stripping)
Brain mask usage :
- Apply ANTs in brainmask (keep outside the mask intact)
- Skull stripping then ANTs (keep only in mask)
- None (only ANTs, no masking)
There is an option, a checkbox, to **save original images** and intermediate images. (default is _True_)
Based on https://github.com/benoitberanger/openrecon-template
# Build
Requirements for building :
- python **3.12**
- jsonschema
Python environment manager is **strongly** recomanded :
```bash
conda create --name openrecon-ants
conda install python=3.12
pip install jsonschema
```
Build with :
```bash
python build.py
```
# Offline test and dev
Python modules :
- ismrmrd
- pydicom
- pynetdicom
- antspyx
- torch
- surfa
``` bash
pip install ismrmrd pydicom pynetdicom antspyx torch surfa
```
Follow guidelines in https://github.com/benoitberanger/openrecon-template
# TODO
- Add fields in the UI to tune `N4BiasFieldCorrection` and `DenoiseImage`
- Add fields in the UI to tune the mask (erode ? delate ? ...)