OSCR

Diffusion tensor imaging in chronic tension-type headache.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 122 lines · 3.3 KB · AGPL-3.0

  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # Copyright (c) 2020 Daisuke Matsuyoshi
  4. # Released under the GNU AGPLv3
  5. # https://opensource.org/licenses/AGPL-3.0
  6. """
  7. Calculate DTI-NODDI parameters
  8. """
  9. __author__ = "Daisuke Matsuyoshi @dicemt"
  10. import numpy as np
  11. from scipy import sqrt
  12. from scipy import special
  13. from scipy import optimize as opt
  14. def correct_md(bval, L1, L2, L3, MK = 1.0):
  15. MD = (L1 + L2 + L3) / 3.0
  16. # Eq.B11
  17. MD2 = (np.power(L1,2) + np.power(L2,2) + np.power(L3,2)) / 5.0 + 2.0 * (L1*L2 + L1*L3 + L2*L3) / 15.0
  18. # Eq.B12, Eq.5
  19. corrMD = MD + bval / 6.0 * MD2 * MK
  20. return(corrMD)
  21. def dti_fit(L1,L2,L3):
  22. MD = (L1+L2+L3)/3
  23. denom = np.sqrt( np.power((L1-MD),2) + np.power((L2-MD),2) + np.power((L3-MD),2) )
  24. numer = np.sqrt( np.power(L1,2) + np.power(L2,2) + np.power(L3,2) )
  25. FA = np.sqrt(1.5) * ( np.divide(denom, numer, out=np.zeros_like(denom), where=numer!=0) )
  26. return(FA,MD)
  27. def md2icvf(MD):
  28. dwm,dgm,_ = diff_parameters()
  29. # Eq.2; Lampinen (2017) Eq.27 icvf = 1.0 - sqrt(1 - 1.5 * (1 - MD/dwm))
  30. icvf = 1.0 - sqrt(0.5 * (3 * MD / dwm - 1.0))
  31. # Errorneous voxels
  32. erricvf = np.logical_or( icvf.real < 0.0 , np.isnan(icvf) )
  33. overicvf = (icvf.real >= 1.0)
  34. icvf[erricvf] = 0.0
  35. icvf[overicvf] = 1.0
  36. mask = np.logical_or( MD.real <= 0.0, np.isnan(MD) )
  37. icvf[mask] = 0.0
  38. return(icvf.real)
  39. def famd2tau(FA,MD):
  40. dwm,dgm,_ = diff_parameters()
  41. # Eq.3
  42. #tau = 1.0/3.0 * (1.0 + (4.0 / np.abs(dwm - MD))) * (FA * MD) / np.sqrt(3.0 - 2.0 * np.power(FA,2))
  43. tau = 1.0/3.0 * (1.0 + 4.0 * FA *(MD / np.abs(dwm-MD)) / np.sqrt(3.0 - 2.0 * np.power(FA,2)))
  44. # Errorneous voxels
  45. errtau = np.logical_or(tau.real <= 1.0/3.0, np.isnan(tau))
  46. overtau = np.logical_or(tau.real >= 1.0, np.abs(tau.imag) > 1e-10 )
  47. tau[errtau] = 0.0
  48. tau[overtau] = 1.0
  49. mask = np.logical_or(MD.real <= 0.0, np.isnan(MD))
  50. tau[mask] = 0.0
  51. return(tau.real)
  52. def tau2odi(tau):
  53. dwm,dgm,_ = diff_parameters()
  54. odi = np.zeros_like(tau)
  55. # Errorneous voxels
  56. errtau = np.logical_or(tau <(1.0/3.0), tau > 1.0)
  57. odi[errtau] = -1.0
  58. maintau = tau[~errtau]
  59. mainodi = np.zeros_like(maintau)
  60. for i in range(maintau.size):
  61. f = lambda x : kappa2tau(odi2kappa(x)) - maintau[i]
  62. try:
  63. mainodi[i] = opt.brentq(f, dwm, 1.0)
  64. except:
  65. mainodi[i] = 0
  66. odi[~errtau]=mainodi
  67. odi[errtau]=0 # Exclude again with zero
  68. print(tau.shape)
  69. odi = odi.reshape(tau.shape)
  70. return(odi)
  71. def kappa2tau(kappa):
  72. tau = np.zeros_like(kappa)
  73. outkappa = np.abs(kappa) < 1e-12
  74. # Eq.8 Zhang
  75. tau[~outkappa] = 0.5 * ( -1.0 / kappa[~outkappa] + 1.0 / (np.sqrt(kappa[~outkappa]) * dawson(np.sqrt(kappa[~outkappa]))) )
  76. tau[outkappa] = 1.0/3.0 # Lower limit
  77. return(tau)
  78. def dawson(x):
  79. # Abramowitz and Stegun (1972)
  80. a = 0.5 * np.sqrt(np.pi) * np.exp(-np.power(x,2)) * special.erfi(x)
  81. return(a)
  82. def odi2kappa(odi):
  83. kappa = np.max(1.0 / np.tan((odi*np.pi)/2.0),0)
  84. return(kappa)
  85. def kappa2odi(kappa):
  86. odi = 2.0 / np.pi * np.arctan(1.0/kappa)
  87. return(odi)
  88. def diff_parameters():
  89. dwm = 1.7e-3
  90. dgm = 1.1e-3
  91. diso = 3.0e-3
  92. return(dwm,dgm,diso)
  93. def isnumber(string):
  94. try:
  95. float(string)
  96. return True
  97. except ValueError:
  98. return False

