dcm-processor


Namedcm-processor JSON
Version 1.1.3 PyPI version JSON
download
home_pagehttps://github.com/giesekow/dcm-processor-cli
SummaryA Command line tool for the dicom processor library
upload_time2024-05-02 07:20:41
maintainerNone
docs_urlNone
authorGiles Tetteh
requires_pythonNone
licenseNone
keywords orthanc dicom worker processor translation medical
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # DCM PROCESSOR
A dicom processing library setup with docker containers.

## DEPENDENCIES
1. Python (version  >= 3.6)
1. Docker
2. Docker Compose  (you can install with `pip` package manager with the command `pip install docker-compose`)

### NOTES ON DEPENDENCIES
1. Current version of the library supports only unix (linux and macOS). However the library was developed and well tested on Ubuntu 20.04.
2. Current user should have access to execute docker commands without sudo. This can be normally achieved in linux with the command below:  
`sudo usermod -aG docker $USER`
3. You need to make sure you have the current version of `docker-compose` installed.


## INSTALLATION
`pip install dcm-processor`

## CREATE AN APPLICATION
1. Run the command below and follow the prompt.  
`dcm-processor create app`

2. In case you did not select `yes` to initialize the application after creation then run the command below to initialize the application.  
`dcm-processor init app`


## START AN APPLICATION
1. Run the command below and select the application to start it.  
`dcm-processor start app`

## STOP AN APPLICATION
1. Run the command below and select the application to remove it.  
`dcm-processor stop app`


## CREATE A SERVICE TEMPLATE
1. Run command below and follow prompt to create a service template.  
`dcm-processor create service`
2. Fill in the files in `registry` folder and copy your source code into the `module` folder.

### Service entry in the `registry`
- The `settings.json` file can either be an object or an array of objects with the following fields:
    * `jobName` :  [string,required] the name of the job, this should be unique from other service jobs.

    * `worker` : [string,required] name of the function to be run as the worker, this should be a full function name. (see section below for details.).

    * `callback` : [string,required] name of the function which determines if a job should be scheduled for the current dicom processing or not. (see section below for details).

    * `dependsOn` : [string/list of string,optional] name(s) of jobs which the current service job depends on. this will make sure that those jobs run successfully before this job runs.

    * `priority` : [string,optional] the priority level assigned to this job. if not specified a default priority is assigned.

    * `timeout` : [string/number,optional] the RQ queuing timeout default is 1 hour.

    * `params`: [object,optional] this is an object with additional parameters that will be sent to the worker function.

    * `sortPosition` : [number,optional] this is a sorting variable which is used to sort the order in which jobs are scheduled (Note: independent jobs are however scheduled before dependent jobs).

    * `description` : [string,optional] this is a description for this current job. Its not used in any operation but only for third parties to have an idea what your service does.

- The python file `__init__.py` should contain the `callback` function(s) you stated in the `settings.json` file


## INSTALL SERVICE
1. Run command below and follow prompt to install a service.  
`dcm-processor install service`


## REMOVE SERVICE
1. Run command below and follow prompt to remove a service.  
`dcm-processor remove service`


## CREATE WORKER TEMPLATE
1. Run command below and follow prompt to create a worker template.  
`dcm-processor create worker`

2. Fill in the files as follows:  
    - The `settings.json` file can either be an object or an array of objects with the following fields:
        * `name` :  [string,required] the name of the worker, this should be unique from other worker.

        * `scripts` : [list of shell scripts] scripts that are executed `during building of the docker image` to install optional packages etc. defaults `["script.sh"]` pointing to the default script file in the template.

        * `entryScriptPaths` : [list of mounted paths] name of docker mounted path which will contain shell script that are executed at the start of the worker. This can be used to executed dynamic shell scripts `during container runtime`.

        * `baseImage` : [string, required] name of the base docker image to build the container on. defaults ubuntu:20.04.

        * `environments` : [list of objects] a list of virtual environment configurations. Each object contains the fields below:    

            * `name` : [string, required] the name of the virtualenv. Should be unique for all virtualenvs in the current worker.

            * `requirements`: [list of file paths] requirements files with python libraries to be installed in the virtualenv. This is executed `during building of the docker image`.

            * `entryRequirementPaths` : [list of mounted paths] List of docker mounted paths which will contain requirements files which can be used to update the python library dynamically. These are executed at the start of the worker `during runtime`.

            * `channels` : [list of string] this is the list of `service channels` that will be executed with this virtualenv.

            * `pythonVersion` : [string] the version of python to be used for this virtualenv.

    - The `script.sh` can be used to run any shell commands needed to install extra packages like `java, compilers, etc` needed to run the service modules.

    - The `requirements.txt` should be filled with the python libraries needed to run the service modules.


