Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Print Str Expr Call AttributeLoad NameLoad attr Num TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Print Str Expr Call AttributeLoad NameLoad attr Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str Import alias identifier Assign NameStore Str ClassDef bases body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num decorator_list decorator_list FunctionDef arguments args defaults body Print Str Print Str Print Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num Str handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Print Call NameLoad NameLoad Expr Call NameLoad For TupleStore NameStore NameStore NameLoad body If CompareEq NameLoad Str body Expr Call NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr Call NameLoad NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr Call NameLoad NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr Call NameLoad NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr Call NameLoad NameLoad orelse If CompareIn NameLoad Str body Assign AttributeStore NameLoad attr Call NameLoad NameLoad If BoolOpOr CompareEq AttributeLoad NameLoad attr Str CompareEq AttributeLoad NameLoad attr Str CompareEq AttributeLoad NameLoad attr Str CompareEq AttributeLoad NameLoad attr Str body Print Str Expr Call NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Assign AttributeStore NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr Str Print Str AttributeLoad NameLoad attr Print Str AttributeLoad NameLoad attr Print Str AttributeLoad NameLoad attr Print Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpAdd Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Index BinOpAdd Call AttributeLoad NameLoad attr Str Num SubscriptLoad NameLoad Index BinOpAdd Call AttributeLoad NameLoad attr Str Num SubscriptLoad NameLoad Index BinOpAdd Call AttributeLoad NameLoad attr Str Num If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str NameLoad Str Assign AttributeStore NameLoad attr BinOpAdd NameLoad Str Assign AttributeStore NameLoad attr BinOpAdd NameLoad Str If AttributeLoad NameLoad attr body Import alias identifier Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMult AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore BinOpMult AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore BinOpMult AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr CompareGt NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Num For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num body If CompareEq SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad Num body If CompareEq NameLoad Num body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Num Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad BinOpDiv NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Num For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad Num Assign NameStore BinOpSub NameLoad Num If CompareLt NameLoad Num body Assign NameStore Num If CompareGtE NameLoad Call NameLoad NameLoad body Assign NameStore BinOpSub Call NameLoad NameLoad Num Assign NameStore BinOpSub SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpSub SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpSub SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpAdd BinOpAdd BinOpMult NameLoad SubscriptLoad NameLoad Index NameLoad BinOpMult NameLoad SubscriptLoad NameLoad Index NameLoad BinOpMult NameLoad SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad BinOpMult Num Call AttributeLoad NameLoad attr Call NameLoad BinOpDiv NameLoad SubscriptLoad NameLoad Index Num body For NameStore Call NameLoad BinOpMult Num Call AttributeLoad NameLoad attr Call NameLoad BinOpDiv NameLoad SubscriptLoad NameLoad Index Num body Assign NameStore BinOpDiv BinOpSub BinOpSub NameLoad BinOpMult NameLoad BinOpSub BinOpSub BinOpAdd SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad Num BinOpMult NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad If CompareGt NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign SubscriptStore NameLoad Index NameLoad BinOpAdd SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index TupleLoad Call AttributeLoad NameLoad attr Call NameLoad BinOpSub BinOpSub BinOpAdd SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad Num Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call NameLoad BinOpSub BinOpSub BinOpAdd SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr CompareEq NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Num keyword NameLoad Assign SubscriptStore NameLoad Index TupleLoad NameLoad Num NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad NameLoad ExtSlice Slice Index Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad ExtSlice Slice Index Num keyword NameLoad keyword Num keyword NameLoad Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Num Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad keyword Str keyword Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad SubscriptLoad NameLoad ExtSlice Slice Index Num keyword Num keyword Str keyword NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call NameLoad SubscriptLoad NameLoad ExtSlice Slice Index Num Num Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpSub SubscriptLoad NameLoad ExtSlice Slice Index Num NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore BinOpDiv NameLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Print BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call AttributeLoad NameLoad attr Num decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A os N/A sys N/A time N/A getopt N/A commands N/A math N/A scipy N/A scipy.signal N/A scipy.fftpack N/A N/A N/A nibabel N/A N/A N/A ImportError N/A N/A --- nibabel not installed! Exit program. --- N/A N/A N/A sys exit 2 N/A N/A N/A numpy np N/A N/A N/A ImportError N/A N/A --- numpy not installed! Exit program. --- N/A N/A N/A sys exit 2 N/A N/A status path_sct N/A N/A commands getstatusoutput echo $SCT_DIR N/A N/A N/A N/A sys path append N/A path_sct /scripts N/A sct_utils sct N/A fsloutput export FSLOUTPUTTYPE=NIFTI;  param_class N/A N/A __init__ N/A N/A self N/A N/A N/A N/A self debug 0 N/A N/A self input_anat N/A N/A self contrast N/A N/A self mean_distance_mat N/A N/A self output_path N/A N/A self input_centerline N/A N/A self shift_AP 17 N/A N/A self size_AP 6 N/A N/A self size_RL 5 N/A N/A self verbose 0 N/A N/A self plot_graph 0 N/A N/A main N/A N/A N/A N/A N/A 