dti_noddi.py at commit cb9cadd, under AGPL-3.0 · at the source

Overview

Authors: M. Teepker1,2, L. Vacik1, A. M. Hermsen3, K. Menzler1,4, V. Mylius1,5, L. Timmermann1, S. Knake1,4, M. Belke1
ORCID iDs: V. Mylius
  1. Department of Neurology, Philipps-University of Marburg, Marburg, Germany
  2. Hardtwaldklinik 1, Department of Neurology, Bad Zwesten, Germany
  3. Diakonie Kork, Epilepsy Center, Kehl-Kork, Germany
  4. LOEWE Research Cluster for Advanced Medical Physics in Imaging and Therapy (ADMIT), TH-Mittelhessen University of Applied Sciences, Giessen, Germany
  5. Department of Neurology, Center for Neurorehabilitation, Valens, Switzerland
Journal: Frontiers in pain research (Lausanne, Switzerland), volume 7, article 1850836
Dates: received 8 April 2026; accepted 9 June 2026; published online 1 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3389/fpain.2026.1850836 · PMID 42460409 · PMCID PMC13368757 · OpenAlex W7166798964
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), pain (population)
Methods: Connectivity, Statistics, fMRI & imaging
Keywords: AD, chronic tension-type headache, DTI, headache, microstructural changes, MRI, NODDI, RD
Topic: Migraine and Headache Studies (Psychiatry and Mental health, Medicine), according to OpenAlex
Citations: not cited yet (Europe PMC); 118 references in the paper

Abstract

Background: Tension-type headache (TTH) is the most common primary headache disorder and chronic tension-type headache (CTTH) is difficult to treat. Despite this clinical importance, the pathophysiology especially of CTTH remains unclear. Therefore, the aim of this study was to search for microstructural changes in CTTH to further evaluate the pathogenesis of CTTH.

Methods: Nine female patients suffering from CTTH and ten healthy controls matched by age and gender were included. All participants underwent a magnetic resonance imaging (MRI) scan with a diffusion tensor imaging (DTI) sequence. From the diffusion tensor the Fractional Anisotropy (FA), the Axial Diffusivity (AD), the Radial Diffusivity (RD), the NODDI parameters, the Orientation Dispersion Index (ODI), and the Neurite Density Index (NDI) were calculated.

Results: Microstructural changes were found in the right cerebellum, tectum, right occipital fusiform gyrus, left inferior temporal gyrus, left cingulate gyrus (anterior and posterior devision), right thalamic radiation, right lateral occipital cortex (inferior division), left cerebellum, left insular cortex, left precuneous, left central opercular cortex, left inferior frontal gyrus, left middle temporal gyrus, right middle temporal gyrus, left middle frontal gyrus, right postcentral gyrus, left superior longitudinal fasciculus, and the right paracingulate gyrus.

Conclusions: Patients suffering from CTTH had microstructural changes in multiple brain areas. Those were related to brain regions that belong to or interact with the pain matrix, trigeminal system or association fibers.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above.

dicemt/DTI-NODDI

