forked from fkong7/Auto-LV-Modeling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_surfregist.sh
32 lines (28 loc) · 917 Bytes
/
run_surfregist.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Use SimpleElastix to register surface meshes
# Path to the ct/mr images or segmentation results
image_dir=./01-Images/ct_test/BD9702
# Path to the mask file
mask_dir=./02-Segmnts/BD9702
# Path to the unregistered surface mesh
surface_dir=./03-Surfaces/BD9702
# Path to the registered surface meshes
output_dir=./04-SurfReg/BD9702
# Phase ID of the surface mesh used as the registration target
start_phase=9
# Total number of phases
#total_phase=10
# Input format of unregistered surfaces
surf_fn=$(printf "$surface_dir/frame%03d.nii.gz.vtp" $start_phase)
# Name of the images in image_dir
imag_format=frame%03d.nii.gz
# Registration with SimpleElastix
python Modeling/elastix_main.py \
--image_dir $mask_dir \
--mask_dir $mask_dir \
--output_dir $output_dir \
--start_phase $start_phase \
--surface_fn $surf_fn \
--im_name $imag_format \
--edge_size 2.5 \
--write \
--smooth