Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Repository
MR to CT for TUS acoustic simulations
Basic Info
- Host: GitHub
- Owner: sitiny
- License: apache-2.0
- Language: Jupyter Notebook
- Default Branch: main
- Size: 260 KB
Statistics
- Stars: 23
- Watchers: 1
- Forks: 7
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
MR to pCT for TUS
This script produces a pseudo-CT image from a T1-weighted MR image for use in acoustic simulations of transcranial ultrasound stimulation (TUS). See also https://github.com/sitiny/BRICTUSSimulation_Tools.
Platform
Tested on Linux (Ubuntu 20.04.4 LTS) and on macOS Catalina (10.15.7; Intel i5) and Monterey (12.4; Apple M1 Pro).
Works with both NVIDIA GPU and CPU-only platforms.
Dependencies
Instructions
Install dependencies (see above).
Clone or download the repository, trained weights (https://osf.io/download/c3w98/) and example dataset (https://osf.io/download/xhne5/).
In cell #2 of the python notebook mr-to-pct_infer.ipynb, change the path to point to your input MR image, output pCT image, and the location where you saved the trained network weights: ```
Set data file paths
inputmrfile = '/Users/sitiyaakub/Documents/Analysis/MRtoCT/ForGitHub/sub-test01t1w.nii' outputpctfile = '/Users/sitiyaakub/Documents/Analysis/MRtoCT/ForGitHub/sub-test01pct.nii' trainedweights = '/Users/sitiyaakub/Documents/Analysis/MRtoCT/ForGitHub/pretrainednetfinal20220825.pth' ```
You may optionally prepare your T1-weighted MR image. If prep_t1 is set to True, the T1-weighted MR image will be bias corrected (using ANTs N4BiasFieldCorrection) and backgound noise outside the head will be masked out. ```
Do you want to prepare the t1 image? This will perform bias correction and create a head mask
yes = True, no = False. Output will be saved to _prep.nii
prep_t1 = True ```
You may also optionally produce an example figure of the pCT output. If plot_mrct is set to True, an example figure will be produced. ```
Do you want to produce an example plot? yes = True, no = False.
plot_mrct = True ```
Run notebook.
This will produce the output pCT image in the specified file path.
Input to network
The software works best for input T1-weighted MR images in the NIfTI file format with the following specifications: 1) RAS+ orientation 2) scanner: Siemens Prisma 3T 3) acquisition parameters: acquired in sagittal plane, 2100 ms repetition time (TR), 2.26 ms echo time (TE), 900 ms inversion time (TI), 8° flip angle (FA), GRAPPA acceleration factor of 2, and 1 mm3 voxel size 4) maximum matrix size: 256 x 256 x 256 5) voxel size: 1mm isotropic 6) bias-corrected (e.g. using N4BiasFieldCorrection in ANTs or similar: see https://github.com/ANTsX/ANTs) 7) noise outside the head masked out
The bias correction and noise masking can be optionally applied within the script by setting prep_t1 = True.
Troubleshooting
If your image is not in RAS+ orientation, you need to reorient it. Several tools are available to reorient NIfTI format images e.g. FSL's fslreorient2std (see: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Orientation%20Explained) or NiBabel's asclosestcanonical (see: https://nipy.org/nibabel/image_orientation.html).
If you have problems with the ANTsPy installation, you can try running it without the ANTs bias-correction and head masking. To do this, change the third line of the mr-to-pctinfer.ipynb to: `from utils.inferfuncsnoants import domrtopct`. This will work best if you supply a bias-corrected and head masked T1-weighted MR image.
Citing this work
The rationale and principle are described in detail in the following paper.
Yaakub, S. N., White, T. A., Kerfoot, E., Verhagen, L., Hammers, A., & Fouragnan, E. F. (2023). Pseudo-CTs from T1-weighted MRI for planning of low-intensity transcranial focused ultrasound neuromodulation: an open-source tool. Brain Stimulation, 16(1), p75-78. https://doi.org/10.1016/j.brs.2023.01.838
If you use our MR to pCT method in your own work, please acknowledge us by citing the above paper and the repository
Please also consider citing ANTsPy and MONAI (see the websites for details).
Feedback welcome at siti.yaakub@plymouth.ac.uk
Owner
- Login: sitiny
- Kind: user
- Repositories: 2
- Profile: https://github.com/sitiny
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Yaakub" given-names: "Siti Nurbaya" orcid: "https://orcid.org/0000-0001-5084-1973" title: "MR-to-pCT for TUS acoustic simulations" version: 1.0.0 doi: 10.5281/zenodo.7110246 date-released: 2022-09-24 url: "https://github.com/sitiny/mr-to-pct"
GitHub Events
Total
- Issues event: 2
- Watch event: 9
- Issue comment event: 1
- Fork event: 1
Last Year
- Issues event: 2
- Watch event: 9
- Issue comment event: 1
- Fork event: 1
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 1
- Total pull requests: 0
- Average time to close issues: 20 days
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: 20 days
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 1.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- liuziyang1106 (1)
- TothJake (1)
- javierlopezrodriguez (1)
Pull Request Authors
- dongdongtong (1)