Lung biomechanical modeling project
Emory 4DCT data download
- Go to download page
- Submit access request form
- Landing page contains password
- For each case packet i=1..10,
- Follow the download link (DropBox)
- Enter password and download
Case${i}Pack.zip - Move .zip file to
lung-project/data/download
- Unzip case packets into
lung-project/data/Emory-4DCT- Use the commands below:
cd lung-project
for i in {1..10};
do unzip data/download/Case${i}Pack.zip -d data/Emory-4DCT;
doneConda environment setep
Run the following to create the conda environment and register it as jupyter notebook kernel:
mamba env create --file=environment.yml
mamba activate 4DCT
python -m ipykernel install --user --name=4DCTSimpleElastix
We have to build this from source code, but it is pretty easy. Follow the commands below:
https://simpleelastix.readthedocs.io/GettingStarted.html
# build from source code (takes ~2 hours)
git clone https://github.com/SuperElastix/SimpleElastix
mkdir SimpleElastix/build
cd SimpleElastix/build
cmake ../SuperBuild/ -DWRAP_DEFAULT=OFF -DWRAP_PYTHON=ON
make -j8
# install python bindings (fast)
cd SimpleITK-build/Wrapping/Python
mamba activate 4DCT
python Packaging/setup.py install --prefix=$CONDA_PREFIXTotalSegmentator
#pip install TotalSegmentator
TotalSegmentator -i $input_image -o $output_dir --device gpu --preview --statistics -ta total --roi_subset lung_upper_lobe_right lung_upper_lobe_left lung_middle_lobe_right lung_lower_lobe_right lung_lower_lobe_left
TotalSegmentator -i $input_image -o $output_dir --device gpu --preview --statistics -ta lung_vessels
totalseg_combine_masks -i $output_dir -o $output_dir/lung_combined_mask.nii.gz -m lungCorrField
git clone git@github.com/multimodallearning/Lung250M-4B.git
cd Lung250M-4B/corrfield
python corrfield.py -F {fixed_image} -M {moving_image} -m {fixed_mask} -o {output_path}