{"id":13676249,"url":"https://github.com/benoitberanger/niix2bids","last_synced_at":"2025-04-22T20:41:19.413Z","repository":{"id":38198607,"uuid":"408857218","full_name":"benoitberanger/niix2bids","owner":"benoitberanger","description":"Automatic BIDS architecture","archived":false,"fork":false,"pushed_at":"2024-09-02T11:06:40.000Z","size":155,"stargazers_count":13,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T18:41:23.781Z","etag":null,"topics":["bids","bids-converter","mri"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benoitberanger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-09-21T14:40:38.000Z","updated_at":"2025-01-10T23:33:14.000Z","dependencies_parsed_at":"2024-11-01T18:25:59.101Z","dependency_job_id":null,"html_url":"https://github.com/benoitberanger/niix2bids","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitberanger%2Fniix2bids","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitberanger%2Fniix2bids/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitberanger%2Fniix2bids/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benoitberanger%2Fniix2bids/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benoitberanger","download_url":"https://codeload.github.com/benoitberanger/niix2bids/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250320027,"owners_count":21411288,"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":["bids","bids-converter","mri"],"created_at":"2024-08-02T13:00:20.853Z","updated_at":"2025-04-22T20:41:19.394Z","avatar_url":"https://github.com/benoitberanger.png","language":"Python","funding_links":[],"categories":["Converters"],"sub_categories":["MRI"],"readme":"# niix2bids\n\nAutomatic BIDS architecture. Convert your DICOM with [dcm2niix](https://github.com/rordenlab/dcm2niix), \nthen use this package as a command line to organize your dataset into [BIDS](https://bids.neuroimaging.io/).\n\n\n## Background\n\n[BIDS](https://bids.neuroimaging.io/) is widely used for sharing neuroimaging datasets.\nThere are several packages that have a semi-automatic approach to organize datasets to BIDS, such as [Dcm2Bids](https://github.com/UNFmontreal/Dcm2Bids).\nTo transform one or a few cohorts from dicom or nifti to BIDS, I would use [Dcm2Bids](https://github.com/UNFmontreal/Dcm2Bids).\n\nHowever, for a more automatic approach with no prior on the input directory structure and file names,\n[niix2bids](https://github.com/benoitberanger/niix2bids) can be better.\nThis should be the case for MRI centers that have lots of cohorts from different research protocol.\nIt may also be useful for clinical data with wide variations in naming conventions and parameters.\n\n\n## Limitations\n\n- Only works with:\n  - MRI data\n  - Siemens magnets\n  - DICOM converted using [dcm2niix](https://github.com/rordenlab/dcm2niix)\n- `PatientName` **must** be in the JSON file. Use [dcm2niix](https://github.com/rordenlab/dcm2niix) with option `-ba n` to **disable** anonymization.\n\n\n## Usage\n```\nusage: niix2bids [-h] -i DIR [DIR ...] -o DIR [--symlink | --copyfile] [--logfile | --no-logfile] [-c FILE] [-v]\n\n    Create BIDS architecture from nifti files and .json sidecars.\n    This method expects DICOM converted by dcm2niix (https://github.com/rordenlab/dcm2niix)\n    \n\nRequired arguments:\n  -i DIR [DIR ...], --in_dir DIR [DIR ...]\n                        Nifti directories that will be parsed and transformed into BIDS architecture.\n                        This directory is usually the output directory of dcm2niix.\n                        This argument accepts several paths. You can use syntax such as /path/to/nii/2021_*\n  -o DIR, --out_dir DIR\n                        Output directory, receiving the BIDS architecture.\n\nOptional arguments:\n  -h, --help            show this help message and exit\n  --symlink             Use symlink (default). The out_dir will contain symlinks, saving disk spaces\n  --copyfile            Use copyfile. Original files will be copied in out_dir. !! be careful of disk space !!\n  --logfile             Write logfile (default)\n  --no-logfile          Disable writing logfile\n  -c FILE, --config_file FILE\n                        If you want to use non-coded sequences such as new Products, WIP or C2P,\n                        you can provide a config file.\n                        Default location is ~/niix2bids_config_file/siemens.py\n                        If default location is not present, try to use the template file \n                        located in [niix2bids]/config_file/siemens.py\n  -v, --version         show program's version number and exit\n\nniix2bids_version==v2.5.0 + bids_version==v1.6.0\n```\n\n\n## Installation\n\n### Python version \u0026 other dependencies \n\n#### Python version\n\n`python \u003e= 3.6` Tested on `3.6`, `3.9`, `3.10`\n\n#### Package dependencies\n- `pandas` for [DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html)\n- `nibabel` to [load](https://nipy.org/nibabel/gettingstarted.html) the nifti file header\n\n\n### How to\n\n#### Recommended setup\n\nUse [conda](https://docs.conda.io/en/latest/miniconda.html) to create a new python environment.\n\n**Standard**\n\n```\nconda create --name niix2bids\nconda activate niix2bids\npip install git+https://github.com/benoitberanger/niix2bids\n```\n\n**Developer**\n\nIf you want to install in \"developer\" mode using the Git local repository, clone the repo before, then change the installation line :\n\n```\ncd /path/to/mydir/\ngit clone https://github.com/benoitberanger/niix2bids\nconda create --name niix2bids\nconda activate niix2bids\npip install -e niix2bids/\n```\n\nIf you want to make a PR, this the recommended strategy, because you can control branching in your local clone of the repository\n\n\n**NOT tested**\n\n`pip install git+https://github.com/benoitberanger/niix2bids`  \nThe installation might crash because of wrong dependency management.\nCreating a fresh [conda](https://docs.conda.io/en/latest/miniconda.html) environment is the recommended setup.\nSee above.\n\n\n## Notes\n\n`pip install niix2bids` is not possible yet.\nI did not register this packaged on https://pypi.org.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoitberanger%2Fniix2bids","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenoitberanger%2Fniix2bids","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenoitberanger%2Fniix2bids/lists"}