{ "info": { "author": "HeyDude", "author_email": "heydude1337@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Medical Science Apps." ], "description": "# SimpleDicomToolkit\nBuilds a sqlite3 database for all dicom files in a folder. Dicom files can\nbe quickly found by searching dicom fields. Finally (some) images and image\nvolumes can be read directly. SimpleDicomToolkit provides a clean pythonic\ninterface for handling a large collection of dicom files\n\n## Usage\n\nbuild or load database:\n\n```python\ndb = SimpleDicomToolkit(path='/mydicomfolder')\n```\n\ndatabase have to be build only once. The database is saved to a file and\nautomatically loaded next time. SimpleDicomToolkit will search every time\nfor new folders within the specified path and add them to the database. Removed\nfiles from the path will be deleted from the database as well on subsequent\nloading.\n\nquery the database:\n\n```python\ndb = db.select(PatientName='MyPatient', StudyDescription='MyStudy')\n```\n\nThis will select all dicom files that match above specified PatientName and\nStudy Name. Any valid dicom filed can be used to query/select the files.\n\n```python\ndb.files and db.files_with_fullpath\n```\n\nWill give a list of currently selected files from the database with the relative\nand fullpath to these files. If no selection is made it will give a list of\nall files.\n\n```python\ndb.selection\n```\n\nWill return the currently used filter for selecting the files.\n\n```python\ndb.reset()\n```\n\nWill remove the current selection filter\n\n```python\ndb.SeriesDescription\n```\n\nWill give a list of (unique) SeriesDescriptions for the current selection. This\nworks for all dicom fields (PatientName, StudyDescription, etc.)\n\n## Reading images\n\n```python\nmyscript(db.files_with_path)\n```\n\nYou can use your own script to read the dicom files by passing the filenames\nof the current selection.\n\n```python\ndb.image\n```\n\nIn addition after selecting a single dicom series, this may return a SimpleITK a\nimage. It probably works for CT, PET, SPECT, and planar imaging and might\nwork for MRI.\n\n```python\ndb.array\n```\n\nWill return a numpy array for the given selection.\n\n## Advanced usage\n\n```python\ndb = SimpleDicomToolkit(path='/mydicomfolder', scan=False)\n```\nWill load a currently stored database, but will not scan for new files.\n\n```python\ndb = SimpleDicomToolkit(path='/mydicomfolder', force_rebuild=True)\n```\n\nWill remove existing database and rebuild the database from scratch\n\n```python\ndb = SimpleDicomToolkit(path='/mydicomfolder', in_memory=True)\n```\n\nDo not create a database file, but only create a temporary database in memory.\nDatabase will not be saved.\n\n```python\ndb = SimpleDicomToolkit(path='/myfolder', SUV=True)\n```\n\nWill convert images to SUV when using db.image and db.array. This works probably\nfor Siemens PET and may or may not work for other vendors due to possible different\ndicom implementations of SUV values.\n\n```python\ndb.reset('SeriesDescription')\n```\n\nWill only remove the specified dicom field from the current selection.\n\n## Limitations\n\nSmall databases up to 10GB should take a couple of minutes to build and can\nbe accessed within seconds after build. Database up to 100GB work quite well, but\nperformance on Windows is much better than linux/macos. sqlite3 is better\noptimized for Windows it seems. Due to very poor (none at all) database design,\ndatabases over 100GB can be very slow to access. SimpleDicomToolkit is primarily\nintended to be used for relatively small projects.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/heydude1337/SimpleDicomToolkit", "keywords": "phantom analysis simpleitk medical dicom", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "SimpleDicomToolkit", "package_url": "https://pypi.org/project/SimpleDicomToolkit/", "platform": "", "project_url": "https://pypi.org/project/SimpleDicomToolkit/", "project_urls": { "Homepage": "https://github.com/heydude1337/SimpleDicomToolkit" }, "release_url": "https://pypi.org/project/SimpleDicomToolkit/1.4/", "requires_dist": null, "requires_python": "", "summary": "Dicom Toolkit for reading dicom files to SimpleITK images", "version": "1.4" }, "last_serial": 4542527, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "c2c1a3cabd8da49122a9dbfb4e01c9ff", "sha256": "c0c5de5dc613dd5fac0f968b9f5b0110585e05fcced1a75d330bf013703fc90f" }, "downloads": -1, "filename": "SimpleDicomToolkit-1.0.tar.gz", "has_sig": false, "md5_digest": "c2c1a3cabd8da49122a9dbfb4e01c9ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30404, "upload_time": "2018-11-29T09:15:41", "url": "https://files.pythonhosted.org/packages/80/e0/c47924512932ab12c22d6cda56d73d3966ac53173bdd97691f42a05eb41a/SimpleDicomToolkit-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "8cc2d432940aa1afd3af75edd4411e39", "sha256": "8bb0d7a271cbcaf64ec3c7b071f65119132687ed92a543323688265ebbe48405" }, "downloads": -1, "filename": "SimpleDicomToolkit-1.1.tar.gz", "has_sig": false, "md5_digest": "8cc2d432940aa1afd3af75edd4411e39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24233, "upload_time": "2018-11-29T09:43:35", "url": "https://files.pythonhosted.org/packages/cb/69/dc836fa2075b7b51229e5952244128aa7946cd62ab3203496d060df59ae8/SimpleDicomToolkit-1.1.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "0ada19a594d65ec4056b0b3d0b0ad354", "sha256": "83cb018ece5cfc04c43879eb18be31fbe0f56caadd172119ac158c8f49e9a3c6" }, "downloads": -1, "filename": "SimpleDicomToolkit-1.3.tar.gz", "has_sig": false, "md5_digest": "0ada19a594d65ec4056b0b3d0b0ad354", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24235, "upload_time": "2018-11-29T10:06:20", "url": "https://files.pythonhosted.org/packages/10/9a/7934a8ee668a3e25ba4dba739f9b770bf1890cfbb3afbc3dee0f148e0840/SimpleDicomToolkit-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "5b4d7d2ca8ec3d4097ea9c19524763ab", "sha256": "bf7ddfc018bff12ad9ea434b9bad3097288ecdd0b7502cab7207997e0e872b3e" }, "downloads": -1, "filename": "SimpleDicomToolkit-1.4.tar.gz", "has_sig": false, "md5_digest": "5b4d7d2ca8ec3d4097ea9c19524763ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24289, "upload_time": "2018-11-29T11:06:29", "url": "https://files.pythonhosted.org/packages/82/2d/a5357bd24e62364c90d154f0d7655194310e48f6f6a56ef1b9f3da4081fd/SimpleDicomToolkit-1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5b4d7d2ca8ec3d4097ea9c19524763ab", "sha256": "bf7ddfc018bff12ad9ea434b9bad3097288ecdd0b7502cab7207997e0e872b3e" }, "downloads": -1, "filename": "SimpleDicomToolkit-1.4.tar.gz", "has_sig": false, "md5_digest": "5b4d7d2ca8ec3d4097ea9c19524763ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24289, "upload_time": "2018-11-29T11:06:29", "url": "https://files.pythonhosted.org/packages/82/2d/a5357bd24e62364c90d154f0d7655194310e48f6f6a56ef1b9f3da4081fd/SimpleDicomToolkit-1.4.tar.gz" } ] }