{ "info": { "author": "FNNDSC", "author_email": "dev@babymri.org", "bugtrack_url": null, "classifiers": [], "description": "pfdicom_agesort\n==================\n\n.. image:: https://badge.fury.io/py/pfdicom_agesort.svg\n :target: https://badge.fury.io/py/pfdicom_agesort\n\n.. image:: https://travis-ci.org/FNNDSC/pfdicom_agesort.svg?branch=master\n :target: https://travis-ci.org/FNNDSC/pfdicom_agesort\n\n.. image:: https://img.shields.io/badge/python-3.5%2B-blue.svg\n :target: https://badge.fury.io/py/pfdicom_agesort\n\n.. contents:: Table of Contents\n\n\nQuick Overview\n--------------\n\n- ``pfdicom_agesort`` processes ChRIS conformant PACS pull trees and reorders\n content according to an explicit // structure.\n\nOverview\n--------\n\n``pfdicom_agesort`` repacks a ChRIS-default tree of MRI/DICOM data to an explicit age-reflecting organization. The program performs a mulit-pass loop over the file tree space as defined in the [--stage ] flag below.\n\nNOTE:\n\n* ``pfdicom_agesort`` is dervied from ``pfdicom_tagExtract``. Please consult the documentation for ``pfdicom_tagExtract`` for additional information.\n\nInstallation\n------------\n\nDependencies\n~~~~~~~~~~~~\n\nThe following dependencies are installed on your host system/python3 virtual env (they will also be automatically installed if pulled from pypi):\n\n- ``pfmisc`` (various misc modules and classes for the pf* family of objects)\n- ``pftree`` (create a dictionary representation of a filesystem hierarchy)\n- ``pfdicom`` (handle underlying DICOM file reading)\n\nUsing ``PyPI``\n~~~~~~~~~~~~~~\n\nThe best method of installing this script and all of its dependencies is\nby fetching it from PyPI\n\n.. code:: bash\n\n pip3 install pfdicom_agesort\n\nCommand line arguments\n----------------------\n\n.. code:: html\n\n -I|--inputDir \n Input DICOM directory to examine. By default, the first file in this\n directory is examined for its tag information. There is an implicit\n assumption that each contains a single DICOM series.\n\n [-e|--extension ]\n An optional extension to filter the DICOM files of interest from the \n .\n\n -O|--outputDir \n The output root directory that will contain a tree structure identical\n to the input directory, and each \"leaf\" node will contain the analysis\n results.\n\n In the case of `pfdicom_agesort`, this is the root of the\n age sorted tree.\n\n [--outputLeafDir ]\n If specified, will apply the to the output\n directories containing data. This is useful to blanket describe\n final output directories with some descriptive text, such as \n 'anon' or 'preview'. \n\n This is a formatting spec, so \n\n --outputLeafDir 'preview-%s'\n\n where %s is the original leaf directory node, will prefix each\n final directory containing output with the text 'preview-' which\n can be useful in describing some features of the output set.\n\n [-F|--tagFile ]\n Read the tags, one-per-line in , and print the\n corresponding tag information in the DICOM .\n\n [-T|--tagList ]\n Read the list of comma-separated tags in , and print the\n corresponding tag information parsed from the DICOM .\n\n [-S|--symlinkDCMdata]\n If true/specified, perform a symlink of the original DICOM data to\n the final output directory tree. If false, a copy of the original\n DICOM data is performed.\n\n [-D|--doNotCleanUp]\n If true, do not cleanup the original tag data tree created when\n analysing the original DICOM tree structure.\n\n [-m|--image <[:]imageFile>]\n If specified, also convert the to . If the\n name is preceded by an index and colon, then convert this indexed \n file in the particular .\n\n [-s|--imageScale [:]]\n If an image conversion is specified, this flag will scale the image\n by and use an interpolation . This is useful in \n increasing the size of images for the html output.\n\n Note that certain interpolation choices can result in a significant\n slowdown!\n\n interpolation order:\n \n 'none', 'nearest', 'bilinear', 'bicubic', 'spline16',\n 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',\n 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos'\n\n -o|--outputFileStem \n The output file stem to store data. This should *not* have a file\n extension, or rather, any \".\" in the name are considered part of \n the stem and are *not* considered extensions.\n\n [-t|--outputFileType ]\n A comma specified list of output types. These can be:\n\n o \n o raw -raw.txt the raw internal dcm structure to string\n o json .json a json representation\n o html .html an html representation with optional image\n o dict -dict.txt a python dictionary\n o col -col.txt a two-column text representation (tab sep)\n o csv .csv a csv representation\n\n Note that if not specified, a default type of 'raw' is assigned.\n\n [--stage ]\n Stage to execute -- mostly for debugging purposes and useful if running a \n particular stage repeatedly.\n\n [--infoJSON ]\n The name of the study JSON file. \n\n Defaults to 'info.json'.\n\n [--threads ]\n If specified, break the innermost analysis loop into \n threads.\n\n [-x|--man]\n Show full help.\n\n [-y|--synopsis]\n Show brief help.\n\n [--json]\n If specified, output a JSON dump of final return.\n\n [--followLinks]\n If specified, follow symbolic links.\n\n [-v|--verbosity ]\n Set the app verbosity level. \n\n 0: No internal output;\n 1: Run start / stop output notification;\n 2: As with level '1' but with simpleProgress bar in 'pftree';\n 3: As with level '2' but with list of input dirs/files in 'pftree';\n 5: As with level '3' but with explicit file logging for\n - read\n - analyze\n - write\n \nExamples\n--------\n\nProcess a ChRIS tree containing DICOM:\n\n.. code:: bash\n\n pfdicom_agesort \\\\\n -I /neuro/users/chris/data/mrn \\\\\n -O /neuro/users/chris/data/age \\\\\n --threads 0 --printElapsedTime \\\\\n -e dcm \\\\\n -o '%_md5|6_PatientID-%PatientAge' \\\\\n -m 'm:%_nospc|-_ProtocolName.jpg' \\\\\n -s 3:none \\\\\n --useIndexhtml \\\\\n -t raw,json,html,dict,col,csv \\\\\n --followLinks \\\\\n --symlinkDCMdata \\\\\n -v 3 \\\\\n --threads 0\n\nwhich will reorganize the file trees as shown, printing the final elapsed processing time.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/FNNDSC/pfdicom_agesort", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pfdicom-agesort", "package_url": "https://pypi.org/project/pfdicom-agesort/", "platform": "", "project_url": "https://pypi.org/project/pfdicom-agesort/", "project_urls": { "Homepage": "https://github.com/FNNDSC/pfdicom_agesort" }, "release_url": "https://pypi.org/project/pfdicom-agesort/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "Process ChRIS trees of DICOM data and reorder by age.", "version": "1.0.2" }, "last_serial": 4642141, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b78473fdf31c57abc1a8b67bd3fa2ffe", "sha256": "884264fe3856e960ec7c864670463958facc46dc2f43cf194464bb0e467ceded" }, "downloads": -1, "filename": "pfdicom_agesort-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b78473fdf31c57abc1a8b67bd3fa2ffe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15647, "upload_time": "2018-12-21T20:11:02", "url": "https://files.pythonhosted.org/packages/57/ae/d8de92236d0eb5cfe3c54872bf26e4fdc370b2ad3296c31fb2ef74269262/pfdicom_agesort-1.0.0.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "90ca9e0ccbc1c900bc77e0f07621c913", "sha256": "49e462a09e026969b9e61c18a9751afd81f8765353438591d84236e8e8317c10" }, "downloads": -1, "filename": "pfdicom_agesort-1.0.2.tar.gz", "has_sig": false, "md5_digest": "90ca9e0ccbc1c900bc77e0f07621c913", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15635, "upload_time": "2018-12-28T19:46:33", "url": "https://files.pythonhosted.org/packages/d9/db/513a6f70478650f1fcaafcccdb9c4a5086697c06a1ca8933c63ef9cbf0af/pfdicom_agesort-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "90ca9e0ccbc1c900bc77e0f07621c913", "sha256": "49e462a09e026969b9e61c18a9751afd81f8765353438591d84236e8e8317c10" }, "downloads": -1, "filename": "pfdicom_agesort-1.0.2.tar.gz", "has_sig": false, "md5_digest": "90ca9e0ccbc1c900bc77e0f07621c913", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15635, "upload_time": "2018-12-28T19:46:33", "url": "https://files.pythonhosted.org/packages/d9/db/513a6f70478650f1fcaafcccdb9c4a5086697c06a1ca8933c63ef9cbf0af/pfdicom_agesort-1.0.2.tar.gz" } ] }