-
Notifications
You must be signed in to change notification settings - Fork 0
/
antsRegistrationExampleCommand.sh
51 lines (38 loc) · 1.45 KB
/
antsRegistrationExampleCommand.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# /usr/bin/sh
fixedImage=./InputData/r16sliceWithCircle.nii.gz
fixedMask=./InputData/r16mask.nii.gz
movingImage=./InputData/r64sliceWithSquare.nii.gz
movingMask=./InputData/r64mask.nii.gz
#######
#
# Do with no mask
#
outputDirectory=./OutputNoMask/
mkdir -p $outputDirectory
antsRegistration -d 2 -v 1 \
-o [${outputDirectory}/ants,${outputDirectory}/antsWarped.nii.gz,${outputDirectory}/antsInverseWarped.nii.gz] \
-r [${fixedMask},${movingMask},1] \
-t SyN[0.1,3,0] \
-c [100x75x20x0,0,10] \
-m CC[${fixedImage},${movingImage},1,4] \
-f 4x3x2x1 \
-s 1x1x0x0
CreateJacobianDeterminantImage 2 ${outputDirectory}/ants1Warp.nii.gz ${outputDirectory}/ants1WarpJacobian.nii.gz
/Applications/ITK-SNAP.app/Contents/MacOS/ITK-SNAP -g $fixedImage -o ${outputDirectory}/antsWarped.nii.gz -s $fixedMask &
#######
#
# Do with mask
#
outputDirectory=./OutputWithMask/
mkdir -p $outputDirectory
antsRegistration -d 2 -v 1 \
-o [${outputDirectory}/ants,${outputDirectory}/antsWarped.nii.gz,${outputDirectory}/antsInverseWarped.nii.gz] \
-r [${fixedMask},${movingMask},1] \
-t SyN[0.1,3,0] \
-c [100x75x20x0,0,10] \
-m CC[${fixedImage},${movingImage},1,4] \
-f 4x3x2x1 \
-s 1x1x0x0 \
-x [${fixedMask},${movingMask}]
CreateJacobianDeterminantImage 2 ${outputDirectory}/ants1Warp.nii.gz ${outputDirectory}/ants1WarpJacobian.nii.gz
/Applications/ITK-SNAP.app/Contents/MacOS/ITK-SNAP -g $fixedImage -o ${outputDirectory}/antsWarped.nii.gz -s $fixedMask &