Skip to content

Commit 371298b

Browse files
committed
Local updates before syncing with online
1 parent 413cc17 commit 371298b

9 files changed

Lines changed: 107 additions & 28 deletions

File tree

FEDI/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = '1.0.0'
1+
__version__ = '1.0.1'
22

build/lib/FEDI/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = '1.0.0'
1+
__version__ = '1.0.1'
22

documentation/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
project = 'FEDI'
66
copyright = '2024, Snoussi'
77
author = 'Haykel Snoussi'
8-
release = '0.1'
9-
version = '0.1.0'
8+
release = '1.0.1'
9+
version = '1.0.1'
1010

1111
# -- General configuration ---------------------------------------------------
1212

1.99 MB
Loading
1.62 MB
Loading

documentation/source/workflows/fod_starts.rst

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,70 +3,77 @@
33
FOD Estimation with Spherical CNNs
44
===================================
55

6-
**Fiber Orientation Distribution (FOD) Estimation** is a critical step in diffusion MRI analysis that enables accurate white matter tractography and microstructural characterization. The ``fedi_dmri_fod`` tool implements a rotationally equivariant Spherical Convolutional Neural Network (sCNN) framework specifically optimized for neonatal dMRI data.
6+
**Fiber Orientation Distribution (FOD) Estimation** enables accurate white matter tractography and microstructural characterization. The ``fedi_dmri_fod`` tool implements a rotationally equivariant Spherical Convolutional Neural Network (sCNN) framework optimized for neonatal dMRI data.
77

8-
For full methodological and validation details, refer to the following publication:
8+
For full methodological and validation details, refer to:
99

1010
`Snoussi and Karimi, 2025 – Equivariant spherical CNNs for accurate fiber orientation distribution estimation in neonatal diffusion MRI with reduced acquisition time <https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2025.1604545/full>`__
1111

1212
Overview
1313
--------
1414

15-
The ``fedi_dmri_fod`` tool addresses a key challenge in neonatal dMRI: accurately estimating FODs from data acquired with reduced gradient directions (30% of full protocol), enabling faster and more cost-effective acquisitions while maintaining high-quality results.
15+
The ``fedi_dmri_fod`` tool accurately estimates FODs from data acquired with reduced gradient directions (30% of full protocol), enabling faster acquisitions while maintaining high-quality results.
1616

1717
Key Features
1818
------------
1919

20-
- **Reduced Acquisition Time**: Achieves accurate FOD estimation using only 30% of the full gradient direction protocol
21-
- **Rotational Equivariance**: The spherical CNN architecture respects the rotational symmetry of diffusion signals
22-
- **Neonatal-Optimized**: Trained and validated on 43 neonatal dMRI datasets from the Developing Human Connectome Project (dHCP)
23-
- **Pretrained Model**: Uses a pretrained model automatically downloaded from Hugging Face Hub
24-
- **Multi-Shell Support**: Works with multi-shell dMRI data (typically b-values: 400, 1000, 2600 s/mm²)
20+
- **Reduced Acquisition Time**: Accurate FOD estimation using only 30% of the full gradient direction protocol
21+
- **Rotational Equivariance**: Respects the rotational symmetry of diffusion signals
22+
- **Neonatal-Optimized**: Trained on 43 neonatal dMRI datasets from the Developing Human Connectome Project (dHCP)
23+
- **Pretrained Model**: Automatically downloaded from Hugging Face Hub
24+
- **Multi-Shell Support**: Works with multi-shell dMRI data (b-values: 400, 1000, 2600 s/mm²)
2525

2626
Methodology
2727
-----------
2828

29-
The tool implements a spherical CNN that converts multi-shell dMRI signals to spherical harmonic (SH) coefficients, applies rotationally equivariant convolutions on the sphere, and outputs SH coefficients representing the FOD. The model architecture leverages the rotational symmetry of diffusion signals, ensuring that rotations of the input signal result in corresponding rotations of the predicted FOD.
30-
29+
The tool converts multi-shell dMRI signals to spherical harmonic (SH) coefficients, applies rotationally equivariant convolutions, and outputs SH coefficients representing the FOD.
3130

3231
Performance and Validation
3332
---------------------------
3433

