mri_meta_extract


Namemri_meta_extract JSON
Version 1.2.0 PyPI version JSON
home_pagehttps://github.com/LREN-CHUV/mri-meta-extract
SummaryExtract meta-data from DICOM and NIFTI files
upload_time2017-01-20 11:07:19
maintainer
docs_urlNone
authorMirco Nasuti
requires_python
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
Coveralis test coverage No Coveralis.
            |License| |Codacy Badge| |CircleCI|

MRI Meta-data Extractor
=======================

This is a Python library providing methods to scan folders, extract
meta-data from files (DICOM, NIFTI, ...) and store them in a database.

Build
-----

Run ``./build.sh``. (Builds for Python3)

Publish on PyPi
---------------

Run ``./publish.sh``.

Install
-------

Run ``pip install mri-meta-extract``. (Only tested with Python3)

Test
----

Enter the ``tests`` directory.

With Docker
~~~~~~~~~~~

Run ``test.sh``

Without Docker
~~~~~~~~~~~~~~

-  Run a Postgres database on ``localhost:5432``.
-  Run ``nosetest unittest.py``

Use
---

Create a provenance entity using :

::

    create_provenance(dataset, matlab_version=None, spm_version=None, spm_revision=None, fn_called=None, fn_version=None, others=None, db_url=None)

    Create (or get if already exists) a provenance entity, store it in the database and get back a provenance ID.
    * param dataset: Name of the data set.
    * param matlab_version: (optional) Matlab version.
    * param spm_version: (optional) SPM version.
    * param spm_revision: (optional) SPM revision.
    * param fn_called: (optional) Function called.
    * param fn_version: (optional) Function version.
    * param others: (optional) Any other information can be set using this field.
    * param db_url: (optional) Database URL. If not defined, it looks for an Airflow configuration file.
    * return: Provenance ID.

Scan a folder to populate the database :

::

    def visit(folder, provenance_id, previous_step_id=None, db_url=None)

    Record all files from a folder into the database.
    The files are listed in the DB. If a file has been copied from previous step without any transformation, it will be
    detected and marked in the DB. The type of file will be detected and stored in the DB. If a files (e.g. a DICOM
    file) contains some meta-data, those will be stored in the DB.
    * param folder: folder path.
    * param provenance_id: provenance label.
    * param previous_step_id: (optional) previous processing step ID. If not defined, we assume this is the first
    processing step.
    * param boost: (optional) When enabled, we consider that all the files from a same folder share the same meta-data.
    When enabled, the processing is (about 2 times) faster. This option is enabled by default.
    * param db_url: (optional) Database URL. If not defined, it looks for an Airflow configuration file.
    * return: return processing step ID.

.. |License| image:: https://img.shields.io/badge/license-Apache--2.0-blue.svg
   :target: https://github.com/LREN-CHUV/airflow-imaging-plugins/blob/master/LICENSE
.. |Codacy Badge| image:: https://api.codacy.com/project/badge/Grade/4547fb5d1e464e4087640e046893576a
   :target: https://www.codacy.com/app/mirco-nasuti/mri-meta-extract?utm_source=github.com&utm_medium=referral&utm_content=LREN-CHUV/mri-meta-extract&utm_campaign=Badge_Grade
.. |CircleCI| image:: https://circleci.com/gh/LREN-CHUV/mri-meta-extract.svg?style=svg
   :target: https://circleci.com/gh/LREN-CHUV/mri-meta-extract



            

