PET2BIDS

PET2BIDS: a library for converting Positron Emission Tomography data to BIDS - Published in JOSS (2024)

https://github.com/openneuropet/pet2bids

Science Score: 100.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 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: ncbi.nlm.nih.gov, joss.theoj.org
  • Committers with academic emails
    2 of 18 committers (11.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

bids converter json metadata

Keywords from Contributors

neuroimaging connection time-frequency seeg meg ieeg fieldtrip eeg ecog donders

Scientific Fields

Mathematics Computer Science - 37% confidence
Last synced: 4 months ago · JSON representation ·

Repository

PET2BIDS helps you convert your PET data into BIDS! raw PET scanner files (e.g. ecat, dicom) and additional side files like .e.g excel sheets -- paper @JOSS https://doi.org/10.21105/joss.06067

Basic Info
Statistics
  • Stars: 30
  • Watchers: 3
  • Forks: 22
  • Open Issues: 10
  • Releases: 1
Topics
bids converter json metadata
Created over 4 years ago · Last pushed 5 months ago
Metadata Files
Readme Contributing Funding License Code of conduct Citation

README.md

PET2BIDS is a code library to convert source Brain PET data to BIDS

python Matlab PET2BIDS Tests Documentation Status phantoms DOI

Galassi, A., Norgaard, M., Gonzalez-Escamilla, G., Svarer, C., Rorden, C., Matheson, G.J, Knudsen, G.M, Innis, R.B., Ganz, M., Eierud, C., Bilgel., M. & Pernet, C. (2024). PET2BIDS: a library for converting Positron Emission Tomography data to BIDS. Journal of Open Source Software, 9(100), 6067.

This repository is hosting tools to curate PET brain data using the Brain Imaging Data Structure Specification. The work to create these tools is funded by Novo Nordisk Foundation (NNF20OC0063277) and the BRAIN initiative (MH002977-01).

For DICOM image conversion, we rely on dcm2niix, collaborating with Prof. Chris Rorden without whom we could not convert your data! For more information on dcm2niix and nifti please see The first step for neuroimaging data analysis: DICOM to NIfTI conversion paper.

Documentation

For more detailed (and most likely helpful) documentation visit the Read the Docs site for this project at:

https://pet2bids.readthedocs.io

Installation

Simply download the repository - follow the specific Matlab or Python explanations. Matlab and Python codes provide the same functionalities.

matlab

asciicast

1) remember to set the path to the PET2BIDS/matlab folder, you will find the source code to use here. 2) if converting DICOM files, make sure you have dcm2niix (for windows users, edit dcm2niix4pet.m to set the right paths to the .exe) 3) start using the code! more info here

pypet2bids

Use pip to install this library directly from PyPI:

asciicast

If you wish to install directly from this repository see the instructions below to either build a packaged version of pypet2bids or how to run the code from source.