35-
The spherical CNN approach has been validated against Multi-Layer Perceptron (MLP) baseline and Hybrid-CSD ground truth. The sCNN significantly outperforms MLP and produces FODs and tractography that are quantitatively comparable and qualitatively highly similar to Hybrid-CSD, despite using only 30% of the full acquisition data.
34+
The sCNN significantly outperforms Multi-Layer Perceptron (MLP) and produces FODs and tractography that are quantitatively comparable and qualitatively highly similar to Hybrid-CSD ground truth, despite using only 30% of the full acquisition data.
3635

3736
Results and Visualizations
3837
---------------------------
3938

40-
The following figures from the publication demonstrate the effectiveness of the spherical CNN approach for FOD estimation in neonatal dMRI.
39+
.. only:: html
4140

42-
.. note::
41+
.. image:: fod_figures/Figure1.jpg
42+
:width: 100%
43+
:align: center
4344

44-
Figures from Snoussi and Karimi (2025) will be added to the ``fod_figures/`` directory.
45+
**Figure 1.** Representative FODs from a test subject. (Left column) FODs estimated by the MLP using the full dHCP dataset. (Middle column) FODs estimated by the sCNN using 30% of the diffusion directions. (Right column) Ground truth FODs estimated using Hybrid-CSD with the full dHCP dataset. The sCNN produces FODs that are visually much more similar to the ground truth than the MLP.
4546

46-
Example figure structure (to be added):
47+
.. only:: latex
48+
49+
\begin{figure}[htbp]
50+
\centering
51+
\includegraphics[width=\textwidth]{fod_figures/Figure1.jpg}
52+
\caption{Representative FODs from a test subject. (Left column) FODs estimated by the MLP using the full dHCP dataset. (Middle column) FODs estimated by the sCNN using 30\% of the diffusion directions. (Right column) Ground truth FODs estimated using Hybrid-CSD with the full dHCP dataset. The sCNN produces FODs that are visually much more similar to the ground truth than the MLP.}
53+
\end{figure}
4754

4855
.. only:: html
4956

50-
.. image:: fod_figures/FigureX.png
57+
.. image:: fod_figures/Figure2.jpg
5158
:width: 100%
5259
:align: center
5360

54-
**Figure 1.** [Description of FOD estimation results]
61+
**Figure 2.** Representative tractography results. (Left) Tractogram generated using MLP-predicted FODs. (Middle) Tractogram generated using sCNN-predicted FODs. (Right) Tractogram generated using ground truth FODs (Hybrid-CSD).
5562

5663
.. only:: latex
5764

5865
\begin{figure}[htbp]
5966
\centering
60-
\includegraphics[width=\textwidth]{fod_figures/FigureX.pdf}
61-
\caption{[Description of FOD estimation results]}
67+
\includegraphics[width=\textwidth]{fod_figures/Figure2.jpg}
68+
\caption{Representative tractography results. (Left) Tractogram generated using MLP-predicted FODs. (Middle) Tractogram generated using sCNN-predicted FODs. (Right) Tractogram generated using ground truth FODs (Hybrid-CSD).}
6269
\end{figure}
6370

6471
Accessing the FOD Estimation Code
6572
----------------------------------
6673

67-
The FOD estimation functionality is implemented in ``fedi_dmri_fod`` (see :ref:`fedi_dmri_fod`), with the model implementation in ``FEDI/models/pytorch/models.py`` (``SphericalCNN_FOD_Neonatal`` class). The pretrained model is automatically downloaded from Hugging Face Hub (``feditoolbox/scnn_neonatal_fod_estimation``) on first use.
74+
The FOD estimation functionality is implemented in ``fedi_dmri_fod`` (see :ref:`fedi_dmri_fod`), with the model in ``FEDI/models/pytorch/models.py`` (``SphericalCNN_FOD_Neonatal`` class). The pretrained model is automatically downloaded from Hugging Face Hub (``feditoolbox/scnn_neonatal_fod_estimation``).
6875

6976
Integration with HAITCH Pipeline
7077
----------------------------------
7178

72-
The ``fedi_dmri_fod`` tool can be used as part of the HAITCH pipeline (STEP 10) for FOD estimation after motion and distortion correction. For more information about the HAITCH pipeline, see :ref:`haitch_starts`.
79+
The ``fedi_dmri_fod`` tool can be used as part of the HAITCH pipeline (STEP 10) for FOD estimation after motion and distortion correction. For more information, see :ref:`haitch_starts`.

