Module Import alias Import alias ImportFrom alias ImportFrom alias Import alias Import alias ImportFrom alias Import alias identifier ImportFrom alias Import alias identifier Import alias identifier Import alias Import alias FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore ListLoad Num Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num Print Str NameLoad Print Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd BinOpAdd Str NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Print Str Assign NameStore BinOpAdd NameLoad Str Print Str NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Call NameLoad NameLoad Str NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore BinOpSub NameLoad Num Assign NameStore Num Print Str While CompareEq NameLoad Num body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad BinOpAdd NameLoad NameLoad If CompareGt NameLoad Num body Assign NameStore Num Break If CompareEq NameLoad Num body Break Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad Print Str Call NameLoad NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad NameLoad Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Str Print Str Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad NameLoad Str NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Print Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq Call AttributeLoad NameLoad attr NameLoad Num NameLoad Num body AugAssignAdd NameStore Num Expr Call NameLoad NameLoad NameLoad orelse Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Print NameLoad Expr Call NameLoad NameLoad
N/A N/A numpy N/A os math sqrt scipy ndimage N/A commands N/A nibabel mpl_toolkits.mplot3d Axes3D N/A matplotlib.pyplot plt sct_nurbs_modif * N/A make_centerline centerline N/A sct_utils sct N/A sys N/A linear_fitting main N/A N/A file_name smooth N/A 3 N/A N/A div N/A 25 N/A N/A path fname ext_fname N/A N/A sct extract_fname file_name N/A exit 0 N/A file to be processed:  file_name N/A Applying propseg to get the centerline as a binary image... N/A fname_centerline N/A fname _centerline N/A cmd N/A N/A sct_propseg -i  file_name  -o . -t t2 -centerline-binary N/A N/A N/A sct run cmd N/A centerline smoothing... N/A fname_smooth N/A fname_centerline _smooth N/A Gauss sigma:  smooth N/A cmd N/A N/A N/A N/A N/A N/A fslmaths  fname_centerline  -s  N/A str smooth fname_smooth ext_fname N/A N/A N/A sct run cmd N/A d div N/A N/A add N/A d 1 N/A e 1 N/A generating the centerline... N/A N/A e 1 N/A N/A add 1 N/A e N/A N/A centerline check_nurbs add None None N/A fname_smooth ext_fname N/A N/A add 30 N/A N/A exit 1 N/A N/A N/A exit 1 N/A N/A N/A d add N/A size e N/A nurbs_ctl_points N/A N/A int size d N/A straightening...  d =  N/A str d N/A cmd N/A N/A N/A N/A N/A N/A sct_straighten_spinalcord -i  file_name  -c  fname_smooth ext_fname  -n  N/A str nurbs_ctl_points N/A N/A N/A sct run cmd N/A 
        print 'applying propseg'
        fname_straight = fname+'_straight'+ext_fname
        final_file_name = fname+'_straight_seg'+ext_fname
        cmd = 'sct_propseg -i '+fname_straight+' -t t2'

         N/A apply warp to segmentation N/A final_file_name N/A N/A fname _straight_seg ext_fname N/A cmd N/A N/A N/A N/A N/A sct_WarpImageMultiTransform 3  fname_smooth ext_fname final_file_name  warp_curve2straight.nii.gz N/A N/A N/A sct run cmd N/A annalyzing the straightened file N/A N/A N/A linear_fitting returnSquaredErrors final_file_name d size N/A N/A N/A os remove N/A fname_centerline ext_fname N/A N/A N/A os remove N/A fname_smooth ext_fname N/A N/A N/A os remove warp_curve2straight.nii.gz N/A N/A N/A os remove warp_straight2curve.nii.gz N/A returnCenterline N/A N/A fname div N/A N/A N/A N/A N/A N/A centerline returnCenterline fname 1 div 1 N/A N/A div 1 N/A N/A returnCenterline fname div N/A N/A div N/A N/A N/A __name__ __main__ N/A N/A file_name N/A N/A sys argv N/A 1 N/A file_name N/A N/A main file_name