Docker is a project that automates deployment of applications inside software containers. Docker
application is defined by images that contain all of the components and steps needed to initialize the application instance. A container is a running instance of the image. We provide an image that contains the compiled dcmqi
library. By using dcmqi
Docker container you can use dcmqi
on any operating system without having to compile it. All you need to do is install Docker on your system, and download the dcmqi
Docker image.
You will first need to install Docker on your system following these instructions. Docker is available for Mac, Windows and Linux. For the most part Docker installation is straightforward, but some extra steps need to be taken on Windows as discussed below.
Note the system requirements:
you will need to have Windows 10 Pro or above
you will need to enable Hyper-V package (Docker will prompt you)
IMPORTANT: You will also need to share the drive you will be using to communicate data to and from Docker image in Docker Settings as shown in the screenshot below.
Most likely you will experience the display of an error message similar to the one shown below.
If you have this error, make sure that the drive, where the HOST_DIR
is located, is shared:
right click onto the Docker task bar icon and choose "Settings"
choose "Shared Drives" from the left menu (a list of drives that are available to share will be displayed)
select the drive for your HOST_DIR
to be shared
confirm with Apply and continue
Pull the dcmqi
image to your system to instantiate the dcmqi
container:
You can now run any of the command line converter provided by dcmqi by passing the name of the converter as shown below:
The Dockerfile for qiicr/dcmqi
is available in the main repository of dcmqi
here. It does not rely on any proprietary or non-open-source components.
Docker containers cannot directly access the filesystem of the host. In order to pass files as arguments to the dcmqi
converter and to access files that converters create, an extra step is required to specify which directories will be used for file exchange using the -v
argument:
The argument above will make the HOST_DIR
path available within the container at CONTAINER_DIR
location. The files that will be read or written by the converter run from the docker container should be referred to via the CONTAINER_DIR
path.
(also see dcmqi
introduction tutorial!)
Assuming the docker image is installed, create an empty directory docker_test
.
Put the following test files from dcmqi source code repository into the docker_test
directory:
Run the itkimage2paramap
converter
The output DICOM object will be saved as docker_output_paramap.dcm
in the docker_test
directory.