Build Package Locally and Install with PIP We use [poetry](https://python-poetry.org/) to build this package, no other build methods are supported, further we encourage the use of [GNU make](https://www.gnu.org/software/make/) and a bash-like shell to simplify the build process. After installing poetry, you can build and install this package to your local version of Python with the following commands (keep in mind the commands below are executed in a bash-like shell): ```bash cd PET2BIDS cp -R metadata/ pypet2bids/pypet2bids/metadata cp pypet2bids/pyproject.toml pypet2bids/pypet2bids/pyproject.toml cd pypet2bids && poetry lock && poetry build pip install dist/pypet2bids-X.X.X-py3-none-any.whl ``` Why is all the above required? Well, because this is a monorepo and we just have to work around that sometimes. [!NOTE] Make and the additional scripts contained in the `scripts/` directory are for the convenience of non-windows users. If you have GNU make installed and are using a bash or something bash-like in you your terminal of choice, run the following: ```bash cd PET2BIDS make installpoetry buildpackage installpackage ```
Run Directly From Source Lastly, if one wishes run pypet2bids directly from the source code in this repository or to help contribute to the python portion of this project or any of the documentation they can do so via the following options: ```bash cd PET2BIDS/pypet2bids poetry install ``` Or they can install the dependencies only using pip: ```bash cd PET2BIDS/pypet2bids pip install . ``` After either poetry or pip installation of dependencies modules can be executed as follows: ```bash cd PET2BIDS/pypet2bids python dcm2niix4pet.py --help ```

Note: We recommend using dcm2niix v1.0.20220720 or newer; we rely on metadata included in these later releases. It's best to collect releases from the rorden lab/dcm2niix/releases page. We have observed that package managers such as yum or apt or apt-get often install much older versions of dcm2niix e.g. v1.0.2017XXXX, v1.0.2020XXXXX. You may run into invalid-BIDS or errors with this software with older versions.

spreadsheet_conversion (custom and pmod)

This folder contains spreadsheets templates and examples of metadata and matlab and python code to convert them to json files. Often, metadata such as Frame durations, InjectedRadioactivity, etc are stored in spreadsheets and we have made those function to create json files automatically for 1 or many subjects at once to go with the nifti imaging data. Note, we also have conversion for pmod files (also spreadsheets) allowing to export to blood.tsv files.

metadata

A small collection of json files for our metadata information.

user metadata

No matter the way you prefer inputting metadata (passing all arguments, using txt or env file, using spreadsheets), you are always right! DICOM values will be ignored - BUT they are checked and the code tells you if there is inconsistency between your inputs and what the DICOM says.

ecat_validation

This folder contains code generating Siemens HRRT scanner data using ecat file format and validating the matlab and python conversion tools (i.e. giving the data generated as ecat, do our nifti images reflect accurately the data).

Citation

Please cite us when using PET2BIDS.

Contribute

Anyone is welcome to contribute ! check here how you can get involved, the code of conduct. Contributors are listed here

Owner

  • Name: Open NeuroPET
  • Login: openneuropet
  • Kind: organization
  • Email: openneuropet@gmail.com

Brain PET data sharing, data curation tools, processing pipelines, molecular templates

JOSS Publication

PET2BIDS: a library for converting Positron Emission Tomography data to BIDS
Published
August 23, 2024
Volume 9, Issue 100, Page 6067
Authors
Anthony Galassi ORCID
National Institutes of Health, Bethesda, MD, United States
Martin Norgaard ORCID
Neurobiology Research Unit, Rigshospitalet, Copenhagen, Denmark, Department of Computer Science, University of Copenhagen, Copenhagen, Denmark, Department of Psychology, Stanford University, CA, United States
Adam G. Thomas ORCID
National Institutes of Health, Bethesda, MD, United States
Gabriel Gonzalez-Escamilla ORCID
University Medical Center of the Johannes Gutenberg University Mainz, Mainz, Germany
Claus Svarer ORCID
Neurobiology Research Unit, Rigshospitalet, Copenhagen, Denmark
Chris Rorden ORCID
Department of Psychology, University of South Carolina, Columbia, SC, United States
Granville J. Matheson ORCID
Mailman school of Public Health, Columbia University, New York, NY, United States, Department of Clinical Neuroscience, Karolinska Institutet and Stockholm County Council, Stockholm, Sweden, Karolinska Institutet
Gitte M. Knudsen ORCID
Neurobiology Research Unit, Rigshospitalet, Copenhagen, Denmark
Robert B. Innis ORCID
National Institutes of Health, Bethesda, MD, United States
Melanie Ganz ORCID
Neurobiology Research Unit, Rigshospitalet, Copenhagen, Denmark, Department of Computer Science, University of Copenhagen, Copenhagen, Denmark
Cyrus Eierud ORCID
TReNDS Center, Georgia State University, Atlanta, GA, United States
Murat Bilgel ORCID
National Institute on Aging Intramural Research Program, Baltimore, MD, United States
Cyril Pernet ORCID
Neurobiology Research Unit, Rigshospitalet, Copenhagen, Denmark
Editor
Britta Westner ORCID
Tags
Matlab Python brain imaging positron emission tomography (PET) brain imaging data structure (BIDS)

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Galassi"
  given-names: "Anthony"
  orcid: "https://orcid.org/0000-0001-6550-4574"
- family-names: "Norgaard"
  given-names: "Martin"
  orcid: "https://orcid.org/0000-0003-2131-5688"
- family-names: "Thomas"
  given-names: "Adam G."   
  orcid: "https://orcid.org/0000-0002-2850-1419"
- family-names: "Gonzalez-Escamilla"
  given-names: "Gabriel"   
  orcid: "https://orcid.org/0000-0002-7209-1736"
- family-names: "Svarer"
  given-names: "Claus"   
  orcid: "https://orcid.org/0000-0001-7811-1825"
- family-names: "Rorden"
  given-names: "Chris"   
  orcid: "https://orcid.org/0000-0002-7554-6142"
- family-names: "Matheson"
  given-names: "Granville"   
  orcid: "https://orcid.org/0000-0002-5646-4547"
- family-names: "Knudsen"
  given-names: "Gitte"   
  orcid: "https://orcid.org/0000-0003-1508-6866"
- family-names: "Innis"
  given-names: "Robert"   
  orcid: "https://orcid.org/0000-0003-1238-7209" 
- family-names: "Ganz-Benjaminsen"
  given-names: "Melanie"
  orcid: "https://orcid.org/0000-0002-9120-8098"
- family-names: "Bilgel"
  given-names: "Murat"
  orcid: "https://orcid.org/0000-0001-5042-7422"
- family-names: "Eierud"
  given-names: "Cyrus"
  orcid: "https://orcid.org/0000-0002-9942-676X"
- family-names: "Pernet"
  given-names: "Cyril"
  orcid: "https://orcid.org/0000-0003-4010-4632"
title: "PET2BIDS"
version: 1.3.20240502
url: "https://github.com/openneuropet/PET2BIDS"
date-released: 2022-10-01
license: MIT

GitHub Events

Total
  • Issues event: 21
  • Watch event: 4
  • Delete event: 12
  • Issue comment event: 43
  • Push event: 49
  • Pull request review comment event: 2
  • Pull request review event: 8
  • Pull request event: 42
  • Fork event: 3
  • Create event: 13
Last Year
  • Issues event: 21
  • Watch event: 4
  • Delete event: 12
  • Issue comment event: 43
  • Push event: 49
  • Pull request review comment event: 2
  • Pull request review event: 8
  • Pull request event: 42
  • Fork event: 3
  • Create event: 13

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 649
  • Total Committers: 18
  • Avg Commits per committer: 36.056
  • Development Distribution Score (DDS): 0.419
Past Year
  • Commits: 25
  • Committers: 6
  • Avg Commits per committer: 4.167
  • Development Distribution Score (DDS): 0.24
Top Committers
Name Email Commits
CPernet w****l@g****m 377
Anthony Galassi 2****t 230
mnoergaard m****d@n****k 16
melanieganz m****z 4
Gabriel Gonzalez-Escamilla g****k@g****m 3
Murat Bilgel b****m 3
fishpm p****r@g****m 3
Adam Thomas g****b@a****s 3
Cyrus Eierud c****d@g****u 1
Granville Matheson m****g@g****m 1
Marcel Zwiers m****s@g****m 1
Maximilian Cosmo Sitter 4****r 1
Rami Hamati r****5@g****m 1
Remi Gau r****u@h****m 1
Yaroslav Halchenko d****n@o****m 1
dependabot[bot] 4****] 1
neurolabusc r****n@s****u 1
noahg-neuroimage 1****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 51
  • Total pull requests: 96
  • Average time to close issues: 5 months
  • Average time to close pull requests: 19 days
  • Total issue authors: 19
  • Total pull request authors: 12
  • Average comments per issue: 2.63
  • Average comments per pull request: 0.9
  • Merged pull requests: 74
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 14
  • Pull requests: 45
  • Average time to close issues: 9 days
  • Average time to close pull requests: 5 days
  • Issue authors: 9
  • Pull request authors: 6
  • Average comments per issue: 1.29
  • Average comments per pull request: 0.44
  • Merged pull requests: 34
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • bendhouseart (21)
  • nbeliy (6)
  • adswa (4)
  • liningpan (3)
  • CPernet (2)
  • RDoerfel (2)
  • mathesong (1)
  • mcsitter (1)
  • bilgelm (1)
  • noahg-neuroimage (1)
  • ChristianNSchmitz (1)
  • kenanoestreich (1)
  • ruvini-n (1)
  • Remi-Gau (1)
  • fishpm (1)
