guzmanrq/feature-extraction

By guzmanrq

Updated 10 months ago

Repository that contains docker images for the platform for extracting radiomic features.

Image

47

Feature extraction web app

This repository contains a Docker image, a simple web application that deploys in local a web api to extract radiomics features from images.

Prerequisites

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.

Running the Docker

To download the Docker image, follow these steps:

  1. Pull the image contained in this repository:

docker pull guzmanrq/feature-extraction:test1

  1. Run the Docker image following this command:

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.

Accesing the web app locally and extracting features

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.

Stopping the Application

To stop the running container, follow these steps:

  1. Find the container ID:

docker ps

Look for the container running the guzmanrq/feature-extraction:test1 image and copy its ID.

  1. Stop the container:

docker stop [CONTAINER_ID]

Docker Pull Command

docker pull guzmanrq/feature-extraction