Diffusion tensor imaging in chronic tension-type headache.
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- # Copyright (c) 2020 Daisuke Matsuyoshi
- # Released under the GNU AGPLv3
- # https://opensource.org/licenses/AGPL-3.0
- """
- Calculate DTI-NODDI parameters
- """
- __author__ = "Daisuke Matsuyoshi @dicemt"
- import numpy as np
- from scipy import sqrt
- from scipy import special
- from scipy import optimize as opt
- def correct_md(bval, L1, L2, L3, MK = 1.0):
- MD = (L1 + L2 + L3) / 3.0
- # Eq.B11
- 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
- # Eq.B12, Eq.5
- corrMD = MD + bval / 6.0 * MD2 * MK
- return(corrMD)
- def dti_fit(L1,L2,L3):
- MD = (L1+L2+L3)/3
- denom = np.sqrt( np.power((L1-MD),2) + np.power((L2-MD),2) + np.power((L3-MD),2) )
- numer = np.sqrt( np.power(L1,2) + np.power(L2,2) + np.power(L3,2) )
- FA = np.sqrt(1.5) * ( np.divide(denom, numer, out=np.zeros_like(denom), where=numer!=0) )
- return(FA,MD)
- def md2icvf(MD):
- dwm,dgm,_ = diff_parameters()
- # Eq.2; Lampinen (2017) Eq.27 icvf = 1.0 - sqrt(1 - 1.5 * (1 - MD/dwm))
- icvf = 1.0 - sqrt(0.5 * (3 * MD / dwm - 1.0))
- # Errorneous voxels
- erricvf = np.logical_or( icvf.real < 0.0 , np.isnan(icvf) )
- overicvf = (icvf.real >= 1.0)
- icvf[erricvf] = 0.0
- icvf[overicvf] = 1.0
- mask = np.logical_or( MD.real <= 0.0, np.isnan(MD) )
- icvf[mask] = 0.0
- return(icvf.real)
- def famd2tau(FA,MD):
- dwm,dgm,_ = diff_parameters()
- # Eq.3
- #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))
- 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)))
- # Errorneous voxels
- errtau = np.logical_or(tau.real <= 1.0/3.0, np.isnan(tau))
- overtau = np.logical_or(tau.real >= 1.0, np.abs(tau.imag) > 1e-10 )
- tau[errtau] = 0.0
- tau[overtau] = 1.0
- mask = np.logical_or(MD.real <= 0.0, np.isnan(MD))
- tau[mask] = 0.0
- return(tau.real)
- def tau2odi(tau):
- dwm,dgm,_ = diff_parameters()
- odi = np.zeros_like(tau)
- # Errorneous voxels
- errtau = np.logical_or(tau <(1.0/3.0), tau > 1.0)
- odi[errtau] = -1.0
- maintau = tau[~errtau]
- mainodi = np.zeros_like(maintau)
- for i in range(maintau.size):
- f = lambda x : kappa2tau(odi2kappa(x)) - maintau[i]
- try:
- mainodi[i] = opt.brentq(f, dwm, 1.0)
- except:
- mainodi[i] = 0
- odi[~errtau]=mainodi
- odi[errtau]=0 # Exclude again with zero
- print(tau.shape)
- odi = odi.reshape(tau.shape)
- return(odi)
- def kappa2tau(kappa):
- tau = np.zeros_like(kappa)
- outkappa = np.abs(kappa) < 1e-12
- # Eq.8 Zhang
- tau[~outkappa] = 0.5 * ( -1.0 / kappa[~outkappa] + 1.0 / (np.sqrt(kappa[~outkappa]) * dawson(np.sqrt(kappa[~outkappa]))) )
- tau[outkappa] = 1.0/3.0 # Lower limit
- return(tau)
- def dawson(x):
- # Abramowitz and Stegun (1972)
- a = 0.5 * np.sqrt(np.pi) * np.exp(-np.power(x,2)) * special.erfi(x)
- return(a)
- def odi2kappa(odi):
- kappa = np.max(1.0 / np.tan((odi*np.pi)/2.0),0)
- return(kappa)
- def kappa2odi(kappa):
- odi = 2.0 / np.pi * np.arctan(1.0/kappa)
- return(odi)
- def diff_parameters():
- dwm = 1.7e-3
- dgm = 1.1e-3
- diso = 3.0e-3
- return(dwm,dgm,diso)
- def isnumber(string):
- try:
- float(string)
- return True
- except ValueError:
- return False
dti_noddi.py at commit cb9cadd, under AGPL-3.0 · at the source
Overview
- Department of Neurology, Philipps-University of Marburg, Marburg, Germany
- Hardtwaldklinik 1, Department of Neurology, Bad Zwesten, Germany
- Diakonie Kork, Epilepsy Center, Kehl-Kork, Germany
- LOEWE Research Cluster for Advanced Medical Physics in Imaging and Therapy (ADMIT), TH-Mittelhessen University of Applied Sciences, Giessen, Germany
- Department of Neurology, Center for Neurorehabilitation, Valens, Switzerland
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
cb9cadd0f7c20d5cb2083aa5f9f8c14c13a9cd58, 4 December 2024Availability: 2 checks, the latest on 28 October 2026: the link answers
- 28 October 2026: the link answers
- 27 September 2026: the link answers
5 files
- dti_noddi.py, Python, 122 lines
- dti_noddi_api.py, Python, 135 lines
- dti_noddi_fit.py, Python, 56 lines
- LICENSE, License, 661 lines
- README.md, Text, 74 lines
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/
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://
BibTeX
@article{teepker2026diff
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},
issn = {2673-561X},
doi = {10.3389/
url = {https://
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/
VL - 7
SP - 1850836
SN - 2673-561X
PB - Frontiers Media
DO - 10.3389/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.3389/
"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":
"volume": "7",
"page": "1850836",
"DOI": "10.3389/
"PMID": "42460409",
"PMCID": "PMC13368757",
"ISSN": "2673-561X",
"publisher": "Frontiers Media",
"URL": "https://
"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.1093/braincomms/fcac137 [code]
- Microstructural alterations predict impaired bimanual control in Parkinson's disease.Journal: Brain communicationsIn common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 17 references
- [2] doi:10.1038/s41531-024-00717-y [code]
- Microstructure predicts non-motor outcomes following deep brain stimulation in Parkinson's disease.Journal: NPJ Parkinson's diseaseIn common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 9 references
- [3] doi:10.1038/s41531-025-00930-3 [code]
- Microstructure is associated with motor outcomes following Deep Brain Stimulation in Parkinson's disease.Journal: NPJ Parkinson's diseaseIn common: DIPY, NiBabel, SciPy, 1 other tool, structural MRI / diffusion, 6 references
- [4] doi:10.1186/s10194-025-02118-9 [code]
- Volume of the hypothalamus and its subunits in patients with episodic migraine without aura during interictal periods.Journal: The journal of headache and painIn common: NiBabel, SciPy, NumPy, pain, structural MRI / diffusion, 8 references
- [5] doi:10.1007/s11682-022-00690-1
- Microstructural white matter alterations associated with migraine headaches: a systematic review of diffusion tensor imaging studies.Journal: Brain imaging and behaviorIn common: pain, structural MRI / diffusion, 7 references
- [6] doi:10.1371/journal.pone.0287921 [code]
- Modular pipeline for reconstruction and localization of implanted intracranial ECoG and sEEG electrodes.Journal: PloS oneIn common: NiBabel, SciPy, NumPy, 9 references
- [7] doi:10.3389/frai.2023.1286266
- Neuroimaging data repositories and AI-driven healthcare-Global aspirations vs. ethical considerations in machine learning models of neurological disease.Journal: Frontiers in artificial intelligenceIn common: 12 references
- [8] 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
- [9] doi:10.1186/s10194-024-01854-8 [code]
- Involvement of the cerebellum in structural connectivity enhancement in episodic migraine.Journal: The journal of headache and painIn common: SciPy, NumPy, pain, structural MRI / diffusion, 6 references
- [10] doi:10.1097/j.pain.0000000000002958 [code]
- Brain morphology predicts individual sensitivity to pain: a multicenter machine learning approach.Journal: PainIn common: NiBabel, SciPy, NumPy, pain, structural MRI / diffusion, 8 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 3 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:5cb19f61f95fa5d2…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.3389/fpain.2026.1850836)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.3389/fpain.2026.1850836.svg
:target: https://openscicode.org/badge/doi/10.3389/fpain.2026.1850836
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.3389/fpain.2026.1850836"><img src="https://openscicode.org/badge/doi/10.3389/fpain.2026.1850836.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