Pull Request Authors
  • bendhouseart (104)
  • CPernet (7)
  • noahg-neuroimage (6)
  • fishpm (5)
  • bilgelm (3)
  • agt24 (2)
  • ramroomh (2)
  • britta-wstnr (2)
  • yarikoptic (2)
  • mcsitter (2)
  • mathesong (2)
  • effigies (1)
Top Labels
Issue Labels
bug (19) enhancement (9) bidscoin (3) help wanted (3) documentation (2) ezbids (1) JOSS (1)
Pull Request Labels
enhancement (7) documentation (4) JOSS (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 334 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 48
  • Total maintainers: 2
pypi.org: pypet2bids

A python library for converting PET imaging and blood data to BIDS.

  • Versions: 48
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 334 Last month
Rankings
Dependent packages count: 4.8%
Downloads: 8.5%
Average: 11.6%
Dependent repos count: 21.6%
Maintainers (2)
Last synced: 5 months ago

Dependencies

pypet2bids/poetry.lock pypi
  • alabaster 0.7.12
  • altgraph 0.17.2
  • atomicwrites 1.4.0
  • attrs 21.4.0
  • babel 2.9.1
  • certifi 2021.10.8
  • charset-normalizer 2.0.12
  • colorama 0.4.4
  • docutils 0.17.1
  • et-xmlfile 1.1.0
  • future 0.18.2
  • idna 3.3
  • imagesize 1.3.0
  • importlib-metadata 4.10.1
  • iniconfig 1.1.1
  • jinja2 3.1.1
  • json-maj 0.0.3
  • macholib 1.16
  • markupsafe 2.1.1
  • nibabel 3.2.1
  • numpy 1.21.5
  • openpyxl 3.0.9
  • packaging 21.3
  • pandas 1.3.5
  • pefile 2021.9.3
  • pluggy 1.0.0
  • py 1.11.0
  • pydicom 2.2.2
  • pygments 2.11.2
  • pyinstaller 5.0
  • pyinstaller-hooks-contrib 2022.4
  • pyparsing 3.0.7
  • pytest 6.2.5
  • python-dateutil 2.8.2
  • python-dotenv 0.19.2
  • pytz 2021.3
  • pywin32-ctypes 0.2.0
  • requests 2.27.1
  • scipy 1.7.3
  • six 1.16.0
  • snowballstemmer 2.2.0
  • sphinx 4.5.0
  • sphinx-rtd-theme 1.0.0
  • sphinxcontrib-applehelp 1.0.2
  • sphinxcontrib-devhelp 1.0.2
  • sphinxcontrib-htmlhelp 2.0.0
  • sphinxcontrib-jsmath 1.0.1
  • sphinxcontrib-matlabdomain 0.13.0
  • sphinxcontrib-qthelp 1.0.3
  • sphinxcontrib-serializinghtml 1.1.5
  • termcolor 1.1.0
  • toml 0.10.2
  • typing-extensions 4.0.1
  • urllib3 1.26.9
  • xlrd 2.0.1
  • zipp 3.7.0
pypet2bids/pypet2bids/Pipfile pypi
  • build ==0.4.0
  • chardet ==4.0.0
  • importlib-metadata ==4.3.0
  • nibabel ==3.2.1
  • numpy ==1.21.0
  • pep517 ==0.10.0
  • pyparsing ==2.4.7
  • python-dateutil ==2.8.1
  • python-dotenv ==0.18.0
  • six ==1.16.0
  • toml ==0.10.2
  • typing-extensions ==3.10.0.0
  • zipp ==3.4.1
pypet2bids/pyproject.toml pypi
  • json-maj ^0.0.3
  • nibabel ^3.2.1
  • numpy ^1.21.3
  • openpyxl ^3.0.9
  • pandas ^1.3.4
  • pydicom ^2.2.2
  • pyinstaller ^5.0
  • pyparsing ^3.0.4
  • pytest ^6.2.5
  • python >3.7.1,<3.10
  • python-dateutil ^2.8.2
  • python-dotenv ^0.19.1
  • scipy ^1.7.1
  • six ^1.16.0
  • sphinx-rtd-theme ^1.0.0
  • sphinxcontrib-matlabdomain ^0.13.0
  • termcolor ^1.1.0
  • xlrd ^2.0.1
.github/workflows/matlab.yaml actions
  • actions/checkout v2 composite
  • matlab-actions/run-command v1 composite
  • matlab-actions/setup-matlab v1 composite
  • mxschmitt/action-tmate v3 composite
.github/workflows/phantoms.yaml actions
  • actions/cache v3 composite
  • actions/checkout v2 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4 composite
  • matlab-actions/run-command v1 composite
  • matlab-actions/setup-matlab v1 composite
  • mxschmitt/action-tmate v3 composite
.github/workflows/python.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/windows.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite