a project for fit a surface to cloud point of lung base as diaphragm Requrirements:
nib
tqdm
np
os
scipy.ndimage
matplotlib
skimage.measure
smoothed_data = gaussian_filter(projection, sigma=8) # higher sigma remove more noise e.g., 4-10
contours = find_contours(smoothed_data, 0.90) # lower percentage remove more noise e.g, 1.0-0.8
you need to prepare lung segmentation (hofmann is a good choice) and change input/output path in following steps:
run step1 to rougly segment diaphragm
then step2 to precise the surface points
then step3 to fit a surface to the cloud points