{"id":26766078,"url":"https://github.com/ucl/pet-rd-tools","last_synced_at":"2025-04-15T12:35:58.000Z","repository":{"id":55032968,"uuid":"113209519","full_name":"UCL/pet-rd-tools","owner":"UCL","description":"Command line tools for PET-MR (pre-)processing","archived":false,"fork":false,"pushed_at":"2024-07-27T00:24:46.000Z","size":238,"stargazers_count":15,"open_issues_count":12,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T20:18:58.754Z","etag":null,"topics":["medical-imaging","pet-mr","positron-emission-tomography"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UCL.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-05T16:59:05.000Z","updated_at":"2025-01-31T12:50:04.000Z","dependencies_parsed_at":"2024-07-27T01:29:12.721Z","dependency_job_id":"ca8e6f6d-14d7-4a7a-82c4-0e0104401af7","html_url":"https://github.com/UCL/pet-rd-tools","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UCL%2Fpet-rd-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UCL%2Fpet-rd-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UCL%2Fpet-rd-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UCL%2Fpet-rd-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UCL","download_url":"https://codeload.github.com/UCL/pet-rd-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072821,"owners_count":21208253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["medical-imaging","pet-mr","positron-emission-tomography"],"created_at":"2025-03-28T20:19:04.432Z","updated_at":"2025-04-15T12:35:57.981Z","avatar_url":"https://github.com/UCL.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pet-rd-tools\n\n[![Build Status](https://travis-ci.org/UCL/pet-rd-tools.svg?branch=master)](https://travis-ci.org/UCL/pet-rd-tools)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d71cdf9cba3d4f9f9f973f371624bfe7)](https://www.codacy.com/app/bathomas/petmr-rd-tools?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=UCL/petmr-rd-tools\u0026utm_campaign=badger) [![DOI](https://zenodo.org/badge/113209519.svg)](https://zenodo.org/badge/latestdoi/113209519)\n\n\n\nCommand line tools for PET-MR (pre)-processing.\n\nTools for validating and extracting raw PET data, and associated files, for the purposes of image reconstruction via [STIR](https://github.com/UCL/STIR) and [SIRF](https://github.com/CCPPETMR/SIRF). Currently these tools are mainly for the [Siemens mMR system](https://www.healthcare.siemens.com/magnetic-resonance-imaging/mr-pet-scanner/biograph-mmr) and [GE Signa PET/MR](http://www3.gehealthcare.com/en/products/categories/magnetic_resonance_imaging/3-0t/signa_pet-mr), although other GE PET/CT scanners should work as well.\n\n## Requirements for building\n\n- CMake (\u003e= 3.7)\n- ITK (\u003e= 4.13.1)\n- Boost (\u003e= 1.55)\n- GLOG ([https://github.com/google/glog](https://github.com/google/glog))\n\n---\n## Running the applications\n### `nm_validate`\n\nThe purpose of `nm_validate` is to confirm if a raw data file (or file pair) contains all the expected data.\n\n*WARNING*: This currently only performs additional checks on Siemens mMR data. For GE data, there are no\nchecks on the content of the RDF.\n\n#### Usage:\n\n```bash\nnm_validate -i \u003cDICOM file\u003e\n```\n\nExample output for a valid list mode file:\n```\nI1205 17:15:37.418709 3333379008 NMValidate.cpp:99] Started: Tue Dec  5 17:15:37 2017\nI1205 17:15:37.419257 3333379008 NMValidate.cpp:100] Running 'nm_validate' version: 0.1.0\nI1205 17:15:39.136943 3333379008 Common.hpp:89] Manufacturer: SIEMENS \nI1205 17:15:39.136970 3333379008 Common.hpp:97] Model name: Biograph_mMR\nI1205 17:15:39.136979 3333379008 Common.hpp:105] Image type: ORIGINAL\\PRIMARY\\PET_LISTMODE \nI1205 17:15:41.942068 3333379008 MMR.hpp:399] Expected number of LM words: 74308087\nI1205 17:15:41.942098 3333379008 MMR.hpp:406] 297232348 bytes in LM field\nI1205 17:15:41.942103 3333379008 MMR.hpp:410] 297232348 / 4 = 74308087 words\nI1205 17:15:41.942114 3333379008 NMValidate.cpp:134] File appears to be VALID\nI1205 17:15:41.942119 3333379008 NMValidate.cpp:139] Time taken: 4 seconds\nI1205 17:15:41.942123 3333379008 NMValidate.cpp:140] Ended: Tue Dec  5 17:15:41 2017\n```\n\n`nm_validate` will check list mode, sinogram and normalisation (norm) files. The size of the anticipated raw data is checked, but not the actual contents. Due to compression of the sinogram data, only the existence of files are tested.\n\n### `nm_extract`\n\nRaw PET data from the mMR scanner can be in one of two forms: a single DICOM file or a pair of files (one DICOM header and a raw binary file). `nm_extract` reads the DICOM data and extracts the Interfile header and the raw data for either of the two forms. Once extracted, the Interfile header can be used for image reconstruction with STIR.\n\nGE PET scanners also store the raw data in a single DICOM file. `nm_extract` reads this file and extracts the GE RDF (Raw Data Format)\nfile. This can then be used in STIR.\n\n#### Usage:\n\n```bash\nnm_extract -i \u003cDICOM file\u003e [-o \u003cOUTPUTDIR\u003e -p \u003cPREFIX\u003e --noupdate ]\n```\nwhere `\u003cDICOM file\u003e` is the input file for extraction, `\u003cOUTPUTDIR\u003e` is the target output directory and `\u003cPREFIX\u003e` is the desired filename prefix for the output files. If the `\u003cOUTPUTDIR\u003e` does not exist, `nm_validate` will attempt to create it. If `\u003cOUTPUTDIR\u003e` is not specified, the output will be written to the same directory as the input.\n\nFor Siemens data, `--noupdate` will extract the raw Interfile without modification (mainly for debugging). For GE data, this option is ignored.\n\n\n#### Output extensions\n\nSiemens data:\n- List mode files will be extracted with `.l` extensions for the list mode data and `.l.hdr` for the associated Interfile header.\n- Sinograms files will have the extension `.s` for the sinogram data and `.s.hdr` for the associated Interfile header.\n- Normalisation files will be extracted with `.n` and `.n.hdr` extensions.\n\nGE data:\n- List mode files will be extracted with `.BLF` extension.\n- Sinogram files will have `.sino.rdf` extension.\n- Norm and geometric norm files will have `.norm.rdf` and `.geo.rdf` extensions.\n\n### `nm_mrac2mu`\n\n`nm_mrac2mu` extracts the patient mu-map from mMR MRAC DICOM data, scales to linear attenuation coefficients (LACs) and reslices into a full-size matrix (344 x 344 x 127) for PET reconstruction. The mu-map is oriented in LPS. \n\n#### Usage: \n\n```bash\nnm_mrac2mu -i \u003cDICOMDIR\u003e -o \u003cOUTPUT file\u003e [--orient \u003cORIENTATION\u003e --head]\n```\n\nwhere `\u003cDICOMDIR\u003e` is the path to the MRAC DICOM folder and `\u003cOUTPUT file\u003e` is the destination file. `\u003cORIENTATION\u003e` is the desired coordinate orientation (default 'RAI'). The switch `--head` will generate a mu-map in 344x344x127 matrix and is currently hard-coded for the mMR brain MRAC.\n\n#### Output extensions\n\n- The output file type is determined by the extension of the destination file. To produce a compressed NiFTi file, specify the extension `.nii.gz` e.g. `myoutput.nii.gz`. \n- If the extension `.hv` is given, an Interfile header is generated in addition to the volume.\n\n### `nm_signa2mu`\n\n`nm_signa2mu` extracts the patient mu-map from the GE Signa mMR DICOM data, scales to linear attenuation coefficients (LACs) and writes to an output file.\n\n#### Usage: \n\n```bash\nnm_signa2mu -i \u003cDICOMDIR\u003e -o \u003cOUTPUT file\u003e [--orient \u003cORIENTATION\u003e]\n```\n\nwhere `\u003cDICOMDIR\u003e` is the path to the MRAC DICOM folder and `\u003cOUTPUT file\u003e` is the destination file. `\u003cORIENTATION\u003e` is the desired coordinate orientation (default 'RAI'). \n\n#### Output extensions\n\n- The output file type is determined by the extension of the destination file. To produce a compressed NiFTi file, specify the extension `.nii.gz` e.g. `myoutput.nii.gz`. \n- If the extension `.hv` is given, an Interfile header is generated in addition to the volume.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucl%2Fpet-rd-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fucl%2Fpet-rd-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucl%2Fpet-rd-tools/lists"}