{"id":14977720,"url":"https://github.com/alexlaurence/nifti-image-converter","last_synced_at":"2025-04-12T18:49:41.543Z","repository":{"id":45636361,"uuid":"185460195","full_name":"alexlaurence/NIfTI-Image-Converter","owner":"alexlaurence","description":"🖼 A lightweight neuroimaging .nii to .png converter for Matlab and Python users","archived":false,"fork":false,"pushed_at":"2025-01-21T10:25:35.000Z","size":90,"stargazers_count":122,"open_issues_count":18,"forks_count":40,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T23:09:42.429Z","etag":null,"topics":["convert-images","converter","matlab","medical-imaging","neuroimaging","nifti","opencv","png","python"],"latest_commit_sha":null,"homepage":"https://alexlaurence.github.io/NIfTI-Image-Converter/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexlaurence.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":["alexlaurence"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-05-07T18:50:14.000Z","updated_at":"2025-04-02T19:09:23.000Z","dependencies_parsed_at":"2025-02-05T18:05:39.068Z","dependency_job_id":"1584cc2b-cfd4-43c0-b0d9-4205ba5f9fc7","html_url":"https://github.com/alexlaurence/NIfTI-Image-Converter","commit_stats":{"total_commits":77,"total_committers":7,"mean_commits":11.0,"dds":"0.22077922077922074","last_synced_commit":"20daae54b6f6735ac8ab9bfd12fc9a27555de5db"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexlaurence%2FNIfTI-Image-Converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexlaurence%2FNIfTI-Image-Converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexlaurence%2FNIfTI-Image-Converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexlaurence%2FNIfTI-Image-Converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexlaurence","download_url":"https://codeload.github.com/alexlaurence/NIfTI-Image-Converter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618218,"owners_count":21134199,"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":["convert-images","converter","matlab","medical-imaging","neuroimaging","nifti","opencv","png","python"],"created_at":"2024-09-24T13:56:11.900Z","updated_at":"2025-04-12T18:49:41.515Z","avatar_url":"https://github.com/alexlaurence.png","language":"Python","funding_links":["https://github.com/sponsors/alexlaurence"],"categories":[],"sub_categories":[],"readme":"# NIfTI Image Converter (nii2png) for Python and Matlab\nRejoice OpenCV users, a lightweight neuroimaging .nii to .png converter that actually works. \n\nNow supports both Python3 and Matlab 2017b!\n\n## Environment\n* Python 3.7 (or Matlab 2017b)\n\n# Matlab Usage\n1. Add your script to your path. And run it simply by typing this and hitting enter:\n```\nnii2png\n```\n2. Select your working directory.\n3. Select your NIfTI image.\n4. Rotate your image if you wish:\n```\n\u003e\u003e Would you like to rotate the orientation? (y/n)\n\u003e\u003e y\n\u003e\u003e OK. By 90° 180° or 270°? \n\u003e\u003e 90\n```\n5. Let it run.\n6. Your png files are now in the png folder of your working directory.\n\n## Download nii2png for Matlab 2017b\nDownload Latest Build: [Download](https://raw.githubusercontent.com/alexlaurence/NIfTI-Image-Converter/master/matlab/nii2png.m)\n\nDownload Stable Release: [Download](https://github.com/alexlaurence/NIfTI-Image-Converter/releases)\n\n# Python Setup\n\nFor those without Python, Pip or the modules, simply open Terminal and type in the following commands and hit enter.\n\n1. Install Homebrew\n```\n/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n```\n2. Install Python 3\n```\nbrew install python3\n```\n3. Install pip\n```\nsudo easy_install pip\n```\n4. Install plugins\n\n```\npip install scipy\n\npip install shutil\n\npip install nibabel\n\npip install numpy\n\npip install imageio\n```\n\n## Download nii2png for Python\nYou can download the latest version of nii2png through pip.\n```\npip install nii2png\n```\nOr alternatively, download the binary files here.\n\nDownload Latest Build: [Download](https://raw.githubusercontent.com/alexlaurence/NIfTI-Image-Converter/master/python/nii2png.py)\n\nDownload Stable Release: [Download](https://github.com/alexlaurence/NIfTI-Image-Converter/releases)\n\n## Permissions\n\nIf you didn't install nii2png through pip, you may need to grant nii2png.py permission to execute. On unix systems, Python scripts can be made executable using the following process:\n\n```\n$ chmod +x nii2png.py\n```\n\nOptional: You can also move `nii2png.py` into your bin directory, and it will be runnable from anywhere.\n\n\n## Python Usage \n\n1. Let's run the file and start converting images! Please ensure that your output folder ends with a slash to avoid errors.\n\n```\n$ python3 nii2png.py -i \u003cinputfile\u003e -o \u003coutputfolder\u003e\n```\n\nor\n\n```\n$ python3 nii2png.py --input \u003cinputfile\u003e --ouput \u003coutputfolder\u003e\n```\n\nTip: You can drag and drop the file/folder into the terminal window instead of typing the path\n\n2. Rotate the images if you wish\n\n```\n$ Would you like to rotate the orientation? (y/n) y\n$ OK. By 90° 180° or 270°? 90\n```\n\n### Example\n\nwith change directory command\n\n```\n$ cd ~/images/\n$ python3 nii2png.py -i brain.nii -o png/\n```\n\nwith full paths\n\n```\n$ python3 /users/ernie/images/nii2png.py -i /users/ernie/images/brain.nii -o /users/ernie/images/png/\n```\n\nwith long options\n\n\n```\n$ python3 /users/ernie/images/nii2png.py --input /users/ernie/images/brain.nii --output /users/ernie/images/png/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexlaurence%2Fnifti-image-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexlaurence%2Fnifti-image-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexlaurence%2Fnifti-image-converter/lists"}