Raw data

            {
    "maintainer": "", 
    "docs_url": null, 
    "requires_python": "", 
    "maintainer_email": "", 
    "cheesecake_code_kwalitee_id": null, 
    "coveralis": false, 
    "keywords": "", 
    "upload_time": "2017-01-20 11:07:19", 
    "author": "Mirco Nasuti", 
    "home_page": "https://github.com/LREN-CHUV/mri-meta-extract", 
    "github_user": "LREN-CHUV", 
    "download_url": "", 
    "platform": "", 
    "version": "1.2.0", 
    "cheesecake_documentation_id": null, 
    "description": "|License| |Codacy Badge| |CircleCI|\n\nMRI Meta-data Extractor\n=======================\n\nThis is a Python library providing methods to scan folders, extract\nmeta-data from files (DICOM, NIFTI, ...) and store them in a database.\n\nBuild\n-----\n\nRun ``./build.sh``. (Builds for Python3)\n\nPublish on PyPi\n---------------\n\nRun ``./publish.sh``.\n\nInstall\n-------\n\nRun ``pip install mri-meta-extract``. (Only tested with Python3)\n\nTest\n----\n\nEnter the ``tests`` directory.\n\nWith Docker\n~~~~~~~~~~~\n\nRun ``test.sh``\n\nWithout Docker\n~~~~~~~~~~~~~~\n\n-  Run a Postgres database on ``localhost:5432``.\n-  Run ``nosetest unittest.py``\n\nUse\n---\n\nCreate a provenance entity using :\n\n::\n\n    create_provenance(dataset, matlab_version=None, spm_version=None, spm_revision=None, fn_called=None, fn_version=None, others=None, db_url=None)\n\n    Create (or get if already exists) a provenance entity, store it in the database and get back a provenance ID.\n    * param dataset: Name of the data set.\n    * param matlab_version: (optional) Matlab version.\n    * param spm_version: (optional) SPM version.\n    * param spm_revision: (optional) SPM revision.\n    * param fn_called: (optional) Function called.\n    * param fn_version: (optional) Function version.\n    * param others: (optional) Any other information can be set using this field.\n    * param db_url: (optional) Database URL. If not defined, it looks for an Airflow configuration file.\n    * return: Provenance ID.\n\nScan a folder to populate the database :\n\n::\n\n    def visit(folder, provenance_id, previous_step_id=None, db_url=None)\n\n    Record all files from a folder into the database.\n    The files are listed in the DB. If a file has been copied from previous step without any transformation, it will be\n    detected and marked in the DB. The type of file will be detected and stored in the DB. If a files (e.g. a DICOM\n    file) contains some meta-data, those will be stored in the DB.\n    * param folder: folder path.\n    * param provenance_id: provenance label.\n    * param previous_step_id: (optional) previous processing step ID. If not defined, we assume this is the first\n    processing step.\n    * param boost: (optional) When enabled, we consider that all the files from a same folder share the same meta-data.\n    When enabled, the processing is (about 2 times) faster. This option is enabled by default.\n    * param db_url: (optional) Database URL. If not defined, it looks for an Airflow configuration file.\n    * return: return processing step ID.\n\n.. |License| image:: https://img.shields.io/badge/license-Apache--2.0-blue.svg\n   :target: https://github.com/LREN-CHUV/airflow-imaging-plugins/blob/master/LICENSE\n.. |Codacy Badge| image:: https://api.codacy.com/project/badge/Grade/4547fb5d1e464e4087640e046893576a\n   :target: https://www.codacy.com/app/mirco-nasuti/mri-meta-extract?utm_source=github.com&utm_medium=referral&utm_content=LREN-CHUV/mri-meta-extract&utm_campaign=Badge_Grade\n.. |CircleCI| image:: https://circleci.com/gh/LREN-CHUV/mri-meta-extract.svg?style=svg\n   :target: https://circleci.com/gh/LREN-CHUV/mri-meta-extract\n\n\n", 
    "lcname": "mri_meta_extract", 
    "bugtrack_url": null, 
    "github": true, 
    "name": "mri_meta_extract", 
    "license": "Apache 2.0", 
    "travis_ci": false, 
    "github_project": "mri-meta-extract", 
    "summary": "Extract meta-data from DICOM and NIFTI files", 
    "split_keywords": [], 
    "author_email": "mirco.nasuti@chuv.ch", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2017-01-20T11:07:19", 
            "comment_text": "", 
            "python_version": "py3", 
            "url": "https://pypi.python.org/packages/50/5a/55031a8b9167b626523ed75851bfe74bc3321f93e86706ec651cb3f1576d/mri_meta_extract-1.2.0-py3-none-any.whl", 
            "md5_digest": "4bb159579c6e2e2cc70e01f175c2cb66", 
            "downloads": 0, 
            "filename": "mri_meta_extract-1.2.0-py3-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "50/5a/55031a8b9167b626523ed75851bfe74bc3321f93e86706ec651cb3f1576d/mri_meta_extract-1.2.0-py3-none-any.whl", 
            "size": 13019
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}