License: AGPL-3.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: cb9cadd0f7c20d5cb2083aa5f9f8c14c13a9cd58, 4 December 2024
Languages: Python (3)
Size: 6 files, 3 scripts
Software Heritage: not archived
Found in: the text, “MRI processing”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (2 files), DIPY (1 file), NiBabel (1 file), SciPy (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
5 files

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 3 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability statement

The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 8 authors, 8 keywords, 117 references.

Cite

This paper

Teepker, M., Vacik, L., Hermsen, A. M., Menzler, K., Mylius, V., Timmermann, L., Knake, S., & Belke, M. (2026). Diffusion tensor imaging in chronic tension-type headache. Frontiers in pain research (Lausanne, Switzerland), 7, 1850836. https://doi.org/10.3389/fpain.2026.1850836

BibTeX

@article{teepker2026diffusion,
author = {Teepker, M. and Vacik, L. and Hermsen, A. M. and Menzler, K. and Mylius, V. and Timmermann, L. and Knake, S. and Belke, M.},
title = {{Diffusion tensor imaging in chronic tension-type headache}},
journal = {Frontiers in pain research (Lausanne, Switzerland)},
year = {2026},
month = jul,
volume = {7},
pages = {1850836},
publisher = {Frontiers Media SA},
issn = {2673-561X},
doi = {10.3389/fpain.2026.1850836},
url = {https://doi.org/10.3389/fpain.2026.1850836},
pmid = {42460409},
pmcid = {PMC13368757}
}

RIS

TY - JOUR
AU - Teepker, M.
AU - Vacik, L.
AU - Hermsen, A. M.
AU - Menzler, K.
AU - Mylius, V.
AU - Timmermann, L.
AU - Knake, S.
AU - Belke, M.
TI - Diffusion tensor imaging in chronic tension-type headache
T2 - Frontiers in pain research (Lausanne, Switzerland)
J2 - Front Pain Res (Lausanne)
PY - 2026
DA - 2026/07/01
VL - 7
SP - 1850836
SN - 2673-561X
PB - Frontiers Media SA
DO - 10.3389/fpain.2026.1850836
UR - https://doi.org/10.3389/fpain.2026.1850836
LA - en
ER -

CSL-JSON

{
"id": "10.3389/fpain.2026.1850836",
"type": "article-journal",
"title": "Diffusion tensor imaging in chronic tension-type headache",
"container-title": "Frontiers in pain research (Lausanne, Switzerland)",
"author": [
{
"family": "Teepker",
"given": "M."
},
{
"family": "Vacik",
"given": "L."
},
{
"family": "Hermsen",
"given": "A. M."
},
{
"family": "Menzler",
"given": "K."
},
{
"family": "Mylius",
"given": "V."
},
{
"family": "Timmermann",
"given": "L."
},
{
"family": "Knake",
"given": "S."
},
{
"family": "Belke",
"given": "M."
}
],
"container-title-short": "Front Pain Res (Lausanne)",
"volume": "7",
"page": "1850836",
"DOI": "10.3389/fpain.2026.1850836",
"PMID": "42460409",
"PMCID": "PMC13368757",
"ISSN": "2673-561X",
"publisher": "Frontiers Media SA",
"URL": "https://doi.org/10.3389/fpain.2026.1850836",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
1
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1162/nol.a.265 [code]
Structural Brain Correlates of Poor Reading Comprehension.
Journal: Neurobiology of language (Cambridge, Mass.)
In common: structural MRI / diffusion, 11 references
[2] doi:10.1162/imag.a.1303
Composite reaction time and variability correlate with whole-brain white-matter characteristics.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: structural MRI / diffusion, 9 references
[3] doi:10.3389/frai.2026.1771088 [code]
Few-shot deployment of pretrained MRI transformers in brain imaging tasks.
Journal: Frontiers in artificial intelligence
In common: NiBabel, SciPy, NumPy, structural MRI / diffusion, 6 references
[4] doi:10.1038/s41598-026-39162-7 [code]
White matter microstructure differences in obstructive sleep apnea severity groups assessed by diffusion tensor metrics and biophysical modeling.
Journal: Scientific reports
In common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 4 references
[5] doi:10.1002/nbm.70277 [code]
Hierarchical Bayesian Modelling Improves Microstructural Parameter Mapping in Diffusion and Exchange MRI Data.
Journal: NMR in biomedicine
In common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 3 references
[6] doi:10.1162/imag.a.1366 [code]
MICAFlow: Fast and robust MRI preprocessing bridging research neuroimaging and clinical practice.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 3 references
[7] doi:10.1038/s41598-026-51531-w [code]
Multimodal age-dependent diffusion-MRI analysis of the neocortex in a rat model of cortical dysplasia.
Journal: Scientific reports
In common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 2 references
[8] doi:10.1126/sciadv.aec2348 [code]
Congenital blindness reduces myelination in human visual cortex.
Journal: Science advances
In common: NiBabel, NumPy, structural MRI / diffusion, 5 references
[9] doi:10.1186/s12916-026-04770-7 [code]
Impairment of brain short association fibers across clinical stages in amyotrophic lateral sclerosis: a new biomarker mirroring disease progression.
Journal: BMC medicine
In common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 2 references
[10] doi:10.1002/nbm.70353 [code]
Automated Surface-Based Segmentation of Deep Gray Matter Regions Based on Diffusion Tensor Images Reveals Unique Age Trajectories Over the Healthy Lifespan.
Journal: NMR in biomedicine
In common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.