=================================================== N/A                Running: sct_labeling N/A ===================================================
 N/A start_time N/A N/A time time N/A param N/A param_class N/A N/A N/A N/A opts args N/A N/A getopt getopt N/A N/A sys argv N/A 1 hi:c:l:m:a:s:r:o:g:v: N/A N/A N/A N/A getopt GetoptError N/A err N/A N/A N/A str err N/A N/A usage N/A N/A opt arg opts N/A N/A N/A opt -h N/A N/A N/A usage N/A N/A N/A opt -i N/A N/A N/A param input_anat arg N/A N/A N/A opt -c N/A N/A N/A param contrast arg N/A N/A N/A opt -l N/A N/A N/A param input_centerline arg N/A N/A N/A opt -m N/A N/A N/A param mean_distance_mat arg N/A N/A N/A opt -a N/A N/A N/A param shift_AP N/A int arg N/A N/A N/A opt -s N/A N/A N/A param size_AP N/A int arg N/A N/A N/A opt -r N/A N/A N/A param size_RL N/A int arg N/A N/A N/A opt -o N/A N/A N/A param output_path arg N/A N/A N/A opt -g N/A N/A N/A param plot_graph N/A int arg N/A N/A N/A opt -v N/A N/A N/A param verbose N/A int arg N/A N/A N/A N/A param input_anat N/A N/A param contrast N/A N/A param input_centerline N/A N/A param mean_distance_mat N/A N/A 
 
 All mandatory arguments are not provided 
 
 N/A N/A usage N/A N/A input_path file_data ext_data N/A N/A sct extract_fname N/A param input_anat N/A N/A N/A param output_path N/A N/A N/A param output_path N/A N/A N/A os getcwd / N/A Input File: N/A param input_anat N/A Center_line file: N/A param input_centerline N/A Contrast: N/A param contrast N/A Mat File: N/A param mean_distance_mat N/A N/A N/A sct check_file_exist N/A param input_anat N/A N/A N/A sct check_file_exist N/A param input_centerline N/A N/A N/A sct check_file_exist N/A param mean_distance_mat N/A verbose N/A param verbose N/A command N/A fslhd  N/A param input_anat N/A result N/A N/A commands getoutput command N/A orientation N/A N/A N/A result N/A N/A N/A N/A result find qform_xorient 15 N/A result N/A N/A N/A N/A result find qform_yorient 15 N/A result N/A N/A N/A N/A result find qform_zorient 15 N/A N/A orientation ASR N/A N/A N/A N/A sct printv 
