ANTsPy icon indicating copy to clipboard operation
ANTsPy copied to clipboard

find equivalent for command line tool in antspy

Open amirreza1998 opened this issue 3 years ago • 0 comments

hi i have below code :

time_start=date +%s`

inputPath=${PWD}

dim=3 its=[50x50x5,1.e-7,5] its2=[5x5x5,1.e-7,5] smth=4x2x1 down=4x2x1 tx=" syn[ 0.25 , 2, 2 ] "

f=${inputPath}/MR_N1.nii;

for (( i = 1; i < 8 ; i++ )); do nm=N$i m=${inputPath}/${nm}.nii; ${ANTSPATH}/antsRegistration -d $dim
-r [$f, $m,1]
-m MI[ $f, $m , 1, 32 ]
-t affine[ 0.5 ]
-c $its
-s $smth
-f $down
-m MI[ $f, $m , 1, 32 ]
-t $tx
-c $its2
-s $smth
-f $down
-u 1
-o [${nm},${nm}_diffToMRN1.nii,${nm}_invToMRN1.nii]

mReg=${inputPath}/${nm}_diffToMRN1.nii;

${ANTSPATH}/MeasureImageSimilarity $dim -m MI[ $f, $mReg , 1, 32 ]

done

time_end=date +%s time_elapsed=$((time_end - time_start)) `

and i want to run this code by antspy library in python and i dont know what are -r , -m, MI, -t, -c, -u, -o and what are equivalent for them in ants.registration in antspy could you help me or give me link of tutorial till i know what is this command line code do and convert it to antspy

amirreza1998 avatar Apr 09 '22 12:04 amirreza1998