From f2b847de4796c13195b78a40f51796eb55dd99b3 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Wed, 28 May 2025 16:41:34 +0200 Subject: [PATCH 1/7] -skull option --- docs/command.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/command.rst b/docs/command.rst index 8992554..77af2a2 100644 --- a/docs/command.rst +++ b/docs/command.rst @@ -74,7 +74,8 @@ mandatory parameters * ``_4animal`` : will use bet4animal (FSL) for brain extraction, for faster computation (by default atlas_brex is used) * ``_quick`` : will use hd-bet (Deep Learning) for brain extraction, for faster computation (by default atlas_brex is used) - **NB: ** hd-bet requires a specific version of macapype/skullTo3d, not available by default + +**NB:** hd-bet requires a specific version of macapype/skullTo3d, not available by default This option should be used if the coregistration to template in preparation is not performed correctly: @@ -87,7 +88,11 @@ mandatory parameters * ``_noseg`` (at the end) will perform data preparation and brain extraction (no segmentation) **Some options are specific to skullTo3d:** - * ``_skull`` after SPM or ANTS if you want to process skull or angio *specific to skullTo3d*; otherwise the main pipelines of macapype will be launched (only brain segmentation will be performed) **NB : ** ``_skullnoisypetra`` instead of ``_skull`` available for macaque with issues on petra + * ``_skull`` after SPM or ANTS if you want to process skull or angio *specific to skullTo3d*; otherwise the main pipelines of macapype will be launched (only brain segmentation will be performed) + +**NB :** ``_skullnoisypetra`` instead of ``_skull`` available for macaque with issues on petra +**NB :** ``-soft skull`` without processing brain is possible, but is still experimental. It only works if ``-skull_dt CT petra`` and -deriv -padback are NOT defined + * ``_noskullmask`` (at the end) will perform realignement to stereo and headmask (only realignement for CT) * ``_noheadmask`` (at the end) will perform only realignement to stereo From 555cbe2217b8881adc0b4962d6beb5f346730edf Mon Sep 17 00:00:00 2001 From: David Meunier Date: Wed, 28 May 2025 16:46:52 +0200 Subject: [PATCH 2/7] NB --- docs/command.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/command.rst b/docs/command.rst index 77af2a2..db4820d 100644 --- a/docs/command.rst +++ b/docs/command.rst @@ -75,7 +75,7 @@ mandatory parameters * ``_4animal`` : will use bet4animal (FSL) for brain extraction, for faster computation (by default atlas_brex is used) * ``_quick`` : will use hd-bet (Deep Learning) for brain extraction, for faster computation (by default atlas_brex is used) -**NB:** hd-bet requires a specific version of macapype/skullTo3d, not available by default + **NB:** hd-bet requires a specific version of macapype/skullTo3d, not available by default This option should be used if the coregistration to template in preparation is not performed correctly: @@ -88,10 +88,12 @@ mandatory parameters * ``_noseg`` (at the end) will perform data preparation and brain extraction (no segmentation) **Some options are specific to skullTo3d:** + * ``_skull`` after SPM or ANTS if you want to process skull or angio *specific to skullTo3d*; otherwise the main pipelines of macapype will be launched (only brain segmentation will be performed) -**NB :** ``_skullnoisypetra`` instead of ``_skull`` available for macaque with issues on petra -**NB :** ``-soft skull`` without processing brain is possible, but is still experimental. It only works if ``-skull_dt CT petra`` and -deriv -padback are NOT defined + **NB :** ``_skullnoisypetra`` instead of ``_skull`` available for macaque with issues on petra + + **NB :** ``-soft skull`` without processing brain is possible, but is still experimental. It only works if ``-skull_dt CT petra`` and -deriv -padback are NOT defined * ``_noskullmask`` (at the end) will perform realignement to stereo and headmask (only realignement for CT) * ``_noheadmask`` (at the end) will perform only realignement to stereo From cf0f16e150eb602f880544af63a610279be3c0af Mon Sep 17 00:00:00 2001 From: David Meunier Date: Wed, 28 May 2025 16:52:47 +0200 Subject: [PATCH 3/7] `` --- docs/command.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/command.rst b/docs/command.rst index db4820d..4c8a472 100644 --- a/docs/command.rst +++ b/docs/command.rst @@ -93,7 +93,7 @@ mandatory parameters **NB :** ``_skullnoisypetra`` instead of ``_skull`` available for macaque with issues on petra - **NB :** ``-soft skull`` without processing brain is possible, but is still experimental. It only works if ``-skull_dt CT petra`` and -deriv -padback are NOT defined + **NB :** ``-soft skull`` without processing brain is possible, but is still experimental. It only works if ``-skull_dt CT petra`` and ``-deriv`` and ``-padback`` are NOT defined * ``_noskullmask`` (at the end) will perform realignement to stereo and headmask (only realignement for CT) * ``_noheadmask`` (at the end) will perform only realignement to stereo From e5f807c71201300e9ed1d6d40ec3020b5f2131c3 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Wed, 28 May 2025 17:13:33 +0200 Subject: [PATCH 4/7] | --- docs/command.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/command.rst b/docs/command.rst index 4c8a472..2b12162 100644 --- a/docs/command.rst +++ b/docs/command.rst @@ -77,16 +77,22 @@ mandatory parameters **NB:** hd-bet requires a specific version of macapype/skullTo3d, not available by default +| + This option should be used if the coregistration to template in preparation is not performed correctly: * ``_robustreg`` (at the end) to have a more robust registration (in two steps) +| + Finally, these option are available (to place after SPM or ANTS) and will modify the parameters but can be launched in sequence: * ``_test`` : (at the end) to check if the full pipeline is coherent (will only generate the graph.dot and graph.png) * ``_prep`` (at the end) will perform data preparation (no brain extraction and segmentation) * ``_noseg`` (at the end) will perform data preparation and brain extraction (no segmentation) +| + **Some options are specific to skullTo3d:** * ``_skull`` after SPM or ANTS if you want to process skull or angio *specific to skullTo3d*; otherwise the main pipelines of macapype will be launched (only brain segmentation will be performed) From 9524aa781cb3f8e033f76c432976e82d19bd3e89 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Wed, 10 Dec 2025 10:30:08 +0100 Subject: [PATCH 5/7] Tips and tricks --- docs/index.rst | 3 +++ docs/tips_tricks.rst | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 docs/tips_tricks.rst diff --git a/docs/index.rst b/docs/index.rst index 7781d30..c6c2202 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -43,6 +43,8 @@ See :ref:`Commands ` for a description on the avalaible command paramet If ``-deriv``` is provided, see :ref:`Derivatives ` for a descrition of the outputs +Also, check `Tips and Tricks ` on how to format images to improve quality of registration between images and segmentation + Table of contents ****************** @@ -57,6 +59,7 @@ Table of contents derivatives params indiv_params + tips_tricks diff --git a/docs/tips_tricks.rst b/docs/tips_tricks.rst new file mode 100644 index 0000000..7d8fded --- /dev/null +++ b/docs/tips_tricks.rst @@ -0,0 +1,44 @@ +.. _tips_tricks: + +Tips and tricks +*************** + +CT images registration to MRI (be it T1w or T2w) can be somehow tricky. + +Here a few tricks: + +Reorientation can help +###################### + +The -orient LPS corresponds to the direction where the increasing numbers are pointing at (typically RAS in radiological convention) and take the opposite directions (special AFNI...). + +If you want to exchange to axis, change "target" letters accordingly +RPI -> RIP + +If you want to revert one dimension, be careful to modify another axis: +RPI -> RPS becomes LPS to exchange I by S, and good R-L dimension as well + +.. code:: bash + + $ 3drefit -orient LPS sub-Phoenix_ses-01_acq-CT_T2star.nii.gz + +Possibly followed by + +.. code:: bash + + $ fslreorient2std sub-Phoenix_ses-01_acq-CT_T2star.nii.gz sub-Phoenix_ses-01_acq-CT_T2star_reorient.nii.gz + + +Cropping (both T1w et T2w) can help +################################### + +Include the full head for the CT image + +Be careful with Left-Right orientation +###################################### + +Most of the images in our center are acquired in the right direction, but with an encoding matching inverse Left-Right Encoding to the one that is coming out of the MRI + +.. code:: bash + + $ 3drefit -orient LPI sub-Rusty/ses-01/anat/sub-Rusty_ses-01_acq-CT_run-02_T2star.nii.gz From 79b1a60c0efaae3907e2e12c61c48e5089f3cebd Mon Sep 17 00:00:00 2001 From: David Meunier Date: Wed, 10 Dec 2025 10:38:18 +0100 Subject: [PATCH 6/7] ref --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index c6c2202..006acdb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -43,7 +43,7 @@ See :ref:`Commands ` for a description on the avalaible command paramet If ``-deriv``` is provided, see :ref:`Derivatives ` for a descrition of the outputs -Also, check `Tips and Tricks ` on how to format images to improve quality of registration between images and segmentation +Also, check :ref:`Tips and Tricks ` on how to format images to improve quality of registration between images and segmentation Table of contents From 83889f09c53fd3b78871833240a1b6be7b7c68f5 Mon Sep 17 00:00:00 2001 From: David Meunier Date: Wed, 10 Dec 2025 10:41:19 +0100 Subject: [PATCH 7/7] ___ --- docs/.indiv_params.rst.kate-swp | Bin 0 -> 77 bytes docs/tips_tricks.rst | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 docs/.indiv_params.rst.kate-swp diff --git a/docs/.indiv_params.rst.kate-swp b/docs/.indiv_params.rst.kate-swp new file mode 100644 index 0000000000000000000000000000000000000000..0dfe6e8dc7a6d7dcefa5bdd06c0860a77c8895e0 GIT binary patch literal 77 zcmZQzU=Z?7EJ;-eE>A2_aLdd|RWQ;sU|?VniR3wVbB^Upt&q<%q~_nctg~9hVn%Qf TP=*;K3&f(X!JbH5#&}l%Jtq<= literal 0 HcmV?d00001 diff --git a/docs/tips_tricks.rst b/docs/tips_tricks.rst index 7d8fded..a94c02d 100644 --- a/docs/tips_tricks.rst +++ b/docs/tips_tricks.rst @@ -1,7 +1,9 @@ +:orphan: + .. _tips_tricks: Tips and tricks -*************** +_______________ CT images registration to MRI (be it T1w or T2w) can be somehow tricky.