Sign inSign up

acilbwh/chestimagingplatform

Sponsored OSS

By BWH

•Updated over 1 year ago

Official build of the Chest Imaging Platform (CIP)

Image
0

5.7K

acilbwh/chestimagingplatform repository overview

⁠What is the Chest Imaging Platform?

The Chest Imaging Platform (CIP) offers both a software library and a clinical-oriented tool that can enable the development and translation of known and novel quantitative phenotypes in lung diseases, including Chronic Obstructive Pulmonary Disease (COPD), Interstitial Lung Disease (ILD) and Pulmonary Vascular Disease (PVD).

⁠Hardware requirements

Some algorithms (deep learning ones) require up to 16 GiB RAM memory.

⁠Docker settings:

  • **Linux**: Default settings
    
  • Mac: Go to Preferences -> Advanced and set memory to 16 GiB. It's also recommended to assign more than 1 CPU.
  • Windows: Not supported

⁠Usage

The container has one mount point /host. The local folder mapped to the mount point is used to feed input data to the container and to store output data.

Download: $ docker pull acilbwh/chestimagingplatform

Create the container: $ docker run -ti --name your_container_name -v your_local_folder:/host -d acilbwh/chestimagingplatform

Attach to the container CLI: $ docker exec -ti your_container_name /bin/bash

⁠How to execute a CLI

All CLIs from the ChestImagingPlatform can be executed interactively by calling docker exec: Notice that all input files must be in the mapped local folder used to create the container.

$ docker exec -ti your_container_name  CLI_command [args]
  • To execute a python or bash script the process is similar: $ docker exec -ti your_container_name python path_to_pythonScript [args] $ docker exec -ti your_container_name bash path_to_bashScript [args]

⁠Example 0: Convert DICOM to NRRD

This example converts a CT scan in DICOM format to NRRD format, that is the input format used in CIP's CLIs.

$ docker exec -ti your_container_nam> ConvertDicom --dir path_to_DICOM_folder -o output_file.nrrd

⁠Example 1: Generate partial lung labelmap and parenchyma phenotypes

This examples extract a lung mask from an input CT and compute parenchyma phenotypes:

  • Filter image
$ docker exec -ti your_container_name GenerateMedianFilteredImage -i your_input_ct.nrrd -o your_filtered_ct.nrrd
  • Generate partialLungLabelMap
$ docker exec -ti your_container_name GeneratePartialLungLabelMap --ict  your_filtered_ct.nrrd -o your_partialLungLabelMap.nrrd
  • Generate parenchyma phenotypes
$ docker exec -ti your_container_name  python /ChestImagingPlatform/cip_python/phenotypes/parenchyma_phenotypes.py --in_ct your_input_ct.nrrd --in_lm your_partialLungLabelMap.nrrd --cid your_input_ct_name -r chest_regions -t chest_types --out_csv your_parechyma_phenotypes_file.csv

⁠Example 2: DCNN lung segmentation

This example extract a lung mask from an input CT using a deep learning approach combining an axial and a coronal model.

$ docker exec -ti your_container_name  python /ChestImagingPlatform/cip_python/dcnn/projects/lung_segmenter/lung_segmenter_dcnn.py --i your_input_ct.nrrd --t combined --o your_partialLungLabelMap.nrrd

Quick DCNN segmentation: Using downsampling and only one plane the segmentation process can be much faster, but the output labelmap could be less accurate in some cases. The following example shows how to use the quick approach:

$ docker exec -ti your_container_name  python /ChestImagingPlatform/cip_python/dcnn/projects/lung_segmenter/lung_segmenter_dcnn.py --i your_input_ct.nrrd --t coronal --n 2 --o your_partialLungLabelMap.nrrd

⁠Example 3: Extract emphysema phenotypes from a local histogram classification on a CT

Pull local_histogram_pipeline.sh script from CIPDocker repository⁠

$ docker exec -ti your_container_name  bash path_to_local_histogram_pipeline.sh -i your_input_ct.nrrd -m your_partialLungLabelMap.nrrd

⁠Example 4: DCNN low dose to high dose

This example take a low dose CT as an input and generate a filtered image simulating a high dose scan.

$ docker exec -ti your_container_name  python /ChestImagingPlatform/cip_python/dcnn/projects/low_to_high_dose_filter/low_to_high_dose_filter_dcnn.py --i your_input_LD_scan.nrrd --o your_output_HD_scan.nrrd

⁠Supported Tags

⁠Quick Reference

Tag summary

Content type

Image

Digest

sha256:02d800ee5…

Size

2.8 GB

Last updated

over 3 years ago

docker pull acilbwh/chestimagingplatform

This week's pulls

Pulls:

33

Last week