{ "info": { "author": "Danish Mujeeb", "author_email": "danish@dsharpapps.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: End Users/Desktop", "Intended Audience :: Healthcare Industry", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Graphics :: Graphics Conversion" ], "description": "Convert DICOM Files to PNG\n===========================\n\n[![CircleCI](https://circleci.com/gh/danishm/mritopng.svg?style=shield)](https://circleci.com/gh/danishm/mritopng) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n*Important Changes*\n - **8/26/2018** - Ability to apply auto-contrast to the converted images\n\nIntroduction\n------------\nA simple python module to make it easy to batch convert a binary DICOM file, which is usually an output from\nan MRI scan to a PNG image.\n\nThe MRI scanning facilities typically hand you a CD containing your MRI scans. This CD will typically not contain\nany image files in traditional formats that can be opened up by your default image viewing program. The CD contains\na list of DICOM files, which can only be viewed by the included viewer, which is mostly only supported on a Windows machine.\n\nThis module should help you convert all the DICOM based scans to PNG files. This tool can be used as a command line tools as well as a library in your python code\n\nInstallation\n------------\n\nTo have known to work dependencies use beforehand::\n\n pip install -r requirements.txt\n\n`mritopng` comes with a `setup.py` script to use with distutils. After unpacking the distribution, `cd` into the directory and execute the command::\n\n python setup.py install\n\n\nThis will install two things\n\n * The `mritopng` module will be installed; `import mritopng` will allow you to use it\n * A command line utility called `mritopng` which can be used from the console\n\nQuick Start\n-----------\n`mritopng` will install a command line utility that can be used to convert individual DICOM files or folders\n\n### Getting Help\n\n```\n$ mritopng --help\nusage: mritopng [-h] [-f] [-c] dicom_path png_path\n\nConvert a dicom MRI file to png. To conver a whole folder recursivly, use the\n-f option\n\npositional arguments:\n dicom_path Full path to the mri file\n png_path Full path to the generated png file\n\noptional arguments:\n -h, --help show this help message and exit\n -f, --folder Convert a whole folder instead of a single file\n -c, --auto-contrast Apply contrast after converting default image\n```\n\n### Convert Single File\n\n```sh\n# Converts the file /DICOM/SCAN1 to a file called output.png,\n# while applying auto contrast\n$ mritopng --auto-contrast /DICOM/SCAN1 output.png\n```\n\n**Note:** If file `output.png` already exists, it will be overwritten\n\n### Convert Folder Tree\n\nThe utility can also be used to convert a whole folder recursively by using the `-f` option::\n\n```sh\n# Takes all the files in /DICOM, converts the files to png and\n# puts them in the /PNG folder with the same structure as /DICOM. \n$ mritopng -f /DICOM /PNG\n```\n\n**Note:**\n - Existing top level folder will NOT be over-written e.g. the example above will fail of the folder `/PNG` already exists\n - The tool will try to convert as many files as it can, skipping the ones that it can't\n\nUsing it as a Library\n---------------------\n\nIt's pretty easy to get up and running with `mritopng` in your own project\n\n```py\nimport mritopng\n\n# Convert a single file with auto-contrast\nmritopng.convert_file('/home/user/DICOM/SCAN1', '/home/user/output.png', auto_contrast=True)\n\n# Convert a whole folder recursively\nmritopng.convert_folder('/home/user/DICOM/', '/home/user/PNG/')\n```\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/danishm/mritopng", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mritopng", "package_url": "https://pypi.org/project/mritopng/", "platform": "", "project_url": "https://pypi.org/project/mritopng/", "project_urls": { "Homepage": "https://github.com/danishm/mritopng" }, "release_url": "https://pypi.org/project/mritopng/2.2/", "requires_dist": null, "requires_python": "", "summary": "Easily convert MRI filed based on the DICOM format to a PNG image", "version": "2.2" }, "last_serial": 4269712, "releases": { "2": [], "2.0": [], "2.1": [ { "comment_text": "", "digests": { "md5": "10fc8bbfb3932b75a8241869ef18aa21", "sha256": "2060f9ca25fa8767a30d4aa11ea048884efd2116d039e9e4a61da259ed841879" }, "downloads": -1, "filename": "mritopng-2.1.tar.gz", "has_sig": false, "md5_digest": "10fc8bbfb3932b75a8241869ef18aa21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3746, "upload_time": "2017-11-05T21:40:21", "url": "https://files.pythonhosted.org/packages/ec/28/0a7834ecb469dcef9dc33ec627194e36857464387252b8fae839415c047b/mritopng-2.1.tar.gz" } ], "2.2": [ { "comment_text": "", "digests": { "md5": "d3d1aa793e42b58c5c35a05856cedf3f", "sha256": "2281490d292124d8318260455dd6d8f91a55d6dcd153ddc6dd86b3ec8d041b17" }, "downloads": -1, "filename": "mritopng-2.2.tar.gz", "has_sig": false, "md5_digest": "d3d1aa793e42b58c5c35a05856cedf3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5002, "upload_time": "2018-09-13T18:50:07", "url": "https://files.pythonhosted.org/packages/99/38/1e8d5cafec26d6f981e136b4a01f08326cef1091ce2608e9a7dc706b364c/mritopng-2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d3d1aa793e42b58c5c35a05856cedf3f", "sha256": "2281490d292124d8318260455dd6d8f91a55d6dcd153ddc6dd86b3ec8d041b17" }, "downloads": -1, "filename": "mritopng-2.2.tar.gz", "has_sig": false, "md5_digest": "d3d1aa793e42b58c5c35a05856cedf3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5002, "upload_time": "2018-09-13T18:50:07", "url": "https://files.pythonhosted.org/packages/99/38/1e8d5cafec26d6f981e136b4a01f08326cef1091ce2608e9a7dc706b364c/mritopng-2.2.tar.gz" } ] }