fedi.egg-info/PKG-INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.4
22
Name: fedi
3-
Version: 1.0.0
3+
Version: 1.0.1
44
Author: Haykel Snoussi
55
Author-email: dr.haykel.snoussi@gmail.com
66
License: MIT

fedi.egg-info/SOURCES.txt

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,47 @@ requirements.txt
88
setup.py
99
.github/CODEOWNERS
1010
FEDI/__init__.py
11+
FEDI/HAITCH/LICENSE
12+
FEDI/HAITCH/README.md
13+
FEDI/HAITCH/dMRI_HAITCH.sh
1114
FEDI/HAITCH/dMRI_HAITCH_browser.sh
15+
FEDI/HAITCH/dMRI_HAITCH_local-config.sh
16+
FEDI/HAITCH/user_config.sh
17+
FEDI/HAITCH/fetal_tract/5tt_key.csv
18+
FEDI/HAITCH/fetal_tract/adjust_parcellation.py
19+
FEDI/HAITCH/fetal_tract/advanced_fetal_tractography.py
20+
FEDI/HAITCH/fetal_tract/create_ctx_wm.py
21+
FEDI/HAITCH/fetal_tract/crl_fetal_parcellation_ACT.qry
22+
FEDI/HAITCH/fetal_tract/crl_fetal_parcellation_NON_ACT.qry
23+
FEDI/HAITCH/fetal_tract/extract_labels.py
24+
FEDI/HAITCH/fetal_tract/fivett_gen.py
25+
FEDI/HAITCH/fetal_tract/get_max_min_streamline.py
26+
FEDI/HAITCH/fetal_tract/get_node_coordinates.r
27+
FEDI/HAITCH/fetal_tract/labelkey.csv
28+
FEDI/HAITCH/fetal_tract/tensor2odf.py
29+
FEDI/HAITCH/fetal_tract/tract_angles.csv
30+
FEDI/HAITCH/fetal_tract/tract_viz_utils.py
31+
FEDI/HAITCH/fetal_tract/utils.py
32+
FEDI/HAITCH/refs/HAITCH_scheme_dual_echo_sequence.dvs
33+
FEDI/HAITCH/refs/acq_parameters_dMRI_scan.txt
34+
FEDI/HAITCH/src/FEDI_multi_voxel.py
35+
FEDI/HAITCH/src/FEDI_shm.py
36+
FEDI/HAITCH/src/FEDI_shore.py
37+
FEDI/HAITCH/src/Rotate_bvecs_flirt_mat.sh
38+
FEDI/HAITCH/src/applytransform.sh
39+
FEDI/HAITCH/src/convert_dcm2niix.py
40+
FEDI/HAITCH/src/create_grad5cls_index.py
41+
FEDI/HAITCH/src/dMRI_conversion.sh
42+
FEDI/HAITCH/src/dicom_conversion.py
43+
FEDI/HAITCH/src/display_name.sh
44+
FEDI/HAITCH/src/dwiregistration.sh
45+
FEDI/HAITCH/src/outlierdetection.py
46+
FEDI/HAITCH/src/rotate_bvecs_ants.py
47+
FEDI/HAITCH/src/segm_outliers.py
48+
FEDI/HAITCH/src/segment_fetalbrain.sh
49+
FEDI/HAITCH/src/shorerecon.py
50+
FEDI/HAITCH/src/update_bvecs_bvals.py
51+
FEDI/HAITCH/src/weights2figure.py
1252
FEDI/models/__init__.py
1353
FEDI/models/common/__init__.py
1454
FEDI/models/common/loss_functions.py
@@ -35,6 +75,35 @@ FEDI/pipelines/HAITCH/src/segment_fetalbrain.sh
3575
FEDI/pipelines/HAITCH/src/shorerecon.py
3676
FEDI/pipelines/HAITCH/src/update_bvecs_bvals.py
3777
FEDI/pipelines/HAITCH/src/weights2figure.py
78+
FEDI/pipelines/HAITCH1.0/README.md
79+
FEDI/pipelines/HAITCH1.0/dMRI_HAITCH.sh
80+
FEDI/pipelines/HAITCH1.0/dMRI_HAITCH_browser.sh
81+
FEDI/pipelines/HAITCH1.0/dMRI_HAITCH_local-config.sh
82+
FEDI/pipelines/HAITCH1.0/refs/acq_parameters_dMRI_scan.txt
83+
FEDI/pipelines/HAITCH1.0/src/Rotate_bvecs_flirt_mat.sh
84+
FEDI/pipelines/HAITCH1.0/src/applytransform
85+
FEDI/pipelines/HAITCH1.0/src/create_grad5cls_index.py
86+
FEDI/pipelines/HAITCH1.0/src/dicom_conversion.py
87+
FEDI/pipelines/HAITCH1.0/src/display_name.sh
88+
FEDI/pipelines/HAITCH1.0/src/dwiregistration
89+
FEDI/pipelines/HAITCH1.0/src/outlierdetection.py
90+
FEDI/pipelines/HAITCH1.0/src/rotate_bvecs_ants.py
91+
FEDI/pipelines/HAITCH1.0/src/segm_outliers.py
92+
FEDI/pipelines/HAITCH1.0/src/segment_fetalbrain.sh
93+
FEDI/pipelines/HAITCH1.0/src/shorerecon.py
94+
FEDI/pipelines/HAITCH1.0/src/update_bvecs_bvals.py
95+
FEDI/pipelines/HAITCH1.0/src/weights2figure.py
96+
FEDI/pipelines/HAITCH2.0/README.md
97+
FEDI/pipelines/HAITCH2.0/dMRI_HAITCH.sh
98+
FEDI/pipelines/HAITCH2.0/dMRI_HAITCH_browser.sh
99+
FEDI/pipelines/HAITCH2.0/dMRI_HAITCH_local-config.sh
100+
FEDI/pipelines/HAITCH2.0/refs/acq_parameters_dMRI_scan.txt
101+
FEDI/pipelines/HAITCH2.0/src/README.md
102+
FEDI/pipelines/HAITCH2.0/src/create_grad5cls_index.py
103+
FEDI/pipelines/HAITCH2.0/src/display_name.sh
104+
FEDI/pipelines/HAITCH2.0/src/segm_outliers.py
105+
FEDI/pipelines/HAITCH2.0/src/segment_fetalbrain.sh
106+
FEDI/pipelines/HAITCH2.0/src/update_bvecs_bvals.py
38107
FEDI/sampling_scheme/HAITCH_scheme_dual_echo_sequence.dvs
39108
FEDI/sampling_scheme/HAITCH_scheme_siemens_product_sequence.dvs
40109
FEDI/scripts/__init__.py
@@ -64,6 +133,7 @@ documentation/pyproject.toml
64133
documentation/requirements.txt
65134
documentation/source/Big_FEDI.png
66135
documentation/source/Focus_FEDI.png
136+
documentation/source/Focus_FEDI_old.png
67137
documentation/source/api.rst
68138
documentation/source/conf.py
69139
documentation/source/conf_origin.py
@@ -72,7 +142,6 @@ documentation/source/references.rst
72142
documentation/source/_static/Focus_FEDI.png
73143
documentation/source/developer_section/starts.rst
74144
documentation/source/generated/FEDI.rst
75-
documentation/source/getting_started/assocc_diseases.rst
76145
documentation/source/getting_started/starts.rst
77146
documentation/source/installation/before_install.rst
78147
documentation/source/installation/package_install.rst
@@ -88,6 +157,7 @@ documentation/source/modules/commands/fedi_dmri_rotate_bvecs.rst
88157
documentation/source/modules/commands/fedi_dmri_snr.rst
89158
documentation/source/modules/commands/fedi_testing.rst
90159
documentation/source/modules/commands/run.sh
160+
documentation/source/workflows/fod_starts.rst
91161
documentation/source/workflows/haitch_starts.rst
92162
documentation/source/workflows/haitch_figures/Figure5.pdf
93163
documentation/source/workflows/haitch_figures/Figure5.png
@@ -101,6 +171,8 @@ fedi.egg-info/dependency_links.txt
101171
fedi.egg-info/entry_points.txt
102172
fedi.egg-info/requires.txt
103173
fedi.egg-info/top_level.txt
174+
scripts/README_BUILD.md
175+
scripts/build_and_upload.sh
104176
scripts/download_models.sh
105177
testing/README.md
106178
testing/example_Transform_v1_0GenericAffine.mat

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='fedi',
5-
version='1.0.0',
5+
version='1.0.1',
66
packages=find_packages(include=['FEDI', 'FEDI.*']),
77
install_requires=[
88
'numpy',

0 commit comments

Comments
 (0)