guzmanrq/feature-extraction
Repository that contains docker images for the platform for extracting radiomic features.
47
This repository contains a Docker image, a simple web application that deploys in local a web api to extract radiomics features from images.
Before you begin, ensure you have met the following requirements:
You have installed Docker on your machine. For installation instructions, visit Docker's official documentation.
You have a folder on the host device containing a series of images in NIfTI format. These images will be used for feature extraction, so each one must be accompanied by another NIfTI file corresponding to its segmentation, following the nomenclature below:
data/
├── image_1.nii
├── image_1_seg.nii
├── image_2.nii
├── image_2_seg.nii
└── ...
Here you can download a NIfTI image and its corresponding segmentation, so you can test the execution if you don't have any medical images.
To download the Docker image, follow these steps:
docker pull guzmanrq/feature-extraction:test1
docker run -v <path>:/app/src/data -p 5001:5000 test1
where <path>
is the path to the directory where are located the images and their segmentations.
This command runs the test
image in a new container. It maps port 5000 of the container to port 5001 on your host machine, allowing you to access the application via http://localhost
in your web browser.
Currently, there is only one endpoint available, which is for extracting features from the images in the directory. Once the Docker is running, insert http://localhost:5001/api/process-images
into a web browser.
After a few moments, if everything has gone correctly, a success message will appear, and in the same directory where you have the images on the host, you will see a CSV file with the extracted features.
To stop the running container, follow these steps:
docker ps
Look for the container running the guzmanrq/feature-extraction:test1
image and copy its ID.
docker stop [CONTAINER_ID]
docker pull guzmanrq/feature-extraction