Reorient input volume to AP SI RL orientation... N/A param verbose N/A N/A N/A sct run N/A N/A N/A N/A N/A N/A sct fsloutput fslswapdim  N/A param input_anat  AP SI RL  input_path tmp.anat_orient N/A N/A N/A sct run N/A N/A N/A N/A N/A N/A sct fsloutput fslswapdim  N/A param input_centerline  AP SI RL  input_path tmp.centerline_orient N/A N/A param input_anat N/A input_path tmp.anat_orient.nii N/A N/A param input_centerline N/A input_path tmp.centerline_orient.nii N/A N/A param plot_graph N/A N/A pylab pl N/A N/A N/A sct printv 
Loading Images... verbose N/A anat_file N/A N/A nibabel load N/A param input_anat N/A anat N/A N/A anat_file get_data N/A hdr N/A N/A anat_file get_header N/A dims N/A hdr N/A dim N/A scales N/A hdr N/A pixdim N/A centerline_file N/A N/A nibabel load N/A param input_centerline N/A centerline N/A N/A centerline_file get_data N/A shift_AP N/A N/A param shift_AP N/A scales N/A 1 N/A size_AP N/A N/A param size_AP N/A scales N/A 1 N/A size_RL N/A N/A param size_RL N/A scales N/A 3 N/A N/A N/A np uint16 anat N/A N/A N/A sct printv 
Calculation of the profile intensity... verbose N/A N/A X Y Z N/A N/A np where N/A centerline 0 N/A j N/A N/A np argsort Y N/A y N/A Y N/A j N/A x N/A X N/A j N/A z N/A Z N/A j N/A index 0 N/A i N/A range N/A N/A len y 1 N/A N/A N/A N/A y N/A i N/A y N/A N/A i 1 N/A N/A N/A index 0 N/A N/A index_double i N/A N/A index_double N/A N/A np resize index_double N/A index 1 N/A N/A index_double N/A index i N/A index N/A index 1 N/A mask N/A N/A np ones N/A len y dtype bool N/A N/A mask N/A index_double False N/A y N/A y N/A mask N/A x N/A x N/A mask N/A z N/A z N/A mask N/A x1 N/A N/A np round N/A x N/A shift_AP N/A scales N/A 1 N/A I N/A N/A np zeros N/A N/A len y 1 N/A index N/A range N/A len y N/A N/A lim_plus N/A index 5 N/A lim_minus N/A index 5 N/A N/A lim_minus 0 N/A N/A lim_minus 0 N/A N/A lim_plus N/A len x1 N/A N/A lim_plus N/A N/A len x1 1 N/A Vx N/A N/A x1 N/A lim_plus N/A x1 N/A lim_minus N/A Vz N/A N/A z N/A lim_plus N/A z N/A lim_minus N/A Vy N/A N/A y N/A lim_plus N/A y N/A lim_minus N/A d N/A N/A N/A Vx N/A x1 N/A index N/A Vy N/A y N/A index N/A Vz N/A z N/A index N/A i_slice_RL N/A range N/A 2 N/A N/A np int N/A round N/A size_RL N/A scales N/A 3 N/A N/A i_slice_AP N/A range N/A 2 N/A N/A np int N/A round N/A size_AP N/A scales N/A 1 N/A N/A result N/A N/A N/A d N/A Vx N/A N/A N/A N/A x1 N/A index i_slice_AP size_AP 1 N/A Vz N/A z N/A index Vy N/A N/A result N/A N/A anat shape N/A 1 N/A N/A result N/A N/A anat shape N/A 1 N/A N/A I N/A index N/A N/A I N/A index N/A anat N/A N/A N/A N/A np int N/A round N/A N/A N/A N/A x1 N/A index i_slice_AP size_AP 1 N/A N/A np int N/A N/A np floor result N/A N/A np int N/A round N/A N/A N/A N/A z N/A index i_slice_RL size_RL 1 N/A start_centerline_y N/A y N/A 0 N/A X N/A N/A np where N/A I 0 N/A mask2 N/A N/A np ones N/A N/A len y 1 dtype bool N/A N/A mask2 N/A N/A X 0 False N/A N/A param plot_graph N/A N/A N/A N/A pl plot I N/A N/A N/A pl xlabel direction superior-inferior N/A N/A N/A pl ylabel intensity N/A N/A N/A pl title Intensity profile along the shifted spinal cord centerline N/A N/A N/A pl show N/A N/A N/A sct printv 
Detrending Intensity... verbose N/A frequency N/A N/A N/A scipy fftpack fftfreq N/A len N/A I N/A N/A N/A 0 d 1 N/A spectrum N/A N/A np abs N/A N/A N/A scipy fftpack fft N/A I N/A N/A N/A 0 n None axis -1 overwrite_x False N/A Wn N/A N/A N/A np amax frequency 10 N/A N 5 N/A N/A b a N/A N/A N/A scipy signal iirfilter N Wn rp None rs None btype low analog False ftype bessel output ba N/A I_fit N/A N/A N/A scipy signal filtfilt b a N/A I N/A N/A N/A 0 axis -1 padtype constant padlen None N/A N/A param plot_graph N/A N/A N/A N/A pl plot N/A I N/A N/A N/A 0 N/A N/A N/A pl plot I_fit N/A N/A N/A pl show N/A I_detrend N/A N/A np zeros N/A N/A len N/A I N/A N/A N/A 0 1 N/A N/A I_detrend N/A N/A N/A 0 N/A N/A I N/A N/A N/A 0 I_fit N/A N/A N/A param contrast T1 N/A N/A I_detrend N/A I_detrend N/A N/A np amax I_detrend N/A N/A I_detrend N/A I_detrend N/A abs N/A N/A np amin I_detrend N/A N/A param plot_graph N/A N/A N/A N/A pl plot N/A I_detrend N/A N/A N/A 0 N/A N/A N/A pl xlabel direction superior-inferior N/A N/A N/A pl ylabel intensity N/A N/A N/A pl title Intensity profile along the shifted spinal cord centerline after detrending and basic normalization N/A N/A N/A pl show N/A usage N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A os path basename __file__ 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
USAGE: 
   N/A N/A N/A os path basename __file__  -i <filename> -c <contrast> -l <centerline_binary_image> -m <mean_distance.mat> 

MANDATORY ARGUMENTS
  -i           input_file 
  -c           contrast 
  -l           Centerline binary Image  
  -m           mean_distance.mat 

OPTIONAL ARGUMENTS
  -o           Specify Output path.
  -a           shift_AP in mm. Default value is 17mm 
  -s           size_AP in mm. Default value is 6mm 
  -r           size_RL in mm. Default value is 5mm 
  -v {0,1}     Set verbose=1 for printing text. Default value is 0 
  -g {0,1}     Set value to 1 for plotting graphs. Default value is 0 
  -h           help. Show this message.

EXAMPLE:
   N/A N/A N/A os path basename __file__  -i t1.nii -c T1 -l segmentation_centerline_binary.nii -m mean_distance.mat
 N/A N/A N/A sys exit 2 N/A N/A N/A __name__ __main__ N/A N/A N/A main