## INSTALL WORKER
1. Run command below and follow prompt to install a worker.  
`dcm-processor install worker`


## REMOVE WORKER
1. Run command below and follow prompt to remove a worker.  
`dcm-processor remove worker`

## TO DOS
1. Add documentation for non-interactive (-o) mode.
2. Add autostart function to start applications at boot time.
3. Support windows environment.
4. Run tests on other linux systems.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/giesekow/dcm-processor-cli",
    "name": "dcm-processor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "orthanc, dicom, worker, processor, translation, medical",
    "author": "Giles Tetteh",
    "author_email": "giles.tetteh@tum.de",
    "download_url": "https://files.pythonhosted.org/packages/68/f5/c402cbff6dee4a2fd7a01ca4a45950828058ce099f06e007e3c6077ec156/dcm-processor-1.1.3.tar.gz",
    "platform": null,
    "description": "# DCM PROCESSOR\nA dicom processing library setup with docker containers.\n\n## DEPENDENCIES\n1. Python (version  >= 3.6)\n1. Docker\n2. Docker Compose  (you can install with `pip` package manager with the command `pip install docker-compose`)\n\n### NOTES ON DEPENDENCIES\n1. Current version of the library supports only unix (linux and macOS). However the library was developed and well tested on Ubuntu 20.04.\n2. Current user should have access to execute docker commands without sudo. This can be normally achieved in linux with the command below:  \n`sudo usermod -aG docker $USER`\n3. You need to make sure you have the current version of `docker-compose` installed.\n\n\n## INSTALLATION\n`pip install dcm-processor`\n\n## CREATE AN APPLICATION\n1. Run the command below and follow the prompt.  \n`dcm-processor create app`\n\n2. In case you did not select `yes` to initialize the application after creation then run the command below to initialize the application.  \n`dcm-processor init app`\n\n\n## START AN APPLICATION\n1. Run the command below and select the application to start it.  \n`dcm-processor start app`\n\n## STOP AN APPLICATION\n1. Run the command below and select the application to remove it.  \n`dcm-processor stop app`\n\n\n## CREATE A SERVICE TEMPLATE\n1. Run command below and follow prompt to create a service template.  \n`dcm-processor create service`\n2. Fill in the files in `registry` folder and copy your source code into the `module` folder.\n\n### Service entry in the `registry`\n- The `settings.json` file can either be an object or an array of objects with the following fields:\n    * `jobName` :  [string,required] the name of the job, this should be unique from other service jobs.\n\n    * `worker` : [string,required] name of the function to be run as the worker, this should be a full function name. (see section below for details.).\n\n    * `callback` : [string,required] name of the function which determines if a job should be scheduled for the current dicom processing or not. (see section below for details).\n\n    * `dependsOn` : [string/list of string,optional] name(s) of jobs which the current service job depends on. this will make sure that those jobs run successfully before this job runs.\n\n    * `priority` : [string,optional] the priority level assigned to this job. if not specified a default priority is assigned.\n\n    * `timeout` : [string/number,optional] the RQ queuing timeout default is 1 hour.\n\n    * `params`: [object,optional] this is an object with additional parameters that will be sent to the worker function.\n\n    * `sortPosition` : [number,optional] this is a sorting variable which is used to sort the order in which jobs are scheduled (Note: independent jobs are however scheduled before dependent jobs).\n\n    * `description` : [string,optional] this is a description for this current job. Its not used in any operation but only for third parties to have an idea what your service does.\n\n- The python file `__init__.py` should contain the `callback` function(s) you stated in the `settings.json` file\n\n\n## INSTALL SERVICE\n1. Run command below and follow prompt to install a service.  \n`dcm-processor install service`\n\n\n## REMOVE SERVICE\n1. Run command below and follow prompt to remove a service.  \n`dcm-processor remove service`\n\n\n## CREATE WORKER TEMPLATE\n1. Run command below and follow prompt to create a worker template.  \n`dcm-processor create worker`\n\n2. Fill in the files as follows:  \n    - The `settings.json` file can either be an object or an array of objects with the following fields:\n        * `name` :  [string,required] the name of the worker, this should be unique from other worker.\n\n        * `scripts` : [list of shell scripts] scripts that are executed `during building of the docker image` to install optional packages etc. defaults `[\"script.sh\"]` pointing to the default script file in the template.\n\n        * `entryScriptPaths` : [list of mounted paths] name of docker mounted path which will contain shell script that are executed at the start of the worker. This can be used to executed dynamic shell scripts `during container runtime`.\n\n        * `baseImage` : [string, required] name of the base docker image to build the container on. defaults ubuntu:20.04.\n\n        * `environments` : [list of objects] a list of virtual environment configurations. Each object contains the fields below:    \n\n            * `name` : [string, required] the name of the virtualenv. Should be unique for all virtualenvs in the current worker.\n\n            * `requirements`: [list of file paths] requirements files with python libraries to be installed in the virtualenv. This is executed `during building of the docker image`.\n\n            * `entryRequirementPaths` : [list of mounted paths] List of docker mounted paths which will contain requirements files which can be used to update the python library dynamically. These are executed at the start of the worker `during runtime`.\n\n            * `channels` : [list of string] this is the list of `service channels` that will be executed with this virtualenv.\n\n            * `pythonVersion` : [string] the version of python to be used for this virtualenv.\n\n    - The `script.sh` can be used to run any shell commands needed to install extra packages like `java, compilers, etc` needed to run the service modules.\n\n    - The `requirements.txt` should be filled with the python libraries needed to run the service modules.\n\n\n## INSTALL WORKER\n1. Run command below and follow prompt to install a worker.  \n`dcm-processor install worker`\n\n\n## REMOVE WORKER\n1. Run command below and follow prompt to remove a worker.  \n`dcm-processor remove worker`\n\n## TO DOS\n1. Add documentation for non-interactive (-o) mode.\n2. Add autostart function to start applications at boot time.\n3. Support windows environment.\n4. Run tests on other linux systems.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Command line tool for the dicom processor library",
    "version": "1.1.3",
    "project_urls": {
        "Homepage": "https://github.com/giesekow/dcm-processor-cli"
    },
    "split_keywords": [
        "orthanc",
        " dicom",
        " worker",
        " processor",
        " translation",
        " medical"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0844f084ea20452ff373b8c9bdc2819df6e5b684c3a97432b8352e7606f45244",
                "md5": "5efe92d31424de46fa0b6fda6efdb76f",
                "sha256": "2e06fc6e6cc6b32ec33483e7a91e15024a5882b492dc3e25156790b1cafb6b1d"
            },
            "downloads": -1,
            "filename": "dcm_processor-1.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5efe92d31424de46fa0b6fda6efdb76f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4095902,
            "upload_time": "2024-05-02T07:20:36",
            "upload_time_iso_8601": "2024-05-02T07:20:36.739372Z",
            "url": "https://files.pythonhosted.org/packages/08/44/f084ea20452ff373b8c9bdc2819df6e5b684c3a97432b8352e7606f45244/dcm_processor-1.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68f5c402cbff6dee4a2fd7a01ca4a45950828058ce099f06e007e3c6077ec156",
                "md5": "6c683463f24c6b53a10615ad06b5a9bb",
                "sha256": "6ababc9d74454b04d3840930cccd92c160bbcaa43f9c67590049c3cdc94ace01"
            },
            "downloads": -1,
            "filename": "dcm-processor-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "6c683463f24c6b53a10615ad06b5a9bb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4092592,
            "upload_time": "2024-05-02T07:20:41",
            "upload_time_iso_8601": "2024-05-02T07:20:41.303864Z",
            "url": "https://files.pythonhosted.org/packages/68/f5/c402cbff6dee4a2fd7a01ca4a45950828058ce099f06e007e3c6077ec156/dcm-processor-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-02 07:20:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "giesekow",
    "github_project": "dcm-processor-cli",
    "github_not_found": true,
    "lcname": "dcm-processor"
}
        
Elapsed time: 0.26715s