Skip to content

Commit

Permalink
Merge pull request dipy#3316 from jhlegarreta/CiteRefsThroughSphinxco…
Browse files Browse the repository at this point in the history
…ntribBibtex2

DOC: Cite code base references using `sphinxcontrib-bibtex`
  • Loading branch information
skoudoro authored Aug 27, 2024
2 parents e9140f8 + 872d8b7 commit 2a87689
Show file tree
Hide file tree
Showing 81 changed files with 1,998 additions and 2,726 deletions.
17 changes: 7 additions & 10 deletions dipy/align/bundlemin.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ cdef cnp.dtype f64_dt = np.dtype(np.float64)

cdef double min_direct_flip_dist(double *a,double *b,
cnp.npy_intp rows) noexcept nogil:
r""" Minimum of direct and flip average (MDF) distance [Garyfallidis12]
between two streamlines.
r""" Minimum of direct and flip average (MDF) distance between two
streamlines.
See :footcite:p:`Garyfallidis2012a` for a definition of the distance.
Parameters
----------
Expand All @@ -41,9 +43,7 @@ cdef double min_direct_flip_dist(double *a,double *b,
References
----------
.. [Garyfallidis12] Garyfallidis E. et al., QuickBundles a method for
tractography simplification, Frontiers in Neuroscience,
vol 6, no 175, 2012.
.. footbibliography::
"""

cdef:
Expand Down Expand Up @@ -275,14 +275,11 @@ def _bundle_minimum_distance_asymmetric(double [:, ::1] static,
distance metric. This means that we are weighting only one direction of the
registration. Not both directions. This can be very useful when we want
to register a big set of bundles to a small set of bundles.
See [Wanyan17]_.
See :footcite:p:`Wanyan2017`.
References
----------
.. [Wanyan17] Wanyan and Garyfallidis, Important new insights for the
reduction of false positives in tractograms emerge from streamline-based
registration and pruning, International Society for Magnetic Resonance in
Medicine, Honolulu, Hawai, 2017.
.. footbibliography::
"""

Expand Down
75 changes: 23 additions & 52 deletions dipy/align/crosscorr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def precompute_cc_factors_3d(floating[:, :, :] static,
Pre-computes the separate terms of the cross correlation metric and image
norms at each voxel considering a neighborhood of the given radius to
efficiently compute the gradient of the metric with respect to the
deformation field [Ocegueda2016]_ [Avants2008]_ [Avants2011]_.
deformation field :footcite:p:`Ocegueda2016`, :footcite:p:`Avants2008`,
:footcite:p:`Avants2009`.
Parameters
----------
Expand All @@ -160,16 +161,7 @@ def precompute_cc_factors_3d(floating[:, :, :] static,
References
----------
.. [Ocegueda2016]_ Ocegueda, O., Dalmau, O., Garyfallidis, E., Descoteaux,
M., & Rivera, M. (2016). On the computation of integrals over
fixed-size rectangles of arbitrary dimension, Pattern Recognition
Letters. doi:10.1016/j.patrec.2016.05.008
.. [Avants2008]_ Avants, B. B., Epstein, C. L., Grossman, M., & Gee, J. C.
(2008). Symmetric Diffeomorphic Image Registration with
Cross-Correlation: Evaluating Automated Labeling of Elderly and
Neurodegenerative Brain, Med Image Anal. 12(1), 26-41.
.. [Avants2011]_ Avants, B. B., Tustison, N., & Song, G. (2011). Advanced
Normalization Tools (ANTS), 1-35.
.. footbibliography::
"""
cdef:
cnp.npy_intp ns = static.shape[0]
Expand Down Expand Up @@ -358,8 +350,9 @@ def compute_cc_forward_step_3d(floating[:, :, :, :] grad_static,
r"""Gradient of the CC Metric w.r.t. the forward transformation
Computes the gradient of the Cross Correlation metric for symmetric
registration (SyN) [Avants2008]_ w.r.t. the displacement associated to
the moving volume ('forward' step) as in [Avants2011]_
registration (SyN) :footcite:p:`Avants2008` w.r.t. the displacement
associated to the moving volume ('forward' step) as in
:footcite:t:`Avants2009`.
Parameters
----------
Expand All @@ -382,12 +375,7 @@ def compute_cc_forward_step_3d(floating[:, :, :, :] grad_static,
References
----------
.. [Avants2008]_ Avants, B. B., Epstein, C. L., Grossman, M., & Gee, J. C.
(2008). Symmetric Diffeomorphic Image Registration with
Cross-Correlation: Evaluating Automated Labeling of Elderly and
Neurodegenerative Brain, Med Image Anal. 12(1), 26-41.
.. [Avants2011]_ Avants, B. B., Tustison, N., & Song, G. (2011). Advanced
Normalization Tools (ANTS), 1-35.
.. footbibliography::
"""
cdef:
cnp.npy_intp ns = grad_static.shape[0]
Expand Down Expand Up @@ -430,8 +418,9 @@ def compute_cc_backward_step_3d(floating[:, :, :, :] grad_moving,
r"""Gradient of the CC Metric w.r.t. the backward transformation
Computes the gradient of the Cross Correlation metric for symmetric
registration (SyN) [Avants08]_ w.r.t. the displacement associated to
the static volume ('backward' step) as in [Avants11]_
registration (SyN) :footcite:p:`Avants2008`. w.r.t. the displacement
associated to the static volume ('backward' step) as in
:footcite:t:`Avants2009`.
Parameters
----------
Expand All @@ -454,12 +443,7 @@ def compute_cc_backward_step_3d(floating[:, :, :, :] grad_moving,
References
----------
[Avants08]_ Avants, B. B., Epstein, C. L., Grossman, M., & Gee, J. C. (2008)
Symmetric Diffeomorphic Image Registration with
Cross-Correlation: Evaluating Automated Labeling of Elderly and
Neurodegenerative Brain, Med Image Anal. 12(1), 26-41.
[Avants11]_ Avants, B. B., Tustison, N., & Song, G. (2011).
Advanced Normalization Tools (ANTS), 1-35.
.. footbibliography::
"""
ftype = np.asarray(grad_moving).dtype
cdef:
Expand Down Expand Up @@ -503,9 +487,9 @@ def precompute_cc_factors_2d(floating[:, :] static, floating[:, :] moving,
r"""Precomputations to quickly compute the gradient of the CC Metric
Pre-computes the separate terms of the cross correlation metric
[Avants2008]_ and image norms at each voxel considering a neighborhood of
the given radius to efficiently [Avants2011]_ compute the gradient of the
metric with respect to the deformation field.
:footcite:p:`Avants2008` and image norms at each voxel considering a
neighborhood of the given radius to efficiently compute the gradient of the
metric with respect to the deformation field :footcite:p:`Avants2009`.
Parameters
----------
Expand All @@ -529,12 +513,7 @@ def precompute_cc_factors_2d(floating[:, :] static, floating[:, :] moving,
References
----------
.. [Avants2008]_ Avants, B. B., Epstein, C. L., Grossman, M., & Gee, J. C.
(2008). Symmetric Diffeomorphic Image Registration with
Cross-Correlation: Evaluating Automated Labeling of Elderly and
Neurodegenerative Brain, Med Image Anal. 12(1), 26-41.
.. [Avants2011]_ Avants, B. B., Tustison, N., & Song, G. (2011). Advanced
Normalization Tools (ANTS), 1-35.
.. footbibliography::
"""
ftype = np.asarray(static).dtype
cdef:
Expand Down Expand Up @@ -677,8 +656,9 @@ def compute_cc_forward_step_2d(floating[:, :, :] grad_static,
r"""Gradient of the CC Metric w.r.t. the forward transformation
Computes the gradient of the Cross Correlation metric for symmetric
registration (SyN) [Avants2008]_ w.r.t. the displacement associated to
the moving image ('backward' step) as in [Avants2011]_
registration (SyN) :footcite:p:`Avants2008` w.r.t. the displacement
associated to the moving image ('backward' step) as in
:footcite:t:`Avants2009`.
Parameters
----------
Expand All @@ -704,12 +684,7 @@ def compute_cc_forward_step_2d(floating[:, :, :] grad_static,
References
----------
.. [Avants2008]_ Avants, B. B., Epstein, C. L., Grossman, M., & Gee, J. C.
(2008). Symmetric Diffeomorphic Image Registration with
Cross-Correlation: Evaluating Automated Labeling of Elderly and
Neurodegenerative Brain, Med Image Anal. 12(1), 26-41.
.. [Avants2011]_ Avants, B. B., Tustison, N., & Song, G. (2011). Advanced
Normalization Tools (ANTS), 1-35.
.. footbibliography::
"""
cdef:
cnp.npy_intp nr = grad_static.shape[0]
Expand Down Expand Up @@ -750,8 +725,9 @@ def compute_cc_backward_step_2d(floating[:, :, :] grad_moving,
r"""Gradient of the CC Metric w.r.t. the backward transformation
Computes the gradient of the Cross Correlation metric for symmetric
registration (SyN) [Avants2008]_ w.r.t. the displacement associated to
the static image ('forward' step) as in [Avants2011]_
registration (SyN) :footcite:p:`Avants2008` w.r.t. the displacement
associated to the static image ('forward' step) as in
:footcite:t:`Avants2009`.
Parameters
----------
Expand All @@ -770,12 +746,7 @@ def compute_cc_backward_step_2d(floating[:, :, :] grad_moving,
References
----------
.. [Avants2008]_ Avants, B. B., Epstein, C. L., Grossman, M., & Gee, J. C.
(2008). Symmetric Diffeomorphic Image Registration with
Cross-Correlation: Evaluating Automated Labeling of Elderly and
Neurodegenerative Brain, Med Image Anal. 12(1), 26-41.
.. [Avants2011]_ Avants, B. B., Tustison, N., & Song, G. (2011). Advanced
Normalization Tools (ANTS), 1-35.
.. footbibliography::
"""
ftype = np.asarray(grad_moving).dtype
cdef:
Expand Down
48 changes: 18 additions & 30 deletions dipy/align/expectmax.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -359,13 +359,14 @@ def compute_em_demons_step_2d(floating[:,:] delta_field,
floating[:,:,:] out):
r"""Demons step for EM metric in 2D
Computes the demons step [Vercauteren09] for SSD-driven registration
( eq. 4 in [Vercauteren09] ) using the EM algorithm [Arce14] to handle
multi-modality images.
Computes the demons step :footcite:p:`Vercauteren2009` for SSD-driven
registration ( eq. 4 in :footcite:p:`Vercauteren2009` ) using the EM
algorithm :footcite:p:`ArceSantana2014` to handle multi-modality images.
In this case, $\sigma_i$ in eq. 4 of [Vercauteren] is estimated using the EM
algorithm, while in the original version of diffeomorphic demons it is
estimated by the difference between the image values at each pixel.
In this case, $\sigma_i$ in eq. 4 of :footcite:p:`Vercauteren2009` is
estimated using the EM algorithm, while in the original version of
diffeomorphic demons it is estimated by the difference between the image
values at each pixel.
Parameters
----------
Expand All @@ -385,7 +386,7 @@ def compute_em_demons_step_2d(floating[:,:] delta_field,
the gradient of the moving image
sigma_sq_x : float
parameter controlling the amount of regularization. It corresponds to
$\sigma_x^2$ in algorithm 1 of Vercauteren et al.[2]
$\sigma_x^2$ in algorithm 1 of :footcite:p:`Vercauteren2009`
out : array, shape (R, C, 2)
the resulting demons step will be written to this array
Expand All @@ -399,14 +400,7 @@ def compute_em_demons_step_2d(floating[:,:] delta_field,
References
----------
[Arce14] Arce-santana, E., Campos-delgado, D. U., & Vigueras-g, F. (2014).
Non-rigid Multimodal Image Registration Based on the
Expectation-Maximization Algorithm, (168140), 36-47.
[Vercauteren09] Vercauteren, T., Pennec, X., Perchant, A., & Ayache, N.
(2009). Diffeomorphic demons: efficient non-parametric
image registration. NeuroImage, 45(1 Suppl), S61-72.
doi:10.1016/j.neuroimage.2008.10.040
.. footbibliography::
"""
cdef:
cnp.npy_intp nr = delta_field.shape[0]
Expand Down Expand Up @@ -455,13 +449,14 @@ def compute_em_demons_step_3d(floating[:,:,:] delta_field,
floating[:,:,:,:] out):
r"""Demons step for EM metric in 3D
Computes the demons step [Vercauteren09] for SSD-driven registration
( eq. 4 in [Vercauteren09] ) using the EM algorithm [Arce14] to handle
multi-modality images.
Computes the demons step :footcite:p:`Vercauteren2009` for SSD-driven
registration ( eq. 4 in :footcite:p:`Vercauteren2009` ) using the EM
algorithm :footcite:p:`ArceSantana2014` to handle multi-modality images.
In this case, $\sigma_i$ in eq. 4 of [Vercauteren09] is estimated using
the EM algorithm, while in the original version of diffeomorphic demons
it is estimated by the difference between the image values at each pixel.
In this case, $\sigma_i$ in eq. 4 of :footcite:p:`Vercauteren2009` is
estimated using the EM algorithm, while in the original version of
diffeomorphic demons it is estimated by the difference between the image
values at each pixel.
Parameters
----------
Expand All @@ -481,7 +476,7 @@ def compute_em_demons_step_3d(floating[:,:,:] delta_field,
the gradient of the moving image
sigma_sq_x : float
parameter controlling the amount of regularization. It corresponds to
$\sigma_x^2$ in algorithm 1 of Vercauteren et al.[2].
$\sigma_x^2$ in algorithm 1 of footcite:p:`Vercauteren2009`.
out : array, shape (S, R, C, 2)
the resulting demons step will be written to this array
Expand All @@ -495,14 +490,7 @@ def compute_em_demons_step_3d(floating[:,:,:] delta_field,
References
----------
[Arce14] Arce-santana, E., Campos-delgado, D. U., & Vigueras-g, F. (2014).
Non-rigid Multimodal Image Registration Based on the
Expectation-Maximization Algorithm, (168140), 36-47.
[Vercauteren09] Vercauteren, T., Pennec, X., Perchant, A., & Ayache, N.
(2009). Diffeomorphic demons: efficient non-parametric
image registration. NeuroImage, 45(1 Suppl), S61-72.
doi:10.1016/j.neuroimage.2008.10.040
.. footbibliography::
"""
cdef:
cnp.npy_intp ns = delta_field.shape[0]
Expand Down
16 changes: 5 additions & 11 deletions dipy/align/imaffine.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
mapping points in the codomain to points in the domain.
ParzenJointHistogram: computes the marginal and joint distributions of
intensities of a pair of images, using Parzen windows [Parzen62]
with a cubic spline kernel, as proposed by Mattes et al. [Mattes03].
It also computes the gradient of the joint histogram w.r.t. the
parameters of a given transform.
intensities of a pair of images, using Parzen windows
:footcite:p:`Parzen1962` with a cubic spline kernel, as proposed by
:footcite:t:`Mattes2003`. It also computes the gradient of the joint
histogram w.r.t. the parameters of a given transform.
MutualInformationMetric: computes the value and gradient of the mutual
information metric the way `Optimizer` needs them. That is, given
Expand All @@ -33,13 +33,7 @@
References
----------
[Parzen62] E. Parzen. On the estimation of a probability density
function and the mode. Annals of Mathematical Statistics,
33(3), 1065-1076, 1962.
[Mattes03] Mattes, D., Haynor, D. R., Vesselle, H., Lewellen, T. K.,
& Eubank, W. PET-CT image registration in the chest using
free-form deformations. IEEE Transactions on Medical
Imaging, 22(1), 120-8, 2003.
.. footbibliography::
"""

Expand Down
Loading

0 comments on commit 2a87689

Please sign in to comment.