DCM PROCESSOR
A dicom processing library setup with docker containers.
DEPENDENCIES
- Python (version >= 3.6)
- Docker
- Docker Compose (you can install with
pip
package manager with the command pip install docker-compose
)
NOTES ON DEPENDENCIES
- Current version of the library supports only unix (linux and macOS). However the library was developed and well tested on Ubuntu 20.04.
- 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
- You need to make sure you have the current version of
docker-compose
installed.
INSTALLATION
pip install dcm-processor
CREATE AN APPLICATION
-
Run the command below and follow the prompt.
dcm-processor create app
-
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
- Run the command below and select the application to start it.
dcm-processor start app
STOP AN APPLICATION
- Run the command below and select the application to remove it.
dcm-processor stop app
CREATE A SERVICE TEMPLATE
- Run command below and follow prompt to create a service template.
dcm-processor create service
- 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
- Run command below and follow prompt to install a service.
dcm-processor install service
REMOVE SERVICE
- Run command below and follow prompt to remove a service.
dcm-processor remove service
CREATE WORKER TEMPLATE
INSTALL WORKER
- Run command below and follow prompt to install a worker.
dcm-processor install worker
REMOVE WORKER
- Run command below and follow prompt to remove a worker.
dcm-processor remove worker
TO DOS
- Add documentation for non-interactive (-o) mode.
- Add autostart function to start applications at boot time.
- Support windows environment.
- Run tests on other linux systems.