Spinalcordtoolbox: Running sct_testing on poq_issue_732 branch #977 in Slicer Anconda Python Interactor

Created on 1 Sep 2016  ·  61Comments  ·  Source: spinalcordtoolbox/spinalcordtoolbox

Related to #732 development

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)

I ran sct_testing within Slicer's python interactor as suggested by @poquirion and @jcohenadad as an initial step toward calling sct within slicer. I am getting the following output from the test. It looks like there could be a problem with the itk versions. Any suggestions or help to get sct to work within slicer would be welcome.

I ran install_sct -m and pointed sct at Slicer's version of python with:
export SCT_PYTHON=/spare/hardisty/anaconda2
so they should be pointed at the same version of python.

Thanks

Michael

hardisty@starship:~$ ./s4r-conda/Slicer-build/Slicer --no-main-window --show-python-interactor

Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2

>>> import sys
>>> sys.path.append('/spare/hardisty/git/spinalcordtoolbox/scripts/')
>>> import sct_testing
>>> myArguments = ['-d']
>>> myArguments.append('0')
>>> myArguments.append('-p')
>>> myArguments.append('/spare/hardisty/anaconda2/sct_testing_data/data/')
>>> sct_testing.main(myArguments)

Path to testing data: /spare/hardisty/anaconda2/sct_testing_data/data/
Checking test_sct_apply_transfo.....................[FAIL]
sct_apply_transfo -i /spare/hardisty/anaconda2/sct_testing_data/data/template/te mplate/MNI-Poly-AMU_T2.nii.gz -d /spare/hardisty/anaconda2/sct_testing_data/data /t2/t2.nii.gz -w /spare/hardisty/anaconda2/sct_testing_data/data/t2/warp_templat e2anat.nii.gz

``` ~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_apply_transfo.py -i /s pare/hardisty/anaconda2/sct_testing_data/data/template/template/MNI-Poly-AMU_T2. nii.gz -d /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -w /spare /hardisty/anaconda2/sct_testing_data/data/t2/warp_template2anat.nii.gz

Parse list of warping fields...
Transfo #0: /spare/hardisty/anaconda2/sct_testing_data/data/t2/warp_template2a nat.nii.gz

Get dimensions of data...
30 x 30 x 150 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /spare/hardisty/anaconda2/sct_testing_data/data /template/template/MNI-Poly-AMU_T2.nii.gz -o MNI-Poly-AMU_T2_reg.nii.gz -t /spar e/hardisty/anaconda2/sct_testing_data/data/t2/warp_template2anat.nii.gz -r /spar e/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -n BSpline[3]
WARNING: In /home/brain/antsbin/ITKv4/Modules/Core/Common/src/itkObjectFactoryBa se.cxx, line 563
Possible incompatible factory load:
Running itk version :
itk version 4.9.0
Loaded factory version:
itk version 4.10.0
Loading factory:
/spare/hardisty/s4r-conda/Slicer-build/lib/Slicer-4.5/ITKFactories/libMRMLIDIOPl ugin.so

Segmentation fault (core dumped)
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118sct_apply_tr ansfo -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -d /sp are/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -w /spare/hardisty/ana conda2/sct_testing_data/data/t2/warp_template2anat.nii.gz
~~~~~~~~~~~~~~~~ ~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_apply_transfo.py -i /s pare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -d /spare/hardist y/anaconda2/sct_testing_data/data/t2/t2.nii.gz -w /spare/hardisty/anaconda2/sct_ testing_data/data/t2/warp_template2anat.nii.gz

Parse list of warping fields...
Transfo #0: /spare/hardisty/anaconda2/sct_testing_data/data/t2/warp_template2a nat.nii.gz

Get dimensions of data...
40 x 42 x 5 x 7

Create temporary folder...
mkdir tmp.160901103234/

Copying input data to tmp folder and convert to nii...
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -o tmp.160901103234/data.nii
cp /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz tmp.160901103234 /t2.nii.gz
cp /spare/hardisty/anaconda2/sct_testing_data/data/t2/warp_template2anat.nii.gz tmp.160901103234/warp_template2anat.nii.gz

Split along T dimension...

Apply transformation to each 3D volume...
isct_antsApplyTransforms -d 3 -i data_T0000.nii -o data_reg_T0000.nii -t warp_te mplate2anat.nii.gz -r t2.nii.gz -n BSpline[3]
WARNING: In /home/brain/antsbin/ITKv4/Modules/Core/Common/src/itkObjectFactoryBa se.cxx, line 563
Possible incompatible factory load:
Running itk version :
itk version 4.9.0
Loaded factory version:
itk version 4.10.0
Loading factory:
/spare/hardisty/s4r-conda/Slicer-build/lib/Slicer-4.5/ITKFactories/libMRMLIDIOPl ugin.so

Segmentation fault (core dumped)
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
Checking test_sct_check_atlas_integrity.............[OK]
Checking test_sct_compute_mtr.......................[OK]
Checking test_sct_concat_transfo....................[OK]
Checking test_sct_convert...........................[OK]
Checking test_sct_create_mask.......................[FAIL]
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0
~~~~~~~~~~~~~~~~ ~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spa re/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p coord,15x17 -size 1 0 -r 0

Create temporary folder...
mkdir tmp.160901103238/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160901103238/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 15,17,0,1:15,17,1,1:15,17,2, 1:15,17,3,1:15,17,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,S RA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,I AR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension) . Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxe l)
-pad-asym Pad 3d image with asymmetric padding. Specify padd ing as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in - i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension
-concat {x,y,z,t} Concatenate data along the specified dimension

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI ,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL ,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SL A,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SA R,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input i mage's data. Use with care !ro

Multi-component operations:
-mcs Multi-component split. Outputs the components sepa rately. (The sufix
_x, _y and _z are added to the specified output)
Only one input
-omc Multi-component output. Merge inputted images into one
multi-component image. (need several inputs.)

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Defaul t value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1, 1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-dat a RIP -v 0
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p point,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_point.nii.gz -s ize 10 -r 0
~~~~~~~~~~~~~~~~ ~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spa re/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p point,/spare/hardis ty/anaconda2/sct_testing_data/data/mt/mt1_point.nii.gz -size 10 -r 0

Create temporary folder...
mkdir tmp.160901103240/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160901103240/data.nii
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_point.nii. gz -o tmp.160901103240/point.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
point.nii.gz
WARNING: File point_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Extract coordinate of point...
sct_label_utils -i point_RPI.nii.gz -display

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,19,0,1:20,19,1,1:20,19,2, 1:20,19,3,1:20,19,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,S RA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,I AR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension) . Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxe l)
-pad-asym Pad 3d image with asymmetric padding. Specify padd ing as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in - i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension
-concat {x,y,z,t} Concatenate data along the specified dimension

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI ,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL ,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SL A,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SA R,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input i mage's data. Use with care !ro

Multi-component operations:
-mcs Multi-component split. Outputs the components sepa rately. (The sufix
_x, _y and _z are added to the specified output)
Only one input
-omc Multi-component output. Merge inputted images into one
multi-component image. (need several inputs.)

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Defaul t value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1, 1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-dat a RIP -v 0
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p center -size 10 -r 0
~~~~~~~~~~~~~~~~ ~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spa re/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p center -size 10 -r 0

Create temporary folder...
mkdir tmp.160901103244/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160901103244/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,20,0,1:20,20,1,1:20,20,2, 1:20,20,3,1:20,20,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,S RA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,I AR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension) . Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxe l)
-pad-asym Pad 3d image with asymmetric padding. Specify padd ing as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in - i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension
-concat {x,y,z,t} Concatenate data along the specified dimension

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI ,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL ,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SL A,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SA R,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input i mage's data. Use with care !ro

Multi-component operations:
-mcs Multi-component split. Outputs the components sepa rately. (The sufix
_x, _y and _z are added to the specified output)
Only one input
-omc Multi-component output. Merge inputted images into one
multi-component image. (need several inputs.)

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Defaul t value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1, 1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-dat a RIP -v 0
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p centerline,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -size 10 -r 0
~~~~~~~~~~~~~~~~ ~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spa re/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p centerline,/spare/h ardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -size 10 -r 0
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz

Create temporary folder...
mkdir tmp.160901103246/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160901103246/data.nii
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -o tmp.160901103246/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,S RA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,I AR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension) . Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxe l)
-pad-asym Pad 3d image with asymmetric padding. Specify padd ing as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in - i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension
-concat {x,y,z,t} Concatenate data along the specified dimension

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI ,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL ,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SL A,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SA R,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input i mage's data. Use with care !ro

Multi-component operations:
-mcs Multi-component split. Outputs the components sepa rately. (The sufix
_x, _y and _z are added to the specified output)
Only one input
-omc Multi-component output. Merge inputted images into one
multi-component image. (need several inputs.)

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Defaul t value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1, 1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-dat a RIP -v 0
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii .gz -p center -size 10 -r 0
~~~~~~~~~~~~~~~~ ~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spa re/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -p center -size 10 -r 0

Create temporary folder...
mkdir tmp.160901103248/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -o tmp.160901103248/data.nii

Reorient to RPI...
data.nii
rm -rf tmp.160901103248_141563/

Get dimensions of data...
40 x 42 x 5 x 7
WARNING in sct_create_mask.py: Input image is 4d but output mask will 3D.
WARNING: File data_RPI.nii already exists. Deleting it.

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,21,0,1:20,21,1,1:20,21,2, 1:20,21,3,1:20,21,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,S RA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,I AR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension) . Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxe l)
-pad-asym Pad 3d image with asymmetric padding. Specify padd ing as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in - i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension
-concat {x,y,z,t} Concatenate data along the specified dimension

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI ,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL ,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SL A,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SA R,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input i mage's data. Use with care !ro

Multi-component operations:
-mcs Multi-component split. Outputs the components sepa rately. (The sufix
_x, _y and _z are added to the specified output)
Only one input
-omc Multi-component output. Merge inputted images into one
multi-component image. (need several inputs.)

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Defaul t value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1, 1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-dat a RIP -v 0

Checking test_sct_crop_image........................[OK]
Checking test_sct_dmri_compute_dti..................[OK]
Checking test_sct_dmri_get_bvalue...................[OK]
Checking test_sct_dmri_transpose_bvecs..............[OK]
Checking test_sct_dmri_moco.........................[FAIL]
~~~~~~~~~~~~~~~~ ~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_dmri_moco.py -i /spare /hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -bvec /spare/hardisty /anaconda2/sct_testing_data/data/dmri/bvecs.txt -v 1 -g 3 -r 0 -x spline

Create temporary folder...
mkdir tmp.160901103254/

Copying input data to tmp folder and convert to nii...
cp /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz tmp.16090110 3254/dmri.nii.gz
cp /spare/hardisty/anaconda2/sct_testing_data/data/dmri/bvecs.txt tmp.1609011032 54/bvecs.txt
sct_convert -i dmri.nii.gz -o dmri.nii

Get dimensions of data...
40 x 42 x 5

Identify b=0 and DWI images...

Identify b=0 and DWI images...
Number of b=0: 1 [0]
Number of DWI: 6 [1, 2, 3, 4, 5, 6]

Split along T dimension...

Merge b=0...
File created: b0

Average b=0...

Done! To view results, type:
fslview b0_mean.nii &

DWI group: 1/2
Merge DW images...
Average DW images...

Done! To view results, type:
fslview dwi_mean_0.nii &

DWI group: 2/2
Merge DW images...
Average DW images...

Done! To view results, type:
fslview dwi_mean_1.nii &

Merging DW files...

Averaging all DW images...

Done! To view results, type:
fslview dwi_averaged_groups_mean.nii &


Estimating motion on b=0 images...

Input parameters:
Input file ............b0
Reference file ........dmri_T0000
Polynomial degree .....2
Smoothing kernel ......2
Gradient step .........1
Metric ................MeanSquares
Todo ..................estimate
Mask .................
Output mat folder .....mat_b0groups/

Get dimensions data...
.. 40 x 42 x 5 x 1

Copy file_target to a temporary file...
cp dmri_T0000.nii target.nii

Split data along T dimension...

Volume 0/0:
isct_antsSliceRegularizedRegistration -p 2 --transform Translation[1] --metric M eanSquares[target.nii, b0_T0000.nii, 1, 4, Regular, 0.2] --iterations 5 --shrink Factors 1 --smoothingSigmas 2 --output [mat_b0groups/mat.T0,b0_moco_T0000.nii] - n BSpline[3]
WARNING: In /home/brain/antsbin/ITKv4/Modules/Core/Common/src/itkObjectFactoryBa se.cxx, line 563
Possible incompatible factory load:
Running itk version :
itk version 4.9.0
Loaded factory version:
itk version 4.10.0
Loading factory:
/spare/hardisty/s4r-conda/Slicer-build/lib/Slicer-4.5/ITKFactories/libMRMLIDIOPl ugin.so

Segmentation fault (core dumped)
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
Checking test_sct_dmri_separate_b0_and_dwi..........[OK]
Checking test_sct_extract_metric....................[OK]
Checking test_sct_fmri_compute_tsnr.................[OK]
Checking test_sct_fmri_moco.........................[FAIL]

====================================================================================================

sct_fmri_moco -i /spare/hardisty/anaconda2/sct_testing_data/data/fmri/fmri.nii.gz -g 5 -x spline -r 0 -v 2

```

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_fmri_moco.py -i /spare/hardisty/anaconda2/sct_testing_data/data/fmri/fmri.nii.gz -g 5 -x spline -r 0 -v 2

Input parameters:
input file ............/spare/hardisty/anaconda2/sct_testing_data/data/fmri/fmri.nii.gz

Create temporary folder...
mkdir tmp.160901103302/

Copying input data to tmp folder and convert to nii...
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/fmri/fmri.nii.gz -o tmp.160901103302/fmri.nii

Get dimensions of data...
68 x 68 x 6 x 30

Split along T dimension...

Group: 1/6
Merge consecutive volumes...
Average volumes...

Done! To view results, type:
fslview fmri_mean_0.nii &

Group: 2/6
Merge consecutive volumes...
Average volumes...

Done! To view results, type:
fslview fmri_mean_1.nii &

Group: 3/6
Merge consecutive volumes...
Average volumes...

Done! To view results, type:
fslview fmri_mean_2.nii &

Group: 4/6
Merge consecutive volumes...
Average volumes...

Done! To view results, type:
fslview fmri_mean_3.nii &

Group: 5/6
Merge consecutive volumes...
Average volumes...

Done! To view results, type:
fslview fmri_mean_4.nii &

Group: 6/6
Merge consecutive volumes...
Average volumes...

Done! To view results, type:
fslview fmri_mean_5.nii &

Merging volumes...


Estimating motion...

Input parameters:
Input file ............fmri_averaged_groups
Reference file ........fmri_mean_0
Polynomial degree .....2
Smoothing kernel ......2
Gradient step .........1
Metric ................MeanSquares
Todo ..................estimate_and_apply
Mask .................
Output mat folder .....mat_groups/

Get dimensions data...
.. 68 x 68 x 6 x 6

Copy file_target to a temporary file...
cp fmri_mean_0.nii target.nii

Split data along T dimension...

Volume 0/5:
isct_antsSliceRegularizedRegistration -p 2 --transform Translation[1] --metric MeanSquares[target.nii, fmri_averaged_groups_T0000.nii, 1, 4, Regular, 0.2] --iterations 5 --shrinkFactors 1 --smoothingSigmas 2 --output [mat_groups/mat.T0,fmri_averaged_groups_moco_T0000.nii] -n BSpline[3]
WARNING: In /home/brain/antsbin/ITKv4/Modules/Core/Common/src/itkObjectFactoryBase.cxx, line 563
Possible incompatible factory load:
Running itk version :
itk version 4.9.0
Loaded factory version:
itk version 4.10.0
Loading factory:
/spare/hardisty/s4r-conda/Slicer-build/lib/Slicer-4.5/ITKFactories/libMRMLIDIOPlugin.so

Segmentation fault (core dumped)
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
Checking test_sct_image.............................[OK]
Checking test_sct_label_utils.......................[OK]
Checking test_sct_label_vertebrae...................~~~~~~~~~~~~~~~~~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_label_vertebrae.py -laplacian 0 -o t2_seg_labeled.nii.gz -i /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -v 1 -s /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2_seg.nii.gz -r 1 -denoise 0 -ofolder sct_label_vertebrae_data_160901103309_95158/ -initz 34,3
Check folder existence...

Create temporary folder...

Create temporary folder...
mkdir tmp.160901103310_554923/

Copying input data to tmp folder...
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -o tmp.160901103310_554923/data.nii
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2_seg.nii.gz -o tmp.160901103310_554923/segmentation.nii.gz

Create label to identify disc...

Straighten spinal cord...
sct_straighten_spinalcord -i data.nii -s segmentation.nii.gz -r 0 -qc 0
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_straighten_spinalcord.py -i data.nii -s segmentation.nii.gz -r 0 -qc 0
/spare/hardisty/git/spinalcordtoolbox

Check input arguments:
Input volume ...................... data.nii
Centerline ........................ segmentation.nii.gz
Final interpolation ............... spline
Verbose ........................... 1

Create temporary folder...
mkdir tmp.160901103311_931814/

Copy files to tmp folder...
sct_convert -i data.nii -o tmp.160901103311_931814/data.nii
sct_convert -i segmentation.nii.gz -o tmp.160901103311_931814/centerline.nii.gz
cp data.nii data_1mm.nii
cp centerline.nii.gz centerline_1mm.nii.gz

Orient centerline to RPI orientation...
centerline_1mm.nii.gz

Get dimensions of data...
60 x 55 x 52 x 1

Change orientation...
rm -f centerline_1mm_RPI.nii.gz

Generate output files...
Created file(s):
--> ['centerline_1mm_rpi.nii.gz']

Get dimensions...
.. matrix size: 52 x 60 x 55
.. voxel size: 1.0mm x 1.0mm x 1.0mm

Smooth centerline/segmentation...
.. Get center of mass of the centerline/segmentation...
.. Smoothing algo = hanning
.. Windows length = 50

Get coordinates of landmarks along curved centerline...

Get coordinates of landmarks along straight centerline...

Pad input volume to account for landmarks that fall outside the FOV...

Generate output files...
Created file(s):
--> ['tmp.centerline_pad.nii.gz']

Open padded centerline for reading...

Write NIFTI volumes...
.. File created: tmp.landmarks_curved.nii.gz
.. File created: tmp.landmarks_straight.nii.gz
cp tmp.landmarks_curved.nii.gz tmp.landmarks_curved_crop.nii.gz
cp tmp.landmarks_straight.nii.gz tmp.landmarks_straight_crop.nii.gz

Estimate b-spline transformation: curve --> straight...
isct_ANTSLandmarksBSplineTransform tmp.landmarks_straight.nii.gz tmp.landmarks_curved.nii.gz tmp.curve2straight_rigid.txt tmp.warp_curve2straight.nii.gz 5x5x10 3 LandmarksRealCurve.txt LandmarksRealStraight.txt 3 0
WARNING: In /home/brain/antsbin/ITKv4/Modules/Core/Common/src/itkObjectFactoryBase.cxx, line 563
Possible incompatible factory load:
Running itk version :
itk version 4.9.0
Loaded factory version:
itk version 4.10.0
Loading factory:
/spare/hardisty/s4r-conda/Slicer-build/lib/Slicer-4.5/ITKFactories/libMRMLIDIOPlugin.so

MSE = 0.00187222 mm
Segmentation fault (core dumped)
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
[FAIL]

sct_label_vertebrae -laplacian 0 -o t2_seg_labeled.nii.gz -i /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -v 1 -s /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2_seg.nii.gz -r 1 -denoise 0 -ofolder sct_label_vertebrae_data_160901103309_95158/ -initz 34,3

ERROR: Function crashed!
Checking test_sct_maths.............................[OK]
Checking test_sct_process_segmentation..............[OK]
Checking test_sct_propseg...........................[OK]
Checking test_sct_register_graymatter...............Check folder existence...
Check folder existence...
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/

Create temporary folder...
mkdir tmp.160901103325_497024/
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt0_gmseg.nii.gz -o tmp.160901103325_497024/mt0_gmseg.nii.gz
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/warp_template2mt.nii.gz -o tmp.160901103325_497024/warp_template2mt.nii.gz
OK: multilabel_automatic_seg.nii.gz

Create temporary folder...
mkdir tmp.160901103325/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.160901103325/data.nii
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.160901103325/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension
-concat {x,y,z,t} Concatenate data along the specified dimension

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations:
-mcs Multi-component split. Outputs the components separately. (The sufix
_x, _y and _z are added to the specified output)
Only one input
-omc Multi-component output. Merge inputted images into one
multi-component image. (need several inputs.)

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1,1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-data RIP -v 0

All 61 comments

I ran the same commands on commit 1d045b491f28d2f0dcce89332c85532de3353d6d on my station (OSX10.10) and all tests passed, so the problem might indeed come from the ITK builds that relates to the ANTs binaries.
@mrhardisty: does test_sct_propseg pass? What is your OS? could you please do a printout of sct_check_dependencies?

@poquirion, @SaraDupont: we will need to remove the printout for some tests (see below)

julien-macbook:~ $ source sct_launcher

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Sourcing sct_laucher in your environement /Users/julien/code/spinalcordtoolbox
(/Users/julien/code/spinalcordtoolbox/python) julien-macbook:~ $ python
Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:43:17) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import sys
>>> sys.path.append('/Users/julien/code/spinalcordtoolbox/scripts/')
>>> import sct_testing
>>> myArguments = ['-d']
>>> myArguments.append('0')
>>> myArguments.append('-p')
>>> myArguments.append('/Users/julien/sct_testing_data/data/')
>>> sct_testing.main(myArguments)
Check folder existence...

Path to testing data: /Users/julien/sct_testing_data/data/
Checking test_sct_apply_transfo.....................[OK]
Checking test_sct_check_atlas_integrity.............[OK]
Checking test_sct_compute_mtr.......................[OK]
Checking test_sct_concat_transfo....................[OK]
Checking test_sct_convert...........................[OK]
Checking test_sct_create_mask.......................[OK]
Checking test_sct_crop_image........................[OK]
Checking test_sct_dmri_compute_dti..................[OK]
Checking test_sct_dmri_get_bvalue...................[OK]
Checking test_sct_dmri_transpose_bvecs..............[OK]
Checking test_sct_dmri_moco.........................[OK]
Checking test_sct_dmri_separate_b0_and_dwi..........[OK]
Checking test_sct_extract_metric....................[OK]
Checking test_sct_fmri_compute_tsnr.................[OK]
Checking test_sct_fmri_moco.........................[OK]
Checking test_sct_image.............................[OK]
Checking test_sct_label_utils.......................[OK]
Checking test_sct_label_vertebrae...................[OK]
Checking test_sct_maths.............................[OK]
Checking test_sct_process_segmentation..............[OK]
Checking test_sct_propseg...........................[OK]
Checking test_sct_register_graymatter...............Check folder existence...
Check folder existence...
  OK: /Users/julien/sct_testing_data/data/mt/label/

Create temporary folder...
mkdir tmp.160901163111_250379/
sct_convert -i /Users/julien/sct_testing_data/data/mt/mt0_gmseg.nii.gz -o tmp.160901163111_250379/mt0_gmseg.nii.gz
sct_convert -i /Users/julien/sct_testing_data/data/mt/warp_template2mt.nii.gz -o tmp.160901163111_250379/warp_template2mt.nii.gz
  OK: multilabel_automatic_seg.nii.gz

Create temporary folder...
mkdir tmp.160901163111/

Check orientation...
.. RPI
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.160901163111/data.nii
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.160901163111/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create mask...
mask_RPI.nii.gz

Get dimensions of data...
40 x 40 x 5 x 1

Change orientation...
rm -f mask_RPI_RPI.nii.gz

Generate output files...
Created file(s):
--> ['mask.nii.gz']

WARNING: File mask.nii.gz already exists. Deleting it.

Generate output files...
  File created: square_mask.nii.gz

Remove temporary files...
rm -rf tmp.160901163111/

Done! To view results, type:
fslview multilabel_automatic_seg.nii.gz square_mask.nii.gz -l Red -t 0.5 &

sct_crop_image -i multilabel_automatic_seg.nii.gz -m square_mask.nii.gz -o multilabel_automatic_seg_crop.nii.gz
sct_crop_image -i multilabel_template_seg.nii.gz -m square_mask.nii.gz -o multilabel_template_seg_crop.nii.gz

Input parameters:
  Source .............. multilabel_template_seg_crop.nii.gz
  Destination ......... multilabel_automatic_seg_crop.nii.gz
  Mask ................ 
  Output name ......... 
  Remove temp files ... 1
  Verbose ............. 1

Check if input data are 3D...

Check if destination data is RPI...

Create temporary folder...

Create temporary folder...
mkdir tmp.160901163112_465183/

Copying input data to tmp folder and convert to nii...
sct_convert -i multilabel_template_seg_crop.nii.gz -o tmp.160901163112_465183/src.nii
sct_convert -i multilabel_automatic_seg_crop.nii.gz -o tmp.160901163112_465183/dest.nii

Estimate transformation for step #0...
isct_antsRegistration --dimensionality 3 --transform syn[0.5,3,0] --metric MI[dest.nii,src.nii,1,32] --convergence 0 --shrink-factors 1 --smoothing-sigmas 0mm --restrict-deformation 1x1x0 --output [step0,src_regStep0.nii] --interpolation BSpline[3]  --verbose 1

Estimate transformation for step #1...

Parse list of warping fields...
  Transfo #0: warp_forward_0.nii.gz

Get dimensions of data...
  29 x 31 x 5 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i src.nii -o src_reg.nii -t warp_forward_0.nii.gz -r dest.nii -n Linear

Done! To view results, type:
fslview dest.nii src_reg.nii &

sct_crop_image -i src_reg_th.nii -dim 2 -bmax -o tmp.nii
sct_crop_image -i dest_th.nii -dim 2 -bmax -o tmp.nii
sct_crop_image -i src_reg.nii -o src_reg_crop.nii -dim 2 -start 1 -end 3
sct_crop_image -i dest.nii -o dest_crop.nii -dim 2 -start 1 -end 3
isct_antsSliceRegularizedRegistration -t Translation[0.5] -m MeanSquares[dest_crop.nii,src_reg_crop.nii,1,4,Regular,0.2] -p 3 -i 10 -f 1 -s 0 -v 1 -o [step1,src_reg_crop_regStep1.nii] 

Estimate transformation for step #2...

Parse list of warping fields...
  Transfo #0: warp_forward_0.nii.gz
  Transfo #1: warp_forward_1.nii.gz

Get dimensions of data...
  29 x 31 x 5 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i src.nii -o src_reg.nii -t warp_forward_1.nii.gz warp_forward_0.nii.gz -r dest.nii -n Linear

Done! To view results, type:
fslview dest.nii src_reg.nii &


Generate output files...
Created file(s):
--> ['dest_pad.nii']

isct_antsRegistration --dimensionality 3 --transform syn[0.5,3,0] --metric MeanSquares[dest_pad.nii,src_reg.nii,1,4] --convergence 10 --shrink-factors 2 --smoothing-sigmas 0mm --restrict-deformation 1x1x0 --output [step2,src_reg_regStep2.nii] --interpolation BSpline[3]  --verbose 1

Estimate transformation for step #3...

Parse list of warping fields...
  Transfo #0: warp_forward_0.nii.gz
  Transfo #1: warp_forward_1.nii.gz
  Transfo #2: warp_forward_2.nii.gz

Get dimensions of data...
  29 x 31 x 5 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i src.nii -o src_reg.nii -t warp_forward_2.nii.gz warp_forward_1.nii.gz warp_forward_0.nii.gz -r dest.nii -n Linear

Done! To view results, type:
fslview dest.nii src_reg.nii &


Generate output files...
WARNING: File dest_pad.nii already exists. Deleting it.
Created file(s):
--> ['dest_pad.nii']

isct_antsRegistration --dimensionality 3 --transform bsplinesyn[0.5,1,3] --metric MeanSquares[dest_pad.nii,src_reg.nii,1,4] --convergence 5 --shrink-factors 1 --smoothing-sigmas 0mm --restrict-deformation 1x1x0 --output [step3,src_reg_regStep3.nii] --interpolation BSpline[3]  --verbose 1

Concatenate transformations...

Parse list of transformations...
  Transfo #0: warp_forward_1.nii.gz
  Transfo #1: warp_forward_2.nii.gz
  Transfo #2: warp_forward_3.nii.gz
  Transfo #3: warp_forward_0.nii.gz

Check file existence...
  OK: dest.nii
  OK: warp_forward_1.nii.gz
  OK: warp_forward_2.nii.gz
  OK: warp_forward_3.nii.gz
  OK: warp_forward_0.nii.gz

Concatenate warping fields...
>> isct_ComposeMultiTransform 3 warp_final.nii.gz -R dest.nii warp_forward_0.nii.gz warp_forward_3.nii.gz warp_forward_2.nii.gz warp_forward_1.nii.gz

Generate output files...
  File created: warp_src2dest.nii.gz


Parse list of transformations...
  Transfo #0: warp_inverse_3.nii.gz
  Transfo #1: warp_inverse_2.nii.gz
  Transfo #2: warp_inverse_1.nii.gz
  Transfo #3: warp_inverse_0.nii.gz

Check file existence...
  OK: dest.nii
  OK: warp_inverse_3.nii.gz
  OK: warp_inverse_2.nii.gz
  OK: warp_inverse_1.nii.gz
  OK: warp_inverse_0.nii.gz

Concatenate warping fields...
>> isct_ComposeMultiTransform 3 warp_final.nii.gz -R dest.nii warp_inverse_0.nii.gz warp_inverse_1.nii.gz warp_inverse_2.nii.gz warp_inverse_3.nii.gz

Generate output files...
  File created: warp_dest2src.nii.gz


Apply transfo source --> dest...

Parse list of warping fields...
  Transfo #0: warp_src2dest.nii.gz

Get dimensions of data...
  29 x 31 x 5 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i src.nii -o src_reg.nii -t warp_src2dest.nii.gz -r dest.nii -n Linear

Done! To view results, type:
fslview dest.nii src_reg.nii &


Apply transfo dest --> source...

Parse list of warping fields...
  Transfo #0: warp_dest2src.nii.gz

Get dimensions of data...
  29 x 31 x 5 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i dest.nii -o dest_reg.nii -t warp_dest2src.nii.gz -r src.nii -n Linear

Done! To view results, type:
fslview src.nii dest_reg.nii &


Generate output files...
sct_convert -i tmp.160901163112_465183/src_reg.nii -o multilabel_template_seg_crop_reg.nii.gz
  File created: multilabel_template_seg_crop_reg.nii.gz
  File created: warp_multilabel_template_seg_crop2multilabel_automatic_seg_crop.nii.gz
sct_convert -i tmp.160901163112_465183/dest_reg.nii -o multilabel_automatic_seg_crop_reg.nii.gz
  File created: multilabel_automatic_seg_crop_reg.nii.gz
  File created: warp_multilabel_automatic_seg_crop2multilabel_template_seg_crop.nii.gz

Remove temporary files...
rm -rf tmp.160901163112_465183/

Finished! Elapsed time: 4s

To view results, type:
fslview multilabel_automatic_seg_crop.nii.gz multilabel_template_seg_crop_reg.nii.gz &
fslview multilabel_template_seg_crop.nii.gz multilabel_automatic_seg_crop_reg.nii.gz &


Parse list of transformations...
  Transfo #0: warp_template2mt.nii.gz
  Transfo #1: warp_multilabel_template_seg_crop2multilabel_automatic_seg_crop.nii.gz

Check file existence...
  OK: mt0_gmseg.nii.gz
  OK: warp_template2mt.nii.gz
  OK: warp_multilabel_template_seg_crop2multilabel_automatic_seg_crop.nii.gz

Concatenate warping fields...
>> isct_ComposeMultiTransform 3 warp_final.nii.gz -R mt0_gmseg.nii.gz warp_multilabel_template_seg_crop2multilabel_automatic_seg_crop.nii.gz warp_template2mt.nii.gz

Generate output files...
  File created: warp_template2mt0_gmseg.nii.gz

  File created: sct_register_graymatterdata_160901163111_793715/warp_template2mt0_gmseg.nii.gz
rm -rf tmp.160901163111_250379/

Create temporary folder...
mkdir tmp.160901163116_82491/
cp /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz tmp.160901163116_82491/mt0_manual_gmseg.nii.gz
cp /Users/julien/sct_testing_data/data/mt/mt0_seg.nii.gz tmp.160901163116_82491/mt0_seg.nii.gz
cp sct_register_graymatterdata_160901163111_793715/warp_template2mt0_gmseg.nii.gz tmp.160901163116_82491/warp_template2mt0_gmseg.nii.gz

Check file existence...
  OK: /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz
  OK: warp_template2mt0_gmseg.nii.gz

Check parameters:
  Destination image ........ /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz
  Warping field ............ warp_template2mt0_gmseg.nii.gz
  Path template ............ /Users/julien/code/spinalcordtoolbox/data/
  Output folder ............ label/

mkdir label/

Warp template objects...

Read label file...
  OK: /Users/julien/code/spinalcordtoolbox/data/template/info_label.txt
  OK: /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_T2.nii.gz
  OK: /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_cord.nii.gz
  OK: /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_CSF.nii.gz
  OK: /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_WM.nii.gz
  OK: /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_GM.nii.gz
  OK: /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_level.nii.gz
mkdir label/template/

Parse list of warping fields...
  Transfo #0: warp_template2mt0_gmseg.nii.gz

Get dimensions of data...
  120 x 120 x 600 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_T2.nii.gz -o label/template/MNI-Poly-AMU_T2.nii.gz -t warp_template2mt0_gmseg.nii.gz -r /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz -n Linear

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz label/template/MNI-Poly-AMU_T2.nii.gz &


Parse list of warping fields...
  Transfo #0: warp_template2mt0_gmseg.nii.gz

Get dimensions of data...
  120 x 120 x 600 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_cord.nii.gz -o label/template/MNI-Poly-AMU_cord.nii.gz -t warp_template2mt0_gmseg.nii.gz -r /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz -n NearestNeighbor

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz label/template/MNI-Poly-AMU_cord.nii.gz &


Parse list of warping fields...
  Transfo #0: warp_template2mt0_gmseg.nii.gz

Get dimensions of data...
  120 x 120 x 600 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_CSF.nii.gz -o label/template/MNI-Poly-AMU_CSF.nii.gz -t warp_template2mt0_gmseg.nii.gz -r /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz -n NearestNeighbor

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz label/template/MNI-Poly-AMU_CSF.nii.gz &


Parse list of warping fields...
  Transfo #0: warp_template2mt0_gmseg.nii.gz

Get dimensions of data...
  120 x 120 x 600 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_WM.nii.gz -o label/template/MNI-Poly-AMU_WM.nii.gz -t warp_template2mt0_gmseg.nii.gz -r /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz -n Linear

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz label/template/MNI-Poly-AMU_WM.nii.gz &


Parse list of warping fields...
  Transfo #0: warp_template2mt0_gmseg.nii.gz

Get dimensions of data...
  120 x 120 x 600 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_GM.nii.gz -o label/template/MNI-Poly-AMU_GM.nii.gz -t warp_template2mt0_gmseg.nii.gz -r /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz -n Linear

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz label/template/MNI-Poly-AMU_GM.nii.gz &


Parse list of warping fields...
  Transfo #0: warp_template2mt0_gmseg.nii.gz

Get dimensions of data...
  120 x 120 x 600 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/code/spinalcordtoolbox/data/template/MNI-Poly-AMU_level.nii.gz -o label/template/MNI-Poly-AMU_level.nii.gz -t warp_template2mt0_gmseg.nii.gz -r /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz -n NearestNeighbor

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz label/template/MNI-Poly-AMU_level.nii.gz &


Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/mt/mt0_manual_gmseg.nii.gz label/template/MNI-Poly-AMU_T2.nii.gz -b 0,4000 label/template/MNI-Poly-AMU_level.nii.gz -l MGH-Cortical -t 0.5 label/template/MNI-Poly-AMU_GM.nii.gz -l Red-Yellow -b 0.5,1 label/template/MNI-Poly-AMU_WM.nii.gz -l Blue-Lightblue -b 0.5,1 &


Done! To view results, type:
fslview target_manual_wmseg.nii.gz &

sct_compute_hausdorff_distance -i old_template_gm.nii.gz -r mt0_manual_gmseg.nii.gz -t 1  -v 1
sct_compute_hausdorff_distance -i new_template_gm.nii.gz -r mt0_manual_gmseg.nii.gz -t 1  -v 1
sct_dice_coefficient -i mt0_manual_gmseg.nii.gz -d old_template_gm.nii.gz -2d-slices 2
sct_dice_coefficient -i target_manual_wmseg.nii.gz -d old_template_wm.nii.gz -2d-slices 2
sct_dice_coefficient -i mt0_manual_gmseg.nii.gz -d new_template_gm.nii.gz -2d-slices 2
sct_dice_coefficient -i target_manual_wmseg.nii.gz -d new_template_wm.nii.gz -2d-slices 2
  File created: sct_register_graymatterdata_160901163111_793715/hd_md_multilabel_reg.txt
  File created: sct_register_graymatterdata_160901163111_793715/dice_multilabel_reg.txt
rm -rf tmp.160901163116_82491/
[OK]
Checking test_sct_register_multimodal...............[OK]
Checking test_sct_register_to_template..............
Parse list of warping fields...
  Transfo #0: sct_register_to_template_data_160901163128_998778/warp_template2anat.nii.gz

Get dimensions of data...
  30 x 30 x 150 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/sct_testing_data/data/template/template/MNI-Poly-AMU_cord.nii.gz -o sct_register_to_template_data_160901163128_998778/test_template2anat.nii.gz -t sct_register_to_template_data_160901163128_998778/warp_template2anat.nii.gz -r /Users/julien/sct_testing_data/data/t2/t2_seg.nii.gz -n NearestNeighbor

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/t2/t2_seg.nii.gz sct_register_to_template_data_160901163128_998778/test_template2anat.nii.gz &


Parse list of warping fields...
  Transfo #0: sct_register_to_template_data_160901163128_998778/warp_anat2template.nii.gz

Get dimensions of data...
  60 x 55 x 52 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/sct_testing_data/data/t2/t2_seg.nii.gz -o sct_register_to_template_data_160901163128_998778/test_anat2template.nii.gz -t sct_register_to_template_data_160901163128_998778/warp_anat2template.nii.gz -r /Users/julien/sct_testing_data/data/template/template/MNI-Poly-AMU_cord.nii.gz -n NearestNeighbor

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/template/template/MNI-Poly-AMU_cord.nii.gz sct_register_to_template_data_160901163128_998778/test_anat2template.nii.gz &

[OK]
Checking test_sct_resample..........................[OK]
Checking test_sct_smooth_spinalcord.................[OK]
Checking test_sct_straighten_spinalcord.............
Parse list of warping fields...
  Transfo #0: sct_straighten_spinalcord_data_160901163158_155766/warp_curve2straight.nii.gz

Get dimensions of data...
  60 x 55 x 52 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i /Users/julien/sct_testing_data/data/t2/t2_seg.nii.gz -o sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight.nii.gz -t sct_straighten_spinalcord_data_160901163158_155766/warp_curve2straight.nii.gz -r sct_straighten_spinalcord_data_160901163158_155766/t2_straight.nii.gz -n Linear

Done! To view results, type:
fslview sct_straighten_spinalcord_data_160901163158_155766/t2_straight.nii.gz sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight.nii.gz &


Parse list of warping fields...
  Transfo #0: sct_straighten_spinalcord_data_160901163158_155766/warp_straight2curve.nii.gz

Get dimensions of data...
  63 x 63 x 57 x 1

Apply transformation...
isct_antsApplyTransforms -d 3 -i sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight.nii.gz -o sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight_curved.nii.gz -t sct_straighten_spinalcord_data_160901163158_155766/warp_straight2curve.nii.gz -r /Users/julien/sct_testing_data/data/t2/t2_seg.nii.gz -n NearestNeighbor

Done! To view results, type:
fslview /Users/julien/sct_testing_data/data/t2/t2_seg.nii.gz sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight_curved.nii.gz &

WARNING: File sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight_curved.nii.gz already exists. Deleting it.

Done! To view results, type:
fslview sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight_curved.nii.gz &

WARNING: File sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight_curved.nii.gz already exists. Deleting it.

Done! To view results, type:
fslview sct_straighten_spinalcord_data_160901163158_155766/tmp_seg_straight_curved.nii.gz &

[OK]
Checking test_sct_warp_template.....................[OK]
Checking test_sct_documentation.....................[OK]
Checking test_sct_dmri_create_noisemask.............[OK]
status: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Finished! Elapsed time: 109s


Remove temporary files...
rm -rf tmp.160901163019/
0

test_sct_proseg passed!

import sys
sys.path.append('/spare/hardisty/git/spinalcordtoolbox/scripts/')
import sct_testing
myArguments = ['-d']
myArguments.append('0')
myArguments.append('-p')
myArguments.append('/spare/hardisty/anaconda2/sct_testing_data/data/')

myArguments.append('-f')
myArguments.append('sct_propseg')

sct_testing.main(myArguments)

Path to testing data: /spare/hardisty/anaconda2/sct_testing_data/data/
Checking test_sct_propseg...........................[OK]
status: [0]
Finished! Elapsed time: 7s

Here is the result of sct_check_dependencies. My OS is Ubuntu 14.04. The ANTs compatibility with OS is failing as well as I have not installed ornlm within this python env.

import sys
sys.path.append('/spare/hardisty/git/spinalcordtoolbox/scripts/')
import sct_check_dependencies.main([])

Check which OS is running...
.. linux (Linux-3.19.0-58-generic-x86_64-with-debian-jessie-sid)
Check number of CPU cores...
.. Available: 8
.. Used by SCT:
Check RAM...
MemTotal: 4035860 kB
total used free shared buffers cached
Mem: 3941 3588 352 23 384 2049
-/+ buffers/cache: 1154 2786
Swap: 19071 207 18864
Check which Python is running...
.. /spare/hardisty/s4r-conda/Slicer-build/bin/SlicerApp-real
Check SCT path...
.. /spare/hardisty/git/spinalcordtoolbox/
Check SCT version...
.. dev
Check if data are installed.........................[OK]
Check if xlwt (1.0.0) is installed..................[WARNING]
Detected version: 1.1.2. Required version: 1.0.0
Check if xlutils (1.7.1) is installed...............[OK]
Check if scikit-learn (0.17.1) is installed.........[OK]
Check if scikit-image (0.12.3) is installed.........[OK]
Check if matplotlib (1.5.1) is installed............[OK]
Check if scipy (0.17.0) is installed................[WARNING]
Detected version: 0.18.0. Required version: 0.17.0
Check if sympy (0.7.6) is installed.................[WARNING]
Detected version: 1.0. Required version: 0.7.6
Check if xlrd (0.9.4) is installed..................[WARNING]
Detected version: 1.0.0. Required version: 0.9.4
Check if numpy (1.11.1) is installed................[OK]
Check if pandas (0.18.0) is installed...............[WARNING]
Detected version: 0.18.1. Required version: 0.18.0
Check if nibabel (2.0.2) is installed...............[WARNING]
Detected version: 2.1.0. Required version: 2.0.2
Check if ornlm is installed.........................[FAIL]
Check if dipy is installed..........................[OK]
Check ANTs compatibility with OS ...................[FAIL]

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/isct_test_ants.py

Create temporary folder...
mkdir tmp.160902111546_251960/

Estimate rigid transformation between paired landmarks...
isct_antsRegistration -d 3 -t syn[1,3,1] -m MeanSquares[data_dest.nii.gz,data_src.nii.gz,1,3] -f 2 -s 0 -o [src2reg, data_src_reg.nii.gz] -c 5 -v 1 -n NearestNeighbor
WARNING: In /home/brain/antsbin/ITKv4/Modules/Core/Common/src/itkObjectFactoryBase.cxx, line 563
Possible incompatible factory load:
Running itk version :
itk version 4.9.0
Loaded factory version:
itk version 4.10.0
Loading factory:
/spare/hardisty/s4r-conda/Slicer-build/lib/Slicer-4.5/ITKFactories/libMRMLIDIOPlugin.so


All_Command_lines_OK
Using double precision for computations.
number of levels = 1
fixed image: data_dest.nii.gz
moving image: data_src.nii.gz
Dimension = 3
Number of stages = 1
Use Histogram Matching false
Winsorize image intensities false
Lower quantile = 0
Upper quantile = 1
Stage 1 State
Image metric = MeanSquares
Fixed image = Image (0x4efcd30)
RTTI typeinfo:   itk::Image<double, 3u>
Reference Count: 2
Modified Time: 627
Debug: Off
Object Name:
Observers:
none
Source: (none)
Source output name: (none)
Release Data: Off
Data Released: False
Global Release Data: Off
PipelineMTime: 0
UpdateMTime: 451
RealTimeStamp: 0 seconds
LargestPossibleRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [61, 61, 61]
BufferedRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [61, 61, 61]
RequestedRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [61, 61, 61]
Spacing: [1, 1, 1]
Origin: [0, 0, 0]
Direction:
-1 0 0
0 -1 0
0 0 1

IndexToPointMatrix:
-1 0 0
0 -1 0
0 0 1

PointToIndexMatrix:
-1 0 0
0 -1 0
0 0 1

Inverse Direction:
-1 0 0
0 -1 0
0 0 1

PixelContainer:
ImportImageContainer (0x4efcfc0)
RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
Reference Count: 1
Modified Time: 448
Debug: Off
Object Name:
Observers:
none
Pointer: 0x7f3991f98010
Container manages memory: true
Size: 226981
Capacity: 226981

Moving image = Image (0x4f013d0)
RTTI typeinfo:   itk::Image<double, 3u>
Reference Count: 2
Modified Time: 628
Debug: Off
Object Name:
Observers:
none
Source: (none)
Source output name: (none)
Release Data: Off
Data Released: False
Global Release Data: Off
PipelineMTime: 0
UpdateMTime: 625
RealTimeStamp: 0 seconds
LargestPossibleRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [61, 61, 61]
BufferedRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [61, 61, 61]
RequestedRegion:
Dimension: 3
Index: [0, 0, 0]
Size: [61, 61, 61]
Spacing: [1, 1, 1]
Origin: [0, 0, 0]
Direction:
-1 0 0
0 -1 0
0 0 1

IndexToPointMatrix:
-1 0 0
0 -1 0
0 0 1

PointToIndexMatrix:
-1 0 0
0 -1 0
0 0 1

Inverse Direction:
-1 0 0
0 -1 0
0 0 1

PixelContainer:
ImportImageContainer (0x4ee7240)
RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
Reference Count: 1
Modified Time: 622
Debug: Off
Object Name:
Observers:
none
Pointer: 0x7f3991ddc010
Container manages memory: true
Size: 226981
Capacity: 226981

Weighting = 1
Sampling strategy = none
Number of bins = 32
Radius = 4
Sampling percentage  = 1
Transform = SyN
Gradient step = 1
Update field sigma (voxel space) = 3
Total field sigma (voxel space) = 1
Update field time sigma = 0
Total field time sigma  = 0
Number of time indices = 0
Number of time point samples = 0
Registration using 1 total stages.

Stage 0
iterations = 5
convergence threshold = 1e-06
convergence window size = 10
number of levels = 1
using the MeanSquares metric (weight = 1)
Shrink factors (level 1 out of 1): [2, 2, 2]
smoothing sigmas per level: [0]
Using default NONE metricSamplingStrategy

*** Running SyN registration (varianceForUpdateField = 3, varianceForTotalField = 1) ***

XXDIAGNOSTIC,Iteration,metricValue,convergenceValue,ITERATION_TIME_INDEX,SINCE_LAST
1DIAGNOSTIC,     1, 6.579221328575e-04, 1.797693134862e+308, 1.0861e-01, 1.0861e-01,
1DIAGNOSTIC,     2, 6.391595001650e-04, 1.797693134862e+308, 1.9123e-01, 8.2622e-02,
1DIAGNOSTIC,     3, 6.132287198572e-04, 1.797693134862e+308, 2.8386e-01, 9.2628e-02,
1DIAGNOSTIC,     4, 5.868037840114e-04, 1.797693134862e+308, 3.6975e-01, 8.5885e-02,
1DIAGNOSTIC,     5, 5.654835104282e-04, 1.797693134862e+308, 4.5294e-01, 8.3193e-02,
Elapsed time (stage 0): 0.474161


Total elapsed time: 0.474769
Segmentation fault (core dumped)
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
Check PropSeg compatibility with OS ................[OK]

ornlm is not needed anymore and dipy is now installed using pip (no more from pre-compiled wheels like before). @poquirion: could you please update the installer from master?
Thanks!

I've tried on a Ubuntu 14.04 Docker and ANTs passes (see below). @mrhardisty: do you know a Docker image that would better represent your OS? Is it possible that there are interactions with another local ITK installation? Could it be a hardware compatibility problem? An alternative solution would be to compile ANTs using the script $PATH_SCT/install/compile_ants.py. @benjamindeleener: any though?

Docker image:

docker run -it ubuntu:trusty /bin/bash

Inside Docker:

sudo apt-get update
apt-get install git-all
sudo apt-get install curl
cd home
git clone --depth=1 -b poq_issue_732 https://github.com/neuropoly/spinalcordtoolbox.git
cd spinalcordtoolbox
./install_sct
sct_check_dependencies
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /home/spinalcordtoolbox/scripts/sct_check_dependencies.py

Check which OS is running... 
.. linux (Linux-4.1.19-boot2docker-x86_64-with-debian-jessie-sid)
Check number of CPU cores...
.. Available: 1
.. Used by SCT: 1
Check RAM... 
MemTotal:        2050616 kB
total       used       free     shared    buffers     cached
Mem:          2002       1531        470        128         60       1191
-/+ buffers/cache:        280       1722
Swap:         1404          8       1396
Check which Python is running...
.. /home/spinalcordtoolbox/python/bin/python
Check SCT path...
.. /home/spinalcordtoolbox
Check SCT version... 
.. dev
Check if data are installed.........................[OK]
Check if xlwt (1.0.0) is installed..................[OK]
Check if xlutils (1.7.1) is installed...............[OK]
Check if scikit-learn (0.17.1) is installed.........[OK]
Check if scikit-image (0.12.3) is installed.........[OK]
Check if matplotlib (1.5.1) is installed............[OK]
Check if scipy (0.17.0) is installed................[OK]
Check if sympy (0.7.6) is installed.................[OK]
Check if xlrd (0.9.4) is installed..................[OK]
Check if numpy (1.11.1) is installed................[OK]
Check if pandas (0.18.0) is installed...............[OK]
Check if nibabel (2.0.2) is installed...............[WARNING]
  Detected version: 2.1.0. Required version: 2.0.2
Check if ornlm is installed.........................[OK]
Check if dipy is installed..........................[OK]
Check ANTs compatibility with OS ...................[OK]
Check PropSeg compatibility with OS ................[OK]

Actually, looking at your output, it seems like isct_antsRegistration is working, but isct_dice_coefficient is not. Could you please confirm this by doing the following:

isct_test_ants -r 0
cd tmp.*
isct_dice_coefficient data_dest.nii.gz data_src_reg.nii.gz -o dice.txt

I was able to call isct_test_ants from the python interactor but it would not take arguments.

I'm not sure how to call isct_dice_coefficient from the python interactor as it is binary.

But when I run it from bash I get after first running isct_test_ants:

3D Dice coefficient = 0.397059

On the question of ITK. I know there is another build of ITK on the system. The build of ITK is part of slicer. I can't tell from the message which version is which, Ants using ITK 4.9? I'll try compiling as well

I'm having trouble building Ants. I keep getting the following error that there is no module named: sct_utils

Traceback (most recent call last):
File "/spare/hardisty/git/spinalcordtoolbox/install/compile_ants.py", line 20, in
import sct_utils as sct
ImportError: No module named sct_utils

I figured out how to get compile_ants working. ANTs is building now

Hi, So I tried to build ants using the compile_ants.py with no change.

I then thought I would try building ants from source myself and telling my custom build of Ants to use Slicer's ITK to avoid the object factory version collision. And then installed the Ants binaries from my custom build into SCT. I did this for all Ants binaries except "ANTSLandmarksBSplineTransform" as this binary was not created as a part of my build of Ants. If you could please let me know how to build ANTSLandmarksBSplineTransform then I could try installing it as well. It looks like my custom built Ants binaries have fixed a bunch of the failed tests.

if looks like the only remaining failing tests are:
test_sct_create_mask
test_sct_label_vertebrae

Do these 2 depend on ANTSLandmarksBSplineTransform?

Thanks

Michael

Here is the output of sct_testing in its entirety:

Check folder existence...

Path to testing data: /spare/hardisty/anaconda2/sct_testing_data/data/
Checking test_sct_apply_transfo.....................[OK]
Checking test_sct_check_atlas_integrity.............[OK]
Checking test_sct_compute_mtr.......................[OK]
Checking test_sct_concat_transfo....................[OK]
Checking test_sct_convert...........................[OK]
Checking test_sct_create_mask.......................[FAIL]
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0

Create temporary folder...
mkdir tmp.160907083314/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160907083314/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 15,17,0,1:15,17,1,1:15,17,2,1:15,17,3,1:15,17,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as:
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension
 -concat {x,y,z,t}            Concatenate data along the specified dimension

Orientation operations:
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations:
 -mcs                         Multi-component split. Outputs the components separately. (The sufix
                              _x, _y and _z are added to the specified output)
                                Only one input
 -omc                         Multi-component output. Merge inputted images into one
                              multi-component image. (need several inputs.)

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1,1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-data RIP -v 0
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p point,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_point.nii.gz -size 10 -r 0

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p point,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_point.nii.gz -size 10 -r 0

Create temporary folder...
mkdir tmp.160907083317/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160907083317/data.nii
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_point.nii.gz -o tmp.160907083317/point.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
point.nii.gz
WARNING: File point_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Extract coordinate of point...
sct_label_utils -i point_RPI.nii.gz -display

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,19,0,1:20,19,1,1:20,19,2,1:20,19,3,1:20,19,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension
-concat {x,y,z,t} Concatenate data along the specified dimension

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations:
-mcs Multi-component split. Outputs the components separately. (The sufix
_x, _y and _z are added to the specified output)
Only one input
-omc Multi-component output. Merge inputted images into one
multi-component image. (need several inputs.)

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1,1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-data RIP -v 0
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p center -size 10 -r 0

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p center -size 10 -r 0

Create temporary folder...
mkdir tmp.160907083320/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160907083320/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,20,0,1:20,20,1,1:20,20,2,1:20,20,3,1:20,20,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as:
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension
 -concat {x,y,z,t}            Concatenate data along the specified dimension

Orientation operations:
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations:
 -mcs                         Multi-component split. Outputs the components separately. (The sufix
                              _x, _y and _z are added to the specified output)
                                Only one input
 -omc                         Multi-component output. Merge inputted images into one
                              multi-component image. (need several inputs.)

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1,1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-data RIP -v 0
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p centerline,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -size 10 -r 0

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p centerline,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -size 10 -r 0
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz

Create temporary folder...
mkdir tmp.160907083323/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160907083323/data.nii
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -o tmp.160907083323/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension
-concat {x,y,z,t} Concatenate data along the specified dimension

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations:
-mcs Multi-component split. Outputs the components separately. (The sufix
_x, _y and _z are added to the specified output)
Only one input
-omc Multi-component output. Merge inputted images into one
multi-component image. (need several inputs.)

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1,1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-data RIP -v 0
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -p center -size 10 -r 0

Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -p center -size 10 -r 0

Create temporary folder...
mkdir tmp.160907083325/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -o tmp.160907083325/data.nii

Reorient to RPI...
data.nii
rm -rf tmp.160907083325_330207/

Get dimensions of data...
  40 x 42 x 5 x 7
WARNING in sct_create_mask.py: Input image is 4d but output mask will 3D.
WARNING: File data_RPI.nii already exists. Deleting it.

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,21,0,1:20,21,1,1:20,21,2,1:20,21,3,1:20,21,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as:
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension
 -concat {x,y,z,t}            Concatenate data along the specified dimension

Orientation operations:
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations:
 -mcs                         Multi-component split. Outputs the components separately. (The sufix
                              _x, _y and _z are added to the specified output)
                                Only one input
 -omc                         Multi-component output. Merge inputted images into one
                              multi-component image. (need several inputs.)

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1,1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-data RIP -v 0

Checking test_sct_crop_image........................[OK]
Checking test_sct_dmri_compute_dti..................[OK]
Checking test_sct_dmri_get_bvalue...................[OK]
Checking test_sct_dmri_transpose_bvecs..............[OK]
Checking test_sct_dmri_moco.........................[OK]
Checking test_sct_dmri_separate_b0_and_dwi..........[OK]
Checking test_sct_extract_metric....................[OK]
Checking test_sct_fmri_compute_tsnr.................[OK]
Checking test_sct_fmri_moco.........................[OK]
Checking test_sct_image.............................[OK]
Checking test_sct_label_utils.......................[OK]
Checking test_sct_label_vertebrae...................~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Spinal Cord Toolbox (version dev-6a1483c026e09b0bed0b8ccc1252af84eaa1bd3f)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_label_vertebrae.py -laplacian 0 -o t2_seg_labeled.nii.gz -i /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -v 1 -s /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2_seg.nii.gz -r 1 -denoise 0 -ofolder sct_label_vertebrae_data_160907083408_323679/ -initz 34,3
Check folder existence...

Create temporary folder...

Create temporary folder...
mkdir tmp.160907083409_783364/

Copying input data to tmp folder...
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -o tmp.160907083409_783364/data.nii
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2_seg.nii.gz -o tmp.160907083409_783364/segmentation.nii.gz

Create label to identify disc...

Straighten spinal cord...
sct_straighten_spinalcord -i data.nii -s segmentation.nii.gz -r 0 -qc 0
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_straighten_spinalcord.py -i data.nii -s segmentation.nii.gz -r 0 -qc 0
/spare/hardisty/git/spinalcordtoolbox

Check input arguments:
  Input volume ...................... data.nii
  Centerline ........................ segmentation.nii.gz
  Final interpolation ............... spline
  Verbose ........................... 1


Create temporary folder...
mkdir tmp.160907083410_637429/

Copy files to tmp folder...
sct_convert -i data.nii -o tmp.160907083410_637429/data.nii
sct_convert -i segmentation.nii.gz -o tmp.160907083410_637429/centerline.nii.gz
cp data.nii data_1mm.nii
cp centerline.nii.gz centerline_1mm.nii.gz

Orient centerline to RPI orientation...
centerline_1mm.nii.gz

Get dimensions of data...
60 x 55 x 52 x 1

Change orientation...
rm -f centerline_1mm_RPI.nii.gz

Generate output files...
Created file(s):
--> ['centerline_1mm_rpi.nii.gz']


Get dimensions...
.. matrix size: 52 x 60 x 55
.. voxel size:  1.0mm x 1.0mm x 1.0mm

Smooth centerline/segmentation...
.. Get center of mass of the centerline/segmentation...
.. Smoothing algo = hanning
.. Windows length = 50

Get coordinates of landmarks along curved centerline...

Get coordinates of landmarks along straight centerline...

Pad input volume to account for landmarks that fall outside the FOV...

Generate output files...
Created file(s):
--> ['tmp.centerline_pad.nii.gz']


Open padded centerline for reading...

Write NIFTI volumes...
.. File created: tmp.landmarks_curved.nii.gz
.. File created: tmp.landmarks_straight.nii.gz
cp tmp.landmarks_curved.nii.gz tmp.landmarks_curved_crop.nii.gz
cp tmp.landmarks_straight.nii.gz tmp.landmarks_straight_crop.nii.gz

Estimate b-spline transformation: curve --> straight...
isct_ANTSLandmarksBSplineTransform tmp.landmarks_straight.nii.gz tmp.landmarks_curved.nii.gz tmp.curve2straight_rigid.txt tmp.warp_curve2straight.nii.gz 5x5x10 3 LandmarksRealCurve.txt LandmarksRealStraight.txt 3 0
WARNING: In /home/brain/antsbin/ITKv4/Modules/Core/Common/src/itkObjectFactoryBase.cxx, line 563
Possible incompatible factory load:
Running itk version :
itk version 4.9.0
Loaded factory version:
itk version 4.10.0
Loading factory:
/spare/hardisty/s4r-conda/Slicer-build/lib/Slicer-4.5/ITKFactories/libMRMLIDIOPlugin.so


MSE = 0.00187222 mm
Segmentation fault (core dumped)
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py, line 118
[FAIL]

====================================================================================================
sct_label_vertebrae  -laplacian 0 -o t2_seg_labeled.nii.gz -i /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2.nii.gz -v 1 -s /spare/hardisty/anaconda2/sct_testing_data/data/t2/t2_seg.nii.gz -r 1 -denoise 0 -ofolder sct_label_vertebrae_data_160907083408_323679/ -initz 34,3
====================================================================================================

ERROR: Function crashed!
Checking test_sct_maths.............................[OK]
Checking test_sct_process_segmentation..............[OK]
Checking test_sct_propseg...........................[OK]
Checking test_sct_register_graymatter...............Check folder existence...
Check folder existence...
  OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/

Create temporary folder...
mkdir tmp.160907083425_47300/
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt0_gmseg.nii.gz -o tmp.160907083425_47300/mt0_gmseg.nii.gz
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/warp_template2mt.nii.gz -o tmp.160907083425_47300/warp_template2mt.nii.gz
  OK: multilabel_automatic_seg.nii.gz

Create temporary folder...
mkdir tmp.160907083425/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.160907083425/data.nii
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.160907083425/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as:
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension
 -concat {x,y,z,t}            Concatenate data along the specified dimension

Orientation operations:
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations:
 -mcs                         Multi-component split. Outputs the components separately. (The sufix
                              _x, _y and _z are added to the specified output)
                                Only one input
 -omc                         Multi-component output. Merge inputted images into one
                              multi-component image. (need several inputs.)

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

EXAMPLE
sct_image.pyc -i data.nii.gz -o data_pad.nii.gz -pad 0,0,1 -pad-asym 0,0,5,10,1,1 -copy-header data_dest.nii.gz -split x -concat x -setorient RIP -setorient-data RIP -v 0

I'm working on merging master on the branch, its a bi tedious, but I should have the old dependency problem resolved today.

@poquirion: I am not sure the problem is related to the presence of non-updated files on this branch, as I have just tested it on my Docker build (Ubuntu 14.04) and all tests pass except test_sct_dmri_compute_dti (which is expected given that dipy is now installed via pip instead of from a wheel).

@mrhardisty:

  • you see to have a recurrent problem related to the issue "-setorient only takes... Aborted ". This is strange because it seems to be a syntax error within the code, however when I run the tests on my side I don't experience this error. My Dockerfile + syntax is below.
  • the function isct_ANTSLandmarksBSplineTransform is no more used in the current master branch. We will try to merge ASAP. For now you can ignore issues related to this binary.

ubuntu_14.04/Dockerfile:

FROM ubuntu:trusty

# Install useful stuff
RUN apt-get -y update
RUN apt-get -y install git
RUN apt-get -y install curl

# Install SCT
RUN git clone --depth=1 -b poq_issue_732 https://github.com/neuropoly/spinalcordtoolbox.git /home/sct

Build Image:

cd ubuntu_14.04
docker build -t ubuntu_14.04 .

Open Docker, run Image:

docker run -t -i ubuntu_14.04 /bin/bash

Within Docker:

./install_sct
export PATH=/home/sct/bin:$PATH
source sct_launcher
python

Within Python:

import sys
sys.path.append('/home/sct/scripts/')
import sct_testing
sct_testing.main()

Output:

status: [0, 0, 0, 0, 0, 0, 0, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Thanks Julien. My understanding is that of the 2 test that have failed there is: test_sct_label_vertebrae which will most likely be fixed by Master branch merging. While the test_sct_create_mask test failure remains unexplained.

To be more clear on how I am running sct_testing. I am launching it from Slicer's python interactor with the following.

from bash in Ubuntu 14.04.4 LTS (GNU/Linux 3.19.0-58-generic x86_64)

export SCT_PYTHON=/spare/hardisty/anaconda2
export PYTHONHOME=/spare/hardisty/anaconda2
./s4r-conda/Slicer-build/Slicer --no-main-window --show-python-interactor

within Slicer's Python Interactor:
Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2

import sys
sys.path.append('/spare/hardisty/git/spinalcordtoolbox/scripts/')
import sct_testing
myArguments = ['-d']
myArguments.append('0')
myArguments.append('-p')
myArguments.append('/spare/hardisty/anaconda2/sct_testing_data/data/')
sct_testing.main(myArguments)

Looks like both test_sct_create_mask and test_sct_label_vertebrae crash due to the same error related to "-setorient only takes... Aborted". Let's try to investigate this error with full verbose. Could you please try to run the following commands within your Python interactor and copy/paste the output:

import sys
sys.path.append('/spare/hardisty/git/spinalcordtoolbox/scripts/')
import sct_create_mask
sct_create_mask.main(['-i', '/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt0.nii.gz', '-p', 'center'])

I finally manage the merge with master.

But now, I have problems with the testing data!

@jcohenadad : it seems that there are missing files:

[...]
   status.append(test_function(f))
  File "/home/poquirion/neuropoly/spinalcordtoolbox/scripts/sct_testing.py", line 250, in test_function
    result_test = script_tested.test(param.path_data)
  File "/home/poquirion/neuropoly/spinalcordtoolbox/testing/test_sct_apply_transfo.py", line 33, in test
    + ' -w ' + data_path + folder_data[1] + file_data[2]
TypeError: cannot concatenate 'str' and 'NoneType' objects

WARNING: Cannot open /home/poquirion/test/t_sct/sct_testing_data/template/template/info_label.txt
Process finished with exit code 1

@poquirion: yes, sct_testing_data has changed. By default, if sct_testing finds the folder, it will not re-download it. So you need to manually remove it and then re-launch sct_testing.

See below-- Almost there ;-)

Checking test_sct_apply_transfo.....................[OK]
Checking test_sct_compute_mtr.......................[OK]
Checking test_sct_concat_transfo....................[OK]
Checking test_sct_convert...........................[OK]
Checking test_sct_create_mask.......................[OK]
Checking test_sct_crop_image........................[OK]
Checking test_sct_dmri_compute_dti..................[OK]
Checking test_sct_dmri_create_noisemask.............[OK]
Checking test_sct_dmri_get_bvalue...................[OK]
Checking test_sct_dmri_transpose_bvecs..............[OK]
Checking test_sct_dmri_moco.........................[OK]
Checking test_sct_dmri_separate_b0_and_dwi..........[OK]
Checking test_sct_documentation.....................[OK]
Checking test_sct_extract_metric....................[OK]
Checking test_sct_fmri_compute_tsnr.................[OK]
Checking test_sct_fmri_moco.........................[OK]
Checking test_sct_image.............................[OK]
Checking test_sct_label_utils.......................[OK]
Checking test_sct_label_vertebrae.................../home/sct/scripts/sct_label_vertebrae.py -c t2 -laplacian 0 -o t2_seg_labeled.nii.gz -i /home/sct/sct_testing_data/t2/t2.nii.gz -t /home/sct/data/PAM50/ -v 1 -initfile /home/sct/sct_testing_data/t2/init_label_vertebrae.txt -s /home/sct/sct_testing_data/t2/t2_seg.nii.gz -r 1 -denoise 0 -ofolder sct_label_vertebrae_sct_testing_data_160907191313_781076/
/home/sct/python/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
Check folder existence...
Check folder existence...

Create temporary folder...

Create temporary folder...
mkdir tmp.160907191313_619279/

Copying input data to tmp folder...
sct_convert -i /home/sct/sct_testing_data/t2/t2.nii.gz -o tmp.160907191313_619279/data.nii
sct_convert -i /home/sct/sct_testing_data/t2/t2_seg.nii.gz -o tmp.160907191313_619279/segmentation.nii.gz

Create label to identify disc...

Straighten spinal cord...
sct_straighten_spinalcord -i data.nii -s segmentation.nii.gz -r 0 -qc 0

Resample to 0.5mm isotropic...
Traceback (most recent call last):
File "/home/sct/scripts/sct_label_vertebrae.py", line 843, in <module>
main()
File "/home/sct/scripts/sct_label_vertebrae.py", line 233, in main
run('sct_resample -i data_straight.nii -mm 0.5x0.5x0.5 -x linear -o data_straightr.nii', verbose)
File "/home/sct/scripts/sct_utils.py", line 94, in run
return 0, sct_script.main(sct_args)
File "/home/sct/scripts/sct_resample.py", line 366, in main
resample()
File "/home/sct/scripts/sct_resample.py", line 58, in resample
from nipy.algorithms.registration import resample
File "/home/sct/python/lib/python2.7/site-packages/nipy/algorithms/registration/__init__.py", line 18, in <module>
from .scripting import space_time_realign, aff2euler
File "/home/sct/python/lib/python2.7/site-packages/nipy/algorithms/registration/scripting.py", line 22, in <module>
import matplotlib.pyplot as plt
File "/home/sct/python/lib/python2.7/site-packages/matplotlib/pyplot.py", line 114, in <module>
_backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
File "/home/sct/python/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
globals(),locals(),[backend_name],0)
File "/home/sct/python/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 18, in <module>
from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase
File "/home/sct/python/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 15, in <module>
from .backend_qt5 import QtCore
File "/home/sct/python/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 31, in <module>
from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName, __version__
File "/home/sct/python/lib/python2.7/site-packages/matplotlib/backends/qt_compat.py", line 124, in <module>
from PyQt4 import QtCore, QtGui
ImportError: libSM.so.6: cannot open shared object file: No such file or directory

/home/sct/scripts/sct_utils.pyNone

[FAIL]

====================================================================================================
sct_label_vertebrae  -c t2 -laplacian 0 -o t2_seg_labeled.nii.gz -i /home/sct/sct_testing_data/t2/t2.nii.gz -t /home/sct/data/PAM50/ -v 1 -initfile /home/sct/sct_testing_data/t2/init_label_vertebrae.txt -s /home/sct/sct_testing_data/t2/t2_seg.nii.gz -r 1 -denoise 0 -ofolder sct_label_vertebrae_sct_testing_data_160907191313_781076/
====================================================================================================

ERROR: Function crashed!
Checking test_sct_maths.............................[OK]
Checking test_sct_process_segmentation..............[OK]
Checking test_sct_propseg...........................[OK]
Checking test_sct_register_graymatter...............Check folder existence...
Check folder existence...
  OK: /home/sct/sct_testing_data/mt/label/
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sct/scripts/sct_testing.py", line 113, in main
    status.append(test_function(f))
  File "/home/sct/scripts/sct_testing.py", line 250, in test_function
    result_test = script_tested.test(param.path_data)
  File "/home/sct/testing/test_sct_register_graymatter.py", line 57, in test
    status, output = sct.run(cmd, 0)
  File "/home/sct/scripts/sct_utils.py", line 94, in run
    return 0, sct_script.main(sct_args)
  File "/home/sct/scripts/sct_register_graymatter.py", line 551, in main
    ml_reg.register()
  File "/home/sct/scripts/sct_register_graymatter.py", line 78, in register
    path_gm, file_gm, ext_gm = sct.extract_fname(self.fname_gm)
AttributeError: MultiLabelRegistration instance has no attribute 'fname_gm'

@jcohenadad, Thank, it does solve many problem.

@poquirion: you could also use sct_testing -d 1

OK, the issue with test_sct_label_vertebrae was fixed by installing the following on my Docker image:

apt-get -y install libgomp1
apt-get -y install libglib2.0-0
apt-get -y install libsm6
apt-get -y install libxrender1

This error remains:
@SaraDupont: any idea?

Checking test_sct_register_graymatter...............Check folder existence...
Check folder existence...
  OK: /home/sct/sct_testing_data/mt/label/
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/sct/scripts/sct_testing.py", line 113, in main
    status.append(test_function(f))
  File "/home/sct/scripts/sct_testing.py", line 250, in test_function
    result_test = script_tested.test(param.path_data)
  File "/home/sct/testing/test_sct_register_graymatter.py", line 57, in test
    status, output = sct.run(cmd, 0)
  File "/home/sct/scripts/sct_utils.py", line 94, in run
    return 0, sct_script.main(sct_args)
  File "/home/sct/scripts/sct_register_graymatter.py", line 551, in main
    ml_reg.register()
  File "/home/sct/scripts/sct_register_graymatter.py", line 78, in register
    path_gm, file_gm, ext_gm = sct.extract_fname(self.fname_gm)
AttributeError: MultiLabelRegistration instance has no attribute 'fname_gm'

It seems to be working better now. I have made a few fix. Also, I am on ubuntu 16.04, and was running into a MKL problem, describe here https://github.com/ContinuumIO/anaconda-issues/issues/720. I just reinstall numpy and it fixed the bug... I will try to reorder the package installation to make sure we do not have to reinstalll numpy every time.

I also fixed the AttributeError

Thanks for your help. I just pulled the new version(932a77b0b6c0a9ded9e9927405ff631087f810da) of poq_issue_732 and did the apt-get commans suggested by @jcohenadad . Here are the new test results. test_sct_label_vertebrae is now passing as suggested by @jcohenadad.

It looks like the following are failing:

test_sct_create_mask - it seems to be the same issue passing to value to the setorient of sct_image
test_sct_extract_metric
test_sct_register_graymatter - it seems to be the same issue passing to value to the setorient of sct_image

hardisty@starship:~$ ./s4r-conda/Slicer-build/Slicer --no-main-window --show-python-interactor
Number of registered modules: 151
Number of instantiated modules: 151
Initializing terminology mapping for map file /spare/hardisty/s4r-conda/Slicer-build/share/Slicer-4.5/ColorFiles/Terminology//GenericAnatomyColors-SNOMED.csv
288 terms were read for Slicer LUT GenericAnatomyColors
Number of loaded modules: 151
Check folder existence...

Path to testing data: /spare/hardisty/anaconda2/sct_testing_data/data/

Create temporary folder...
mkdir tmp.160908144035_702997/
Checking test_sct_apply_transfo.....................[OK]
Checking test_sct_compute_mtr.......................[OK]
Checking test_sct_concat_transfo....................[OK]
Checking test_sct_convert...........................[OK]
Checking test_sct_create_mask.......................[FAIL]
sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0

Spinal Cord Toolbox (version dev-6f5f54b328dd10852f3b0bbf023b83de2ba6aeca)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0

Create temporary folder...

Create temporary folder...
mkdir tmp.160908144045_253338/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160908144045_253338/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 15,17,0,1:15,17,1,1:15,17,2,1:15,17,3,1:15,17,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as:
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension. The suffix _DIM+NUMBER will
                              be added to the intput file name.
 -concat {x,y,z,t}            Concatenate data along the specified dimension
 -type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
 -mcs                         Multi-component split: Split ITK warping field into three separate
                              displacement fields. The suffix _X, _Y and _Z will be added to the
                              input file name.
 -omc                         Multi-component merge: Merge inputted images into one multi-component
                              image. Requires several inputs.

Warping field operations:
 -display-warp                Create a grid and deform it using provided warping field.

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 411, in <module>
    main()
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 95, in main
    create_mask()
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 252, in create_mask
    sct.run('sct_image -i mask_RPI.nii.gz -o mask.nii.gz -setorient ' + orientation_input, param.verbose)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py", line 94, in run
    return 0, sct_script.main(sct_args)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
    arguments = parser.parse(args)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
    dictionary[arg] = self.options[arg].check_integrity(param)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
    self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
    self.generate(error)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
    raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p point,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_point.nii.gz -size 10 -r 0

Spinal Cord Toolbox (version dev-6f5f54b328dd10852f3b0bbf023b83de2ba6aeca)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p point,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_point.nii.gz -size 10 -r 0

Create temporary folder...

Create temporary folder...
mkdir tmp.160908144046_631641/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160908144046_631641/data.nii
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_point.nii.gz -o tmp.160908144046_631641/point.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
point.nii.gz
WARNING: File point_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Extract coordinate of point...
sct_label_utils -i point_RPI.nii.gz -display

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,19,0,1:20,19,1,1:20,19,2,1:20,19,3,1:20,19,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 411, in
main()
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 95, in main
create_mask()
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 252, in create_mask
sct.run('sct_image -i mask_RPI.nii.gz -o mask.nii.gz -setorient ' + orientation_input, param.verbose)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py", line 94, in run
return 0, sct_script.main(sct_args)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p center -size 10 -r 0

Spinal Cord Toolbox (version dev-6f5f54b328dd10852f3b0bbf023b83de2ba6aeca)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p center -size 10 -r 0

Create temporary folder...

Create temporary folder...
mkdir tmp.160908144048_30597/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160908144048_30597/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,20,0,1:20,20,1,1:20,20,2,1:20,20,3,1:20,20,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as:
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension. The suffix _DIM+NUMBER will
                              be added to the intput file name.
 -concat {x,y,z,t}            Concatenate data along the specified dimension
 -type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
 -mcs                         Multi-component split: Split ITK warping field into three separate
                              displacement fields. The suffix _X, _Y and _Z will be added to the
                              input file name.
 -omc                         Multi-component merge: Merge inputted images into one multi-component
                              image. Requires several inputs.

Warping field operations:
 -display-warp                Create a grid and deform it using provided warping field.

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 411, in <module>
    main()
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 95, in main
    create_mask()
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 252, in create_mask
    sct.run('sct_image -i mask_RPI.nii.gz -o mask.nii.gz -setorient ' + orientation_input, param.verbose)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py", line 94, in run
    return 0, sct_script.main(sct_args)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
    arguments = parser.parse(args)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
    dictionary[arg] = self.options[arg].check_integrity(param)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
    self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
    self.generate(error)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
    raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p centerline,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -size 10 -r 0

Spinal Cord Toolbox (version dev-6f5f54b328dd10852f3b0bbf023b83de2ba6aeca)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -p centerline,/spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -size 10 -r 0
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz

Create temporary folder...

Create temporary folder...
mkdir tmp.160908144049_444315/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1.nii.gz -o tmp.160908144049_444315/data.nii
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_seg.nii.gz -o tmp.160908144049_444315/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 411, in
main()
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 95, in main
create_mask()
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 252, in create_mask
sct.run('sct_image -i mask_RPI.nii.gz -o mask.nii.gz -setorient ' + orientation_input, param.verbose)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py", line 94, in run
return 0, sct_script.main(sct_args)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -p center -size 10 -r 0

Spinal Cord Toolbox (version dev-6f5f54b328dd10852f3b0bbf023b83de2ba6aeca)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -p center -size 10 -r 0

Create temporary folder...

Create temporary folder...
mkdir tmp.160908144050_464424/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/dmri/dmri.nii.gz -o tmp.160908144050_464424/data.nii

Reorient to RPI...
data.nii
rm -rf tmp.160908144051_694873/

Get dimensions of data...
  40 x 42 x 5 x 7
WARNING in sct_create_mask.py: Input image is 4d but output mask will 3D.
WARNING: File data_RPI.nii already exists. Deleting it.

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

sct_label_utils -i line.nii -o line.nii -create-add 20,21,0,1:20,21,1,1:20,21,2,1:20,21,3,1:20,21,4,1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as:
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension. The suffix _DIM+NUMBER will
                              be added to the intput file name.
 -concat {x,y,z,t}            Concatenate data along the specified dimension
 -type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
 -mcs                         Multi-component split: Split ITK warping field into three separate
                              displacement fields. The suffix _X, _Y and _Z will be added to the
                              input file name.
 -omc                         Multi-component merge: Merge inputted images into one multi-component
                              image. Requires several inputs.

Warping field operations:
 -display-warp                Create a grid and deform it using provided warping field.

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 411, in <module>
    main()
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 95, in main
    create_mask()
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 252, in create_mask
    sct.run('sct_image -i mask_RPI.nii.gz -o mask.nii.gz -setorient ' + orientation_input, param.verbose)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py", line 94, in run
    return 0, sct_script.main(sct_args)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
    arguments = parser.parse(args)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
    dictionary[arg] = self.options[arg].check_integrity(param)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
    self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
    self.generate(error)
  File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
    raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Checking test_sct_crop_image........................[OK]
Checking test_sct_dmri_compute_dti..................[OK]
Checking test_sct_dmri_create_noisemask.............[OK]
Checking test_sct_dmri_get_bvalue...................[OK]
Checking test_sct_dmri_transpose_bvecs..............[OK]
Checking test_sct_dmri_moco.........................[OK]
Checking test_sct_dmri_separate_b0_and_dwi..........[OK]
Checking test_sct_documentation.....................[OK]
Checking test_sct_extract_metric....................[FAIL]

Spinal Cord Toolbox (version dev-6f5f54b328dd10852f3b0bbf023b83de2ba6aeca)
Running /spare/hardisty/git/spinalcordtoolbox/scripts/sct_extract_metric.py -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mtr.nii.gz -f /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas -method wath -vert 1:3 -o quantif_mtr.nii.gz -v 1
Check folder existence...
WARNING : -v is a deprecated argument and will no longer be updated in future versions. Changing argument to -vert.

Checked parameters:
data ...................... /spare/hardisty/anaconda2/sct_testing_data/data/mt/mtr.nii.gz
folder label .............. /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/
estimation method ......... wath
slices of interest ........
vertebral levels .......... 1
vertebral labeling file.... /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/template/MNI-Poly-AMU_level.nii.gz
advanced parameters ....... ['10', '10']

OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_00.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_01.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_02.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_03.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_04.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_05.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_06.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_07.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_08.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_09.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_10.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_11.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_12.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_13.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_14.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_15.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_16.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_17.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_18.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_19.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_20.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_21.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_22.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_23.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_24.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_25.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_26.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_27.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_28.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_29.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_30.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_31.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_32.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_33.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_34.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_35.nii.gz
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/atlas/PAM50_atlas_36.nii.gz

Create temporary folder to change the orientation of the NIFTI files into RPI...

Create temporary folder...
mkdir tmp.160908144102_168058/

Change metric image orientation and load it...

Change labels orientation and load them...

Remove the temporary folder...

Find slices corresponding to vertebral levels...
WARNING: the bottom vertebral level you selected is lower than the lowest level available
--> Selected the lowest vertebral level available: 2
WARNING: the top vertebral level you selected is not available
--> Selected the nearest superior level available: 2
Check consistency of data size...
OK!
Find slices corresponding to vertebral levels...
4:4
WARNING: labels #0 contains only null voxels. Mean and std are set to 0.
WARNING: labels #1 contains only null voxels. Mean and std are set to 0.
WARNING: labels #2 contains only null voxels. Mean and std are set to 0.
WARNING: labels #3 contains only null voxels. Mean and std are set to 0.
WARNING: labels #4 contains only null voxels. Mean and std are set to 0.
WARNING: labels #5 contains only null voxels. Mean and std are set to 0.
WARNING: labels #6 contains only null voxels. Mean and std are set to 0.
WARNING: labels #7 contains only null voxels. Mean and std are set to 0.
WARNING: labels #8 contains only null voxels. Mean and std are set to 0.
WARNING: labels #9 contains only null voxels. Mean and std are set to 0.
WARNING: labels #10 contains only null voxels. Mean and std are set to 0.
WARNING: labels #11 contains only null voxels. Mean and std are set to 0.
WARNING: labels #12 contains only null voxels. Mean and std are set to 0.
WARNING: labels #13 contains only null voxels. Mean and std are set to 0.
WARNING: labels #14 contains only null voxels. Mean and std are set to 0.
WARNING: labels #15 contains only null voxels. Mean and std are set to 0.
WARNING: labels #16 contains only null voxels. Mean and std are set to 0.
WARNING: labels #17 contains only null voxels. Mean and std are set to 0.
WARNING: labels #18 contains only null voxels. Mean and std are set to 0.
WARNING: labels #19 contains only null voxels. Mean and std are set to 0.
WARNING: labels #20 contains only null voxels. Mean and std are set to 0.
WARNING: labels #21 contains only null voxels. Mean and std are set to 0.
WARNING: labels #22 contains only null voxels. Mean and std are set to 0.
WARNING: labels #23 contains only null voxels. Mean and std are set to 0.
WARNING: labels #24 contains only null voxels. Mean and std are set to 0.
WARNING: labels #25 contains only null voxels. Mean and std are set to 0.
WARNING: labels #26 contains only null voxels. Mean and std are set to 0.
WARNING: labels #27 contains only null voxels. Mean and std are set to 0.
WARNING: labels #28 contains only null voxels. Mean and std are set to 0.
WARNING: labels #29 contains only null voxels. Mean and std are set to 0.
WARNING: labels #30 contains only null voxels. Mean and std are set to 0.
WARNING: labels #31 contains only null voxels. Mean and std are set to 0.
WARNING: labels #32 contains only null voxels. Mean and std are set to 0.
WARNING: labels #33 contains only null voxels. Mean and std are set to 0.
WARNING: labels #34 contains only null voxels. Mean and std are set to 0.
WARNING: labels #35 contains only null voxels. Mean and std are set to 0.
WARNING: labels #36 contains only null voxels. Mean and std are set to 0.
WARNING: labels #0 contains only null voxels. Mean and std are set to 0.
Traceback (most recent call last):
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_extract_metric.py", line 1079, in
main()
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_extract_metric.py", line 383, in main
combined_labels_value[i_combined_labels], combined_labels_std[i_combined_labels], combined_labels_fract_vol[i_combined_labels] = extract_metric(method, data, labels, indiv_labels_ids, ml_clusters, adv_param, normalizing_label, normalization_method, combined_labels_id_groups[i_combined_labels])
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_extract_metric.py", line 476, in extract_metric
fract_vol_per_label = np.zeros(metric_in_labels.size, dtype=float)
AttributeError: 'int' object has no attribute 'size'
Checking test_sct_fmri_compute_tsnr.................[OK]
Checking test_sct_fmri_moco.........................[OK]
Checking test_sct_image.............................[OK]
Checking test_sct_label_utils.......................[OK]
Checking test_sct_label_vertebrae...................[OK]
Checking test_sct_maths.............................[OK]
Checking test_sct_process_segmentation..............[OK]
Checking test_sct_propseg...........................[OK]
Checking test_sct_register_graymatter...............Check folder existence...
Check folder existence...
OK: /spare/hardisty/anaconda2/sct_testing_data/data/mt/label/

Create temporary folder...
mkdir tmp.160908144158_30318/
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/mt1_gmseg.nii.gz -o tmp.160908144158_30318/mt1_gmseg.nii.gz
sct_convert -i /spare/hardisty/anaconda2/sct_testing_data/data/mt/warp_template2mt.nii.gz -o tmp.160908144158_30318/warp_template2mt.nii.gz
OK: multilabel_automatic_seg.nii.gz

Create temporary folder...

Create temporary folder...
mkdir tmp.160908144158_69468/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.160908144158_69468/data.nii
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.160908144158_69468/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "", line 1, in
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_testing.py", line 113, in main
status.append(test_function(f))
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_testing.py", line 250, in test_function
result_test = script_tested.test(param.path_data)
File "/spare/hardisty/git/spinalcordtoolbox/testing/test_sct_register_graymatter.py", line 57, in test
status, output = sct.run(cmd, 0)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py", line 94, in run
return 0, sct_script.main(sct_args)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_register_graymatter.py", line 552, in main
ml_reg.register()
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_register_graymatter.py", line 109, in register
sct.run('sct_create_mask -i '+fname_automatic_ml+' -p centerline,'+fname_automatic_ml+' -f box -size '+str(size_mask)+' -o '+fname_mask)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py", line 94, in run
return 0, sct_script.main(sct_args)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 95, in main
create_mask()
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_create_mask.py", line 252, in create_mask
sct.run('sct_image -i mask_RPI.nii.gz -o mask.nii.gz -setorient ' + orientation_input, param.verbose)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_utils.py", line 94, in run
return 0, sct_script.main(sct_args)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.

@poquirion: replacing the system call of sct_image inside the failing function sct_create_mask will already provide a good cleaning for the issue reported above.

I have made a few correction in the branch that should help us see through this issu, but the real problem is that I can't reproduce the slicer bug on my machine. I think the next step for me is to install slicer and have a testing environment that is similar to the one ran by @mrhardisty.

Here is how I got my system setup to run slicer with a version of python that was compatible with SCT. I based my setup procedure on what was here, which details how to use anaconda as slicer's python.
Please note that you must have cmake version >=3.4

briefly here are the steps I took to setup Slicer and install the required packages

downloading and installing anaconda

wget https://repo.continuum.io/archive/Anaconda2-4.1.1-Linux-x86_64.sh
./Anaconda2-4.1.1-Linux-x86_64.sh

setting up the build tree for slicer using anaconda

cd git
git clone https://github.com/Slicer/Slicer.git
cd ..
mkdir s4r-conda
cd s4r-conda
cmake /spare/hardisty/git/Slicer \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/spare/hardisty/qt-everywhere-opensource-build-4.8.7/bin/qmake \
  -DPYTHON_EXECUTABLE:FILEPATH=/spare/hardisty/anaconda2/bin/python \
  -DPYTHON_INCLUDE_DIR:PATH=/spare/hardisty/anaconda2/include/python2.7 \
  -DPYTHON_LIBRARY:FILEPATH=/spare/hardisty/anaconda2/lib/libpython2.7.so  \
  -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=1 \
  -DOPENSSL_DOWNLOAD_VERSION:STRING=1.0.1l \
  -DSlicer_USE_SYSTEM_CTKAPPLAUNCHER:BOOL=0 \
  -DSlicer_USE_SYSTEM_OpenSSL:BOOL=0 \
  -DSlicer_USE_SYSTEM_zlib:BOOL=0 \
  -DSlicer_USE_SYSTEM_python:BOOL=0 \
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=1 \
  -DSlicer_BUILD_CLI:BOOL=OFF \
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF

export PYTHONHOME=/spare/hardisty/anaconda2
make -j6

Note: I had to make a few times. I am not sure if there was a race condition in the build or if I just didn't have everything setup prior

for some reason numpy is broken within anaconda after slicer builds. So i had to remove and reinstall. This was causing all sorts of things to be broken when running slicer

cd ../anaconda2
./bin/conda remove numpy
./bin/conda install numpy

installing dependencies inside anaconda

./bin/conda install xlutils
./bin/conda install pip
./bin/conda install scikit-image
./bin/conda install scikit-learn
./bin/conda install sympy
./bin/conda install matplotlib
./bin/conda install xlwt
./bin/conda install xlrd

installing with pip

./bin/python
import pip
pip.main(['install','nipy'])
pip.main(['install','dipy'])
pip.main(['install','nibabel'])
exit()

custom build ANTs -based on previous discussion in this issue thread. Specifically I have ANTs use Slicer's version of ITK to prevent different versions of ITK.

cd git
git clone https://github.com/stnava/ANTs.git
cd ..
mkdir ANTs-build
cd ANTs-build
cmake /spare/hardisty/git/ANTs \
  -DITK_DIR:PATH=/spare/hardisty/s4r-conda/ITKv4-build \
  -DUSE_SYSTEM_ITK:BOOL=ON

then I custom installed the required bits of ants that I just built. I copied and renamed the files using the file manager. Copy 'antsApplyTransforms', 'antsRegistration', 'antsSliceRegularizedRegistration', 'ComposeMultiTransform' to spinalcordtoolbox/bin and then rename to isct_*

running slicer

export SCT_PYTHON=/spare/hardisty/anaconda2
cd /spare/hardisty
./s4r-conda/Slicer-build/Slicer

Running testing within python interactor

import sys
sys.path.append('/spare/hardisty/git/spinalcordtoolbox/scripts/')
import sct_testing
myArguments = ['-d']
myArguments.append('0')
myArguments.append('-p')
myArguments.append('/spare/hardisty/anaconda2/sct_testing_data/data/')
sct_testing.main(myArguments)


I am having problems using the downloaded version of ssl, I am using the system one:

cmake ../Slicer \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/usr/lib/x86_64-linux-gnu/qt4/bin/qmake \
  -DPYTHON_EXECUTABLE:FILEPATH=/home/poquirion/neuropoly/conda_4_slicer_sct/bin/python \
  -DPYTHON_INCLUDE_DIR:PATH=/home/poquirion/neuropoly/conda_4_slicer_sct/include/python2.7 \
  -DPYTHON_LIBRARY:FILEPATH=/home/poquirion/neuropoly/conda_4_slicer_sct/lib/libpython2.7.so  \
  -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=1 \
  -DSlicer_USE_SYSTEM_CTKAPPLAUNCHER:BOOL=0 \
  -DSlicer_USE_SYSTEM_OpenSSL:BOOL=1 \
  -DSlicer_USE_SYSTEM_zlib:BOOL=0 \
  -DSlicer_USE_SYSTEM_python:BOOL=0 \
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=1 \
  -DSlicer_BUILD_CLI:BOOL=OFF \
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF

The numpy install reinstall problem with conda seems to b universal. There is a git issue about is on continuum, see here

I am also having problems with the downloaded version of SSL in slicer. Anything that uses HTTPS like downloading the data won't work for me. Does downloading the data for you work within the Slicer python interactor?

Slicer did not even compiled when I tried to use the compilation build ssl. It would only build with Slicer_USE_SYSTEM_NUMPY:BOOL=1

Aïe, Slicer is not happy!

./build_slicer/Slicer-build/Slicer
/home/poquirion/neuropoly/build_slicer/Slicer-build/bin/./SlicerApp-real: /home/poquirion/neuropoly/conda_4_slicer_sct/lib/libcrypto.so.1.0.0: no version information available (required by /home/poquirion/neuropoly/build_slicer/Slicer-build/bin/libRemoteIO.so)
/home/poquirion/neuropoly/build_slicer/Slicer-build/bin/./SlicerApp-real: /home/poquirion/neuropoly/conda_4_slicer_sct/lib/libssl.so.1.0.0: no version information available (required by /home/poquirion/neuropoly/build_slicer/Slicer-build/bin/libRemoteIO.so)
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
error: [/home/poquirion/neuropoly/build_slicer/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.

If I just run
/home/poquirion/neuropoly/build_slicer/Slicer-build/bin/./SlicerApp-real
it starts, but I guess I miss some configurations.

I suspect it has something to do with the version of qt. Do you know what version of qt is on your system? We have builds here of slicer with 4.8.7 and 4.8.6. It makes sense that slicer didn't build with the downloaded ssl given that qt must be built against the matching version of ssl. So its likely that the system qt is built against the system ssl and the downloaded version didn't match system.

I would try building qt against the matching version of ssl and then rebuilding slicer. Here is how I built qt and ssl. One of the core developers of Slicer has a easy qt build script txt file here. Here is the version I used for ubuntu, buildQt.txt

On the other hand did the tests run?

I am going to try to compile slicer directly with the ssl and qt that comes with the sct after its been installed. I had an hybrid setup and slicer did not like it.

If it work I'll go the other way around and install slicer first, since the goal is to have slicer eat up sct, not the other way around.

I was able to build a "slicercordtoolbox" at last. It still has some problèmes. On of them is that conda comes with openssl and it cannot be (easily) removed from it. On the other side, there is no procedure in the slicer cmake config to use an ssl lib that is not it the default location (/usr/lib, /usr/local/lib, etc) or download from the internet.

We would need to force cmake not to try to find the package somewhere else when we explicitly tell it where to find ssl via -D-OPENSSL_SSL_LIBRARY:FILEPATH=/my/conda/path input options.

I see so if I understand correctly the thing to investigate is pointing Slicer and probably qt towards Conda's ssl, I'll see what I can figure out in Slicer's Superbuild.

@mrhardisty: exactly

Also there is a qt that comes with conda. I Slicer compiles with it but was not able to redirect the right ssl librairie

Just an update really: It seems that slicer must either use the system ssl or download one. I am trying to build with a version of ssl that matches the one from anaconda. I edited the external file in Slicer's superbuild to allow the more up to date version of ssl used by anaconda. Hopefully this will fix the ssl problem.

@poquirion I successfully got Slicer to build using anaconda's qt and the matching ssl. I ended up having Slicer download the matching ssl version. That seemed easier than pointing slicer at anaconda's ssl. Downloading data now works within sct_testing! I forked slicer (https://github.com/mrhardisty/Slicer/tree/SCT_integration) to introduce this change and facilitate sharing, note that it is in a branch SCT_integration. FYI the only change was in: https://github.com/mrhardisty/Slicer/blob/99056be1e54600d0ee284f188616f09de5b29088/SuperBuild/External_OpenSSL.cmake
Further you need to specificy -DOPENSSL_DOWNLOAD_VERSION:STRING=1.0.2h to force slicer to download the matching version.

1.02h was the version of ssl that was in my anaconda. It might be worth checking your open ssl version in anaconda with soemthing like:

./anaconda2/bin/ipython

In Python:

import ssl
ssl.OPENSSL_VERSION

Here is the cmake command i used:

cmake /spare/hardisty/git/Slicer \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/spare/hardisty/anaconda2/pkgs/qt-4.8.7-3/bin/qmake \
  -DPYTHON_EXECUTABLE:FILEPATH=/spare/hardisty/anaconda2/bin/python \
  -DPYTHON_INCLUDE_DIR:PATH=/spare/hardisty/anaconda2/include/python2.7 \
  -DPYTHON_LIBRARY:FILEPATH=/spare/hardisty/anaconda2/lib/libpython2.7.so  \
  -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=1 \
  -DOPENSSL_DOWNLOAD_VERSION:STRING=1.0.2h \
  -DSlicer_USE_SYSTEM_CTKAPPLAUNCHER:BOOL=0 \
  -DSlicer_USE_SYSTEM_OpenSSL:BOOL=0 \
  -DSlicer_USE_SYSTEM_zlib:BOOL=0 \
  -DSlicer_USE_SYSTEM_python:BOOL=0 \
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=1 \
  -DSlicer_BUILD_CLI:BOOL=OFF \
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF

I pulled your repo and when on the SCT_integration branch, but I am getting a strange error running cmake:

cmake ../Slicer \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/poquirion/neuropoly/conda_4_slicer_sct/pkgs/qt-4.8.7-4/bin/qmake \
  -DPYTHON_EXECUTABLE:FILEPATH=/home/poquirion/neuropoly/conda_4_slicer_sct/bin/python \
  -DPYTHON_INCLUDE_DIR:PATH=/home/poquirion/neuropoly/conda_4_slicer_sct/include/python2.7 \
  -DPYTHON_LIBRARY:FILEPATH=/home/poquirion/neuropoly/conda_4_slicer_sct/lib/libpython2.7.so  \
  -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=1 \
  -DOPENSSL_DOWNLOAD_VERSION:STRING=1.0.2h \
  -DSlicer_USE_SYSTEM_CTKAPPLAUNCHER:BOOL=0 \
  -DSlicer_USE_SYSTEM_OpenSSL:BOOL=0 \
  -DSlicer_USE_SYSTEM_zlib:BOOL=0 \
  -DSlicer_USE_SYSTEM_python:BOOL=0 \
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=1 \
  -DSlicer_BUILD_CLI:BOOL=OFF \
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF

[...]

Could NOT find Qt4 (missing:  QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_UIC_EXECUTABLE) (found version "4.8.7")
CMake Error at CMake/SlicerBlockFindQtAndCheckVersion.cmake:29 (message):
  error: Qt 4.7.4 was not found on your system.You probably need to set the
  QT_QMAKE_EXECUTABLE variable.
Call Stack (most recent call first):
  CMake/SlicerBlockFindQtAndCheckVersion.cmake:88 (__SlicerBlockFindQtAndCheckVersion_find_qt)
  CMakeLists.txt:610 (include)

I have the same openssl 1.02h on anaconda, but qt 4.8.7.4

@poquirion Looking at the cmake command I am a little confused as to your directory structure. I would suggest 2 things to try: 1) verifying directory structure with cmake variables, and 2) making in a new build tree.
1) I think the error may have something to do with the directory structure and what is defined for cmake. Here is the structure that I am using:

Location of anaconda:
/spare/hardisty/anaconda2

Location of slicer build tree:
/spare/hardisty/s4r-qtSslConda

The naming used in your cmake command suggests that both the slicer build and anaconda locations are the same. Is only anaconda located at: "/home/poquirion/neuropoly/conda_4_slicer_sct"? This name sounds like it is the build tree rather than anaconda. Please confirm. If they are both in the same directory I would try separating them and try again.

2) Was this an existing build tree? I would suggest starting from an empty directory. Then call cmake and make in the new directory. If this was an existing build there may have been exisiting cmake variables or built objects that cmake detected. It is often hard to anticipate how cmake configuration will proceed if a big cmake level change are made particularly with slicer's superbuild structure. So it is often best to start fresh.

Ok, I got it:

I was using the wrong qmake path. We cannot use /path/to/condapython/pkgs/qt-4.8.7-4/bin/qmake, only /path/to/condapython/bin/qmake. The first one qt.conf file is not properly configured.

ouf!

cmake ../Slicer \
  -DCMAKE_BUILD_TYPE:STRING=Release \
  -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/poquirion/neuropoly/slicer_cordtoolbox/python/bin/qmake \
  -DPYTHON_EXECUTABLE:FILEPATH=/home/poquirion/neuropoly/slicer_cordtoolbox/python/bin/python \
  -DPYTHON_INCLUDE_DIR:PATH=/home/poquirion/neuropoly/slicer_cordtoolbox/python/include/python2.7 \
  -DPYTHON_LIBRARY:FILEPATH=/home/poquirion/neuropoly/slicer_cordtoolbox/python/lib/libpython2.7.so  \
  -DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=1 \
  -DOPENSSL_DOWNLOAD_VERSION:STRING=1.0.2h \
  -DSlicer_USE_SYSTEM_CTKAPPLAUNCHER:BOOL=0 \
  -DSlicer_USE_SYSTEM_OpenSSL:BOOL=0 \
  -DSlicer_USE_SYSTEM_zlib:BOOL=0 \
  -DSlicer_USE_SYSTEM_python:BOOL=0 \
  -DSlicer_USE_SYSTEM_NUMPY:BOOL=1 \
  -DSlicer_BUILD_CLI:BOOL=OFF \
  -DSlicer_USE_PYTHONQT_WITH_TCL:BOOL=OFF

worked like a charm.

Also, cmake let you use a relative path in for the package, so no problem with cmake ../Slicer [...] but I did test and retested it.

It almost worked like a charm...

I had a couple problems still with ssl:
I have version 1.0.2j and needed to add it with the md5 for download in Slicer/theSuperBuild/External_OpenSSL.cmake file , then I needed to install curl in conda:

./slicer_cordtoolbox/python/conda install curl

But some libraries still link to the locals libcurl.so.4 wich is different from the one in conda and I can't still make the whole thing on my ubuntu 16.04 platform.

For good mesure I checked the cmake configuration and there was still one library that was loaded from the system that could be loaded form the conda directly. I added the following option to cmake:

-DFONTCONFIG_LIBRARY:FILEPATH=/home/poquirion/neuropoly/slicer_cordtoolbox/python/lib/libfontconfig.so\

But it still crash with the following:

Determining if the CXX compiler accepts the flag -features=no%anachronisms passed with the following output:
Change Dir: /home/poquirion/neuropoly/bs/Slicer-build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_30e00/fast"
make[3]: Entering directory '/home/poquirion/neuropoly/bs/Slicer-build/CMakeFiles/CMakeTmp'
/usr/bin/make -f CMakeFiles/cmTC_30e00.dir/build.make CMakeFiles/cmTC_30e00.dir/build
make[4]: Entering directory '/home/poquirion/neuropoly/bs/Slicer-build/CMakeFiles/CMakeTmp'
/usr/bin/cmake: /home/poquirion/neuropoly/slicer_cordtoolbox/python/bin/../lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /home/poquirion/neuropoly/slicer_cordtoolbox/python/bin/../lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /home/poquirion/neuropoly/slicer_cordtoolbox/python/bin/../lib/libssl.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
/usr/bin/cmake: /home/poquirion/neuropoly/slicer_cordtoolbox/python/bin/../lib/libcrypto.so.1.0.0: no version information available (required by /usr/lib/x86_64-linux-gnu/libcurl.so.4)
Building CXX object CMakeFiles/cmTC_30e00.dir/src.cxx.o
/usr/bin/c++     -features=no%anachronisms   -o CMakeFiles/cmTC_30e00.dir/src.cxx.o -c /home/poquirion/neuropoly/bs/Slicer-build/CMakeFiles/CMakeTmp/src.cxx
c++: error: unrecognized command line option ‘-features=no%anachronisms’
CMakeFiles/cmTC_30e00.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_30e00.dir/src.cxx.o' failed
make[4]: *** [CMakeFiles/cmTC_30e00.dir/src.cxx.o] Error 1
make[4]: Leaving directory '/home/poquirion/neuropoly/bs/Slicer-build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_30e00/fast' failed
make[3]: *** [cmTC_30e00/fast] Error 2
make[3]: Leaving directory '/home/poquirion/neuropoly/bs/Slicer-build/CMakeFiles/CMakeTmp'

Source file was:
int main() { return 0;}

All this fuzz could also be linked to the fact that sct uses miniconda and not anaconda... Will redo build using the full fledged anaconda

A few comments.

It is entirely possible that this would be easier with miniconda. I will give it a try on 16.04 and see what happens.

My working build is on 14.04. I interacted with another slicerite on the developer forum that was having trouble in 16.04 with the anaconda-slicer build. I believe they switched to 14.04, it would be nice to have it working in 16.04 moving forward.

I had some issues when running SCT without having anaconda in my path. It seemed to call on the system python which did not have all the dependencies This didn't occur in the testing but when segmenting and registering a data set. Yet another reason to try and match the python environments as closely as possible.

I'm back! (I had a metal plate removde from a shoulder and It sucked energy and dev time...)

It seems that matplotlib is also problematic since it wants qt5 in conda. It seems that slicer can be build against qt5. I will try that...

not the only one with problems its seems:
https://github.com/conda-forge/matplotlib-feedstock/issues/59

I am reverting back to matplotlib 1.5.1, the last one that uses qt4 and make sure that I have the same version of qt in the conda than what I have on my machine. 4.8.6, also force that version in the Slicer build.
anaconda/mkspecs/default/ is missing in conda, make soft link: ln -s linux-g++-64 default

Victory!

Checking test_sct_apply_transfo.....................[FAIL]
Checking test_sct_compute_mtr.......................[OK]
Checking test_sct_concat_transfo....................[OK]
Checking test_sct_convert...........................[OK]
Checking test_sct_create_mask.......................[FAIL]
Checking test_sct_crop_image........................[OK]
Checking test_sct_dmri_compute_dti..................[OK]
Checking test_sct_dmri_create_noisemask.............[OK]
Checking test_sct_dmri_get_bvalue...................[OK]
Checking test_sct_dmri_transpose_bvecs..............[OK]
Checking test_sct_dmri_moco.........................[FAIL]
Checking test_sct_dmri_separate_b0_and_dwi..........[OK]
Checking test_sct_documentation.....................[OK]
Checking test_sct_extract_metric....................[OK]
Checking test_sct_fmri_compute_tsnr.................[OK]
Checking test_sct_fmri_moco.........................[FAIL]
Checking test_sct_image.............................[OK]
Checking test_sct_label_utils.......................[OK]
Checking test_sct_label_vertebrae...................[FAIL]
Checking test_sct_maths.............................[OK]
Checking test_sct_process_segmentation..............[OK]

It seems that vtk can also causes problems, of the sct/conda and slicer version are different.

I've compiled ants against Slicer ITK and It solved many problems.
test_sct_create_mask still fails with:

Checking test_sct_create_mask.......................[FAIL]
sct_create_mask -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_label_utils.py:163: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  image_output.data[coord.x, coord.y, coord.z] = coord.value

Create temporary folder...

Create temporary folder...
mkdir tmp.161107215201_792661/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -o tmp.161107215201_792661/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

Label #0: 15,17,0 --> 1
Label #1: 15,17,1 --> 1
Label #2: 15,17,2 --> 1
Label #3: 15,17,3 --> 1
Label #4: 15,17,4 --> 1
WARNING: File line.nii already exists. Deleting it.

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a 
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without 
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.                  

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as: 
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the 
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension. The suffix _DIM+NUMBER will 
                              be added to the intput file name.
 -concat {x,y,z,t}            Concatenate data along the specified dimension
 -type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type              

Orientation operations: 
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
 -mcs                         Multi-component split: Split ITK warping field into three separate 
                              displacement fields. The suffix _X, _Y and _Z will be added to the 
                              input file name.
 -omc                         Multi-component merge: Merge inputted images into one multi-component 
                              image. Requires several inputs.

Warping field operations:
 -display-warp                Create a grid and deform it using provided warping field.

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 417, in <module>
    main()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 96, in main
    create_mask()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 256, in create_mask
    '-setorient', str(orientation_input)])
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
    arguments = parser.parse(args)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
    dictionary[arg] = self.options[arg].check_integrity(param)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
    self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
    self.generate(error)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
    raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -p point,/slice_sct/sct_testing_data/mt/mt1_point.nii.gz -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -p point,/slice_sct/sct_testing_data/mt/mt1_point.nii.gz -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_label_utils.py:163: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  image_output.data[coord.x, coord.y, coord.z] = coord.value

Create temporary folder...

Create temporary folder...
mkdir tmp.161107215202_81843/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -o tmp.161107215202_81843/data.nii
sct_convert -i /slice_sct/sct_testing_data/mt/mt1_point.nii.gz -o tmp.161107215202_81843/point.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
point.nii.gz
WARNING: File point_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Extract coordinate of point...
sct_label_utils -i point_RPI.nii.gz -display

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

Label #0: 20,19,0 --> 1
Label #1: 20,19,1 --> 1
Label #2: 20,19,2 --> 1
Label #3: 20,19,3 --> 1
Label #4: 20,19,4 --> 1
WARNING: File line.nii already exists. Deleting it.

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a 
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without 
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.                  

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as: 
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the 
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension. The suffix _DIM+NUMBER will 
                              be added to the intput file name.
 -concat {x,y,z,t}            Concatenate data along the specified dimension
 -type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type              

Orientation operations: 
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
 -mcs                         Multi-component split: Split ITK warping field into three separate 
                              displacement fields. The suffix _X, _Y and _Z will be added to the 
                              input file name.
 -omc                         Multi-component merge: Merge inputted images into one multi-component 
                              image. Requires several inputs.

Warping field operations:
 -display-warp                Create a grid and deform it using provided warping field.

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 417, in <module>
    main()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 96, in main
    create_mask()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 256, in create_mask
    '-setorient', str(orientation_input)])
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
    arguments = parser.parse(args)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
    dictionary[arg] = self.options[arg].check_integrity(param)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
    self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
    self.generate(error)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
    raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -p center -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -p center -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_label_utils.py:163: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  image_output.data[coord.x, coord.y, coord.z] = coord.value

Create temporary folder...

Create temporary folder...
mkdir tmp.161107215204_268053/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -o tmp.161107215204_268053/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

Label #0: 20,20,0 --> 1
Label #1: 20,20,1 --> 1
Label #2: 20,20,2 --> 1
Label #3: 20,20,3 --> 1
Label #4: 20,20,4 --> 1
WARNING: File line.nii already exists. Deleting it.

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a 
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without 
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.                  

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as: 
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the 
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension. The suffix _DIM+NUMBER will 
                              be added to the intput file name.
 -concat {x,y,z,t}            Concatenate data along the specified dimension
 -type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type              

Orientation operations: 
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
 -mcs                         Multi-component split: Split ITK warping field into three separate 
                              displacement fields. The suffix _X, _Y and _Z will be added to the 
                              input file name.
 -omc                         Multi-component merge: Merge inputted images into one multi-component 
                              image. Requires several inputs.

Warping field operations:
 -display-warp                Create a grid and deform it using provided warping field.

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 417, in <module>
    main()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 96, in main
    create_mask()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 256, in create_mask
    '-setorient', str(orientation_input)])
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
    arguments = parser.parse(args)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
    dictionary[arg] = self.options[arg].check_integrity(param)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
    self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
    self.generate(error)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
    raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -p centerline,/slice_sct/sct_testing_data/mt/mt1_seg.nii.gz -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -p centerline,/slice_sct/sct_testing_data/mt/mt1_seg.nii.gz -size 10 -r 0
  OK: /slice_sct/sct_testing_data/mt/mt1_seg.nii.gz

Create temporary folder...

Create temporary folder...
mkdir tmp.161107215205_463504/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /slice_sct/sct_testing_data/mt/mt1.nii.gz -o tmp.161107215205_463504/data.nii
sct_convert -i /slice_sct/sct_testing_data/mt/mt1_seg.nii.gz -o tmp.161107215205_463504/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
  40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a 
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without 
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.                  

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as: 
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the 
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension. The suffix _DIM+NUMBER will 
                              be added to the intput file name.
 -concat {x,y,z,t}            Concatenate data along the specified dimension
 -type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type              

Orientation operations: 
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
 -mcs                         Multi-component split: Split ITK warping field into three separate 
                              displacement fields. The suffix _X, _Y and _Z will be added to the 
                              input file name.
 -omc                         Multi-component merge: Merge inputted images into one multi-component 
                              image. Requires several inputs.

Warping field operations:
 -display-warp                Create a grid and deform it using provided warping field.

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 417, in <module>
    main()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 96, in main
    create_mask()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 256, in create_mask
    '-setorient', str(orientation_input)])
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
    arguments = parser.parse(args)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
    dictionary[arg] = self.options[arg].check_integrity(param)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
    self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
    self.generate(error)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
    raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /slice_sct/sct_testing_data/dmri/dmri.nii.gz -p center -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py -i /slice_sct/sct_testing_data/dmri/dmri.nii.gz -p center -size 10 -r 0
/slice_sct/package/spinalcordtoolbox/scripts/sct_label_utils.py:163: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
  image_output.data[coord.x, coord.y, coord.z] = coord.value

Create temporary folder...

Create temporary folder...
mkdir tmp.161107215205_129458/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /slice_sct/sct_testing_data/dmri/dmri.nii.gz -o tmp.161107215205_129458/data.nii

Reorient to RPI...
data.nii
rm -rf tmp.161107215206_962268/

Get dimensions of data...
  40 x 42 x 5 x 7
WARNING in sct_create_mask.py: Input image is 4d but output mask will 3D.
WARNING: File data_RPI.nii already exists. Deleting it.

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

Label #0: 20,21,0 --> 1
Label #1: 20,21,1 --> 1
Label #2: 20,21,2 --> 1
Label #3: 20,21,3 --> 1
Label #4: 20,21,4 --> 1
WARNING: File line.nii already exists. Deleting it.

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a 
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i <list of: file>

MANDATORY ARGUMENTS
 -i <list of: file>           Input file(s). If several inputs: separate them by a coma without 
                              white space.


OPTIONAL ARGUMENTS
 -o <file_output>             Output file.                  

Basic image operations:
 -pad <str>                   Pad 3d image. Specify padding as: "x,y,z" (in voxel)
 -pad-asym <str>              Pad 3d image with asymmetric padding. Specify padding as: 
                              "x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
 -copy-header <file>          Copy the header of the input image (specified in -i) to the 
                              destination image (specified here)
 -split {x,y,z,t}             Split data along the specified dimension. The suffix _DIM+NUMBER will 
                              be added to the intput file name.
 -concat {x,y,z,t}            Concatenate data along the specified dimension
 -type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type              

Orientation operations: 
 -getorient                   Get orientation of the input image
 -setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
 -setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
 -mcs                         Multi-component split: Split ITK warping field into three separate 
                              displacement fields. The suffix _X, _Y and _Z will be added to the 
                              input file name.
 -omc                         Multi-component merge: Merge inputted images into one multi-component 
                              image. Requires several inputs.

Warping field operations:
 -display-warp                Create a grid and deform it using provided warping field.

Misc
 -v {0,1,2}                   Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 417, in <module>
    main()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 96, in main
    create_mask()
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_create_mask.py", line 256, in create_mask
    '-setorient', str(orientation_input)])
  File "/slice_sct/package/spinalcordtoolbox/scripts/sct_image.py", line 128, in main
    arguments = parser.parse(args)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 363, in parse
    dictionary[arg] = self.options[arg].check_integrity(param)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 152, in check_integrity
    self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 567, in error
    self.generate(error)
  File "/slice_sct/package/spinalcordtoolbox/scripts/msct_parser.py", line 560, in generate
    raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.

I'm glad to hear that your feeling better. I hope your recovery continues
well.

Hmm... I've been having a lot more trouble in 16.04. Slicer is not happy. I
also had to downgraded qt to 4 in anaconda and had to install the gcc 4
tools. All tests passed in anaconda but I haven't been able to get anything
to run in slicer. I'll report more soon hopefully.

On Nov 7, 2016 4:13 PM, "P-O Quirion" [email protected] wrote:

It seems that vtk also causes problems, there is two version, one in sct
and one in slicer...


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/neuropoly/spinalcordtoolbox/issues/985#issuecomment-258964089,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFF9ULBL_6It2tbq29cBTWWAugIPoHC4ks5q75RPgaJpZM4Jyzyw
.

I've determined that for some reason nibabel is not importing in the slicer python interactor. Importing nibabel actually crashes the interactor so there is no stack trace which makes finding the problem more challenging. Do you have any thoughts?

I also had to build ANTs against the same ITK to prevent the iofactory collisions. It looks like you are getting the same error that I got related to -setorient

It seems that h5py was incompatible with the slicer interactor and nibabel was importing it if available. Removing H5py from python using pip fixed the problem.

After rebuilding the sct specific binaries using slicer's vtk and itk in the dev directory as you suggested most of the tests are passing. In comparison to your list above, building the isct binaries against slicer's itk and vtk fixed, we now have:
Checking test_sct_apply_transfo.....................[OK]
...
Checking test_sct_dmri_moco.........................[OK]
...
Checking test_sct_fmri_moco.........................[OK]
...
Checking test_sct_label_vertebrae...................[OK]

I had to make a few changes in the cpp and cmakelist files to make it compatible with VTKv7. I think we are nearly at the same point in the tests. This is entirely in Ubuntu 16.04.

it did not fix:
Checking test_sct_create_mask.......................[FAIL]

The remaining errors for me and discussed by you above related to test_sct_create_mask look like they are related to parameters passed to setorient within msct_parser.py from sct_image.py

SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.

Here is the entirety sct_testing:

Checking test_sct_apply_transfo.....................[OK]
Checking test_sct_compute_mtr.......................[OK]
Checking test_sct_concat_transfo....................[OK]
Checking test_sct_convert...........................[OK]
Checking test_sct_create_mask.......................[FAIL]

sct_create_mask -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0

Spinal Cord Toolbox (versdmri_mocoion dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_create_mask.py -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -p coord,15x17 -size 10 -r 0
/spare/hardisty/git/sct/scripts/sct_label_utils.py:163: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
image_output.data[coord.x, coord.y, coord.z] = coord.value

Create temporary folder...

Create temporary folder...
mkdir tmp.161111103121_169124/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -o tmp.161111103121_169124/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

Label #0: 15,17,0 --> 1
Label #1: 15,17,1 --> 1
Label #2: 15,17,2 --> 1
Label #3: 15,17,3 --> 1
Label #4: 15,17,4 --> 1
WARNING: File line.nii already exists. Deleting it.

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 417, in
main()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 96, in main
create_mask()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 256, in create_mask
'-setorient', str(orientation_input)])
File "/spare/hardisty/git/sct/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)

SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -p point,/spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_point.nii.gz -size 10 -r 0

Spinal Cord Toolbox (version dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_create_mask.py -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -p point,/spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_point.nii.gz -size 10 -r 0
/spare/hardisty/git/sct/scripts/sct_label_utils.py:163: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
image_output.data[coord.x, coord.y, coord.z] = coord.value

Create temporary folder...

Create temporary folder...
mkdir tmp.161111103122_821060/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -o tmp.161111103122_821060/data.nii
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_point.nii.gz -o tmp.161111103122_821060/point.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
point.nii.gz
WARNING: File point_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Extract coordinate of point...
sct_label_utils -i point_RPI.nii.gz -display

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

Label #0: 20,19,0 --> 1
Label #1: 20,19,1 --> 1
Label #2: 20,19,2 --> 1
Label #3: 20,19,3 --> 1
Label #4: 20,19,4 --> 1
WARNING: File line.nii already exists. Deleting it.

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 417, in
main()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 96, in main
create_mask()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 256, in create_mask
'-setorient', str(orientation_input)])
File "/spare/hardisty/git/sct/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)

SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -p center -size 10 -r 0

Spinal Cord Toolbox (version dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_create_mask.py -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -p center -size 10 -r 0
/spare/hardisty/git/sct/scripts/sct_label_utils.py:163: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
image_output.data[coord.x, coord.y, coord.z] = coord.value

Create temporary folder...

Create temporary folder...
mkdir tmp.161111103125_412509/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -o tmp.161111103125_412509/data.nii

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

Label #0: 20,20,0 --> 1
Label #1: 20,20,1 --> 1
Label #2: 20,20,2 --> 1
Label #3: 20,20,3 --> 1
Label #4: 20,20,4 --> 1
WARNING: File line.nii already exists. Deleting it.

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 417, in
main()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 96, in main
create_mask()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 256, in create_mask
'-setorient', str(orientation_input)])
File "/spare/hardisty/git/sct/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)

SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -p centerline,/spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_seg.nii.gz -size 10 -r 0

Spinal Cord Toolbox (version dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_create_mask.py -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -p centerline,/spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_seg.nii.gz -size 10 -r 0
OK: /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_seg.nii.gz

Create temporary folder...

Create temporary folder...
mkdir tmp.161111103127_232042/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1.nii.gz -o tmp.161111103127_232042/data.nii
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_seg.nii.gz -o tmp.161111103127_232042/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 417, in
main()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 96, in main
create_mask()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 256, in create_mask
'-setorient', str(orientation_input)])
File "/spare/hardisty/git/sct/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)

SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.sct_create_mask -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/dmri/dmri.nii.gz -p center -size 10 -r 0

Spinal Cord Toolbox (version dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_create_mask.py -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/dmri/dmri.nii.gz -p center -size 10 -r 0
/spare/hardisty/git/sct/scripts/sct_label_utils.py:163: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future
image_output.data[coord.x, coord.y, coord.z] = coord.value

Create temporary folder...

Create temporary folder...
mkdir tmp.161111103129_811999/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/dmri/dmri.nii.gz -o tmp.161111103129_811999/data.nii

Reorient to RPI...
data.nii
rm -rf tmp.161111103129_693273/

Get dimensions of data...
40 x 42 x 5 x 7
WARNING in sct_create_mask.py: Input image is 4d but output mask will 3D.
WARNING: File data_RPI.nii already exists. Deleting it.

Create line...
cp data_RPI.nii line.nii
WARNING: File line.nii already exists. Deleting it.

Done! To view results, type:
fslview line.nii &

Label #0: 20,21,0 --> 1
Label #1: 20,21,1 --> 1
Label #2: 20,21,2 --> 1
Label #3: 20,21,3 --> 1
Label #4: 20,21,4 --> 1
WARNING: File line.nii already exists. Deleting it.

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 417, in
main()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 96, in main
create_mask()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 256, in create_mask
'-setorient', str(orientation_input)])
File "/spare/hardisty/git/sct/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Checking test_sct_crop_image........................[OK]
Checking test_sct_dmri_compute_dti..................[OK]
Checking test_sct_dmri_create_noisemask.............[OK]
Checking test_sct_dmri_get_bvalue...................[OK]
Checking test_sct_dmri_transpose_bvecs..............[OK]
Checking test_sct_dmri_moco.........................[OK]
Checking test_sct_dmri_separate_b0_and_dwi..........[OK]
Checking test_sct_documentation.....................[OK]
Checking test_sct_extract_metric....................[OK]
Checking test_sct_fmri_compute_tsnr.................[OK]
Checking test_sct_fmri_moco.........................[OK]
Checking test_sct_image.............................[OK]
Checking test_sct_label_utils.......................[OK]
Checking test_sct_label_vertebrae...................[OK]
Checking test_sct_maths.............................[OK]
Checking test_sct_process_segmentation..............[OK]
Checking test_sct_propseg...........................[OK]
Checking test_sct_register_graymatter...............--
Spinal Cord Toolbox (version dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_register_graymatter.py -qc 0 -manual-gm /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_gmseg_goldstandard.nii.gz -apply-warp 0 -gm /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_gmseg.nii.gz -t /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/label/ -w /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/warp_template2mt.nii.gz -v 1 -r 1 -sc /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_seg.nii.gz -wm /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_wmseg.nii.gz -ofolder sct_register_graymattersct_testing_data_161111103529_808361/
Check folder existence...
Check folder existence...
OK: /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/label/

Create temporary folder...
mkdir tmp.161111103530_909462/
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/mt1_gmseg.nii.gz -o tmp.161111103530_909462/mt1_gmseg.nii.gz
sct_convert -i /spare/hardisty/git/crossPlatformSCT/build/sct_testing_data/mt/warp_template2mt.nii.gz -o tmp.161111103530_909462/warp_template2mt.nii.gz
sct_create_mask -i multilabel_automatic_seg.nii.gz -p centerline,multilabel_automatic_seg.nii.gz -f box -size 26 -o square_mask.nii.gz
/spare/hardisty/git/sct/scripts/sct_create_mask.py -i multilabel_automatic_seg.nii.gz -p centerline,multilabel_automatic_seg.nii.gz -f box -size 26 -o square_mask.nii.gz
OK: multilabel_automatic_seg.nii.gz

Create temporary folder...

Create temporary folder...
mkdir tmp.161111103531_491016/

Check orientation...
.. RPI
vtkDebugLeaks has found no leaks.
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.161111103531_491016/data.nii
sct_convert -i multilabel_automatic_seg.nii.gz -o tmp.161111103531_491016/centerline.nii.gz

Reorient to RPI...
data.nii
WARNING: File data_RPI.nii already exists. Deleting it.
centerline.nii.gz
WARNING: File centerline_RPI.nii.gz already exists. Deleting it.

Get dimensions of data...
40 x 40 x 5 x 1

Create mask...
-setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.
Aborted...

DESCRIPTION
Perform manipulations on images (e.g., pad, change space, split along dimension). Inputs can be a
number, a 4d image, or several 3d images separated with ","

USAGE
sct_image.pyc -i

MANDATORY ARGUMENTS
-i Input file(s). If several inputs: separate them by a coma without
white space.

OPTIONAL ARGUMENTS
-o Output file.

Basic image operations:
-pad Pad 3d image. Specify padding as: "x,y,z" (in voxel)
-pad-asym Pad 3d image with asymmetric padding. Specify padding as:
"x_i,x_f,y_i,y_f,z_i,z_f" (in voxel)
-copy-header Copy the header of the input image (specified in -i) to the
destination image (specified here)
-split {x,y,z,t} Split data along the specified dimension. The suffix _DIM+NUMBER will
be added to the intput file name.
-concat {x,y,z,t} Concatenate data along the specified dimension
-type {uint8,int16,int32,float32,complex64,float64,int8,uint16,uint32,int64,uint64}Change file type

Orientation operations:
-getorient Get orientation of the input image
-setorient {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image
-setorient-data {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL}Set orientation of the input image's data. Use with care !ro

Multi-component operations on ITK composite warping fields:
-mcs Multi-component split: Split ITK warping field into three separate
displacement fields. The suffix _X, _Y and _Z will be added to the
input file name.
-omc Multi-component merge: Merge inputted images into one multi-component
image. Requires several inputs.

Warping field operations:
-display-warp Create a grid and deform it using provided warping field.

Misc
-v {0,1,2} Verbose. 0: nothing. 1: basic. 2: extended. Default value = 1

Traceback (most recent call last):
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 417, in
main()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 96, in main
create_mask()
File "/spare/hardisty/git/sct/scripts/sct_create_mask.py", line 256, in create_mask
'-setorient', str(orientation_input)])
File "/spare/hardisty/git/sct/scripts/sct_image.py", line 128, in main
arguments = parser.parse(args)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 363, in parse
dictionary[arg] = self.options[arg].check_integrity(param)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 152, in check_integrity
self.parser.usage.error(self.name + " only takes " + self.parser.usage.print_list_with_brackets(self.example) + " as potential arguments.")
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 567, in error
self.generate(error)
File "/spare/hardisty/git/sct/scripts/msct_parser.py", line 560, in generate
raise SyntaxError(error)
SyntaxError: -setorient only takes {RIP,LIP,RSP,LSP,RIA,LIA,RSA,LSA,IRP,ILP,SRP,SLP,IRA,ILA,SRA,SLA,RPI,LPI,RAI,LAI,RPS,LPS,RAS,LAS,PRI,PLI,ARI,ALI,PRS,PLS,ARS,ALS,IPR,SPR,IAR,SAR,IPL,SPL,IAL,SAL,PIR,PSR,AIR,ASR,PIL,PSL,AIL,ASL} as potential arguments.

/spare/hardisty/git/sct/scripts/sct_utils.pyNone

/spare/hardisty/git/sct/scripts/sct_utils.pyNone

@mrhardisty, I'm running test in Slicer, but I have to restart it for every sct_* call that fails. Am I missing something?

I've had the same issue. No commands will run successfully in the interactor after a failed sct test.

Perhaps consider running a python test script from the command line when calling slicer as a work around, while not ideal it may allow faster reloading of sct testing. Something like: ~/s4r-condaR/Slicer-build/Slicer --no-main-window --show-python-interactor --python-script mySctSlicerTestingScript.py

Thanks for the Slicer debugging trick!

I am getting there, look at the value for orientation_input:
'RPI\nvtkDebugLeaks has found no leaks.'

There is something going on here with output parsing.

"vtkDebugLeaks has found no leaks" it printed in many places! It brake many of the sct output parser when it does system calls. I will patch those that are failling the test in priority. Some of the calls are made to c++ binaries, not just python sct function.

@poquirion I think it makes the most sense to suppress the message from vtkDebugLeaks. vtkDebugLeaks can be suppressed by setting the cmake variable Slicer_USE_VTK_DEBUG_LEAKS to OFF. I did this using cmake-gui then hitting configure and generate. I'm currently rebuilding with the flag changed. I'll report back on how extensively this cleans up the messages generated. But I really don't think that it is necessary to code around these errors, All of the binaries distributed on Slicer.org don't generate these messages from vtkDebugLeaks.

//Enable VTKs Debug Leaks functionality in both VTK and Slicer.
Slicer_USE_VTK_DEBUG_LEAKS:BOOL=OFF

Sweet!! No Failed Tests(1 warning)! This is great.

I am still having the issue of the python interactor being non-responsive after running the tests...any thoughts on what's causing that

All I did was suppress the vtkDebugLeaks messages in cmake and build again as discussed above.

Checking test_sct_register_to_template..............[WARNING]

Checking test_sct_apply_transfo.....................[OK]
Checking test_sct_compute_mtr.......................[OK]
Checking test_sct_concat_transfo....................[OK]
Checking test_sct_convert...........................[OK]
Checking test_sct_create_mask.......................[OK]
Checking test_sct_crop_image........................[OK]
Checking test_sct_dmri_compute_dti..................[OK]
Checking test_sct_dmri_create_noisemask.............[OK]
Checking test_sct_dmri_get_bvalue...................[OK]
Checking test_sct_dmri_transpose_bvecs..............[OK]
Checking test_sct_dmri_moco.........................[OK]
Checking test_sct_dmri_separate_b0_and_dwi..........[OK]
Checking test_sct_documentation.....................[OK]
Checking test_sct_extract_metric....................[OK]
Checking test_sct_fmri_compute_tsnr.................[OK]
Checking test_sct_fmri_moco.........................[OK]
Checking test_sct_image.............................[OK]
Checking test_sct_label_utils.......................[OK]
Checking test_sct_label_vertebrae...................[OK]
Checking test_sct_maths.............................[OK]
Checking test_sct_process_segmentation..............[OK]
Checking test_sct_propseg...........................[OK]
Checking test_sct_register_graymatter...............[OK]
Checking test_sct_segment_graymatter................[OK]
Checking test_sct_register_multimodal...............[OK]
Checking test_sct_register_to_template..............[WARNING]

sct_register_to_template -c t2 -l /spare/hardisty/s4r-condaR/sct_testing_data/t2/labels.nii.gz -i /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2.nii.gz -t /spare/hardisty/s4r-condaR/sct_testing_data/template/ -v 1 -s /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2_seg.nii.gz -r 0 -param step=1,type=seg,algo=centermassrot,metric=MeanSquares:step=2,type=seg,algo=bsplinesyn,iter=5,metric=MeanSquares:step=3,iter=0 -ref template -ofolder sct_register_to_template_sct_testing_data_161117140245_568835/

Spinal Cord Toolbox (version dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_register_to_template.py -c t2 -l /spare/hardisty/s4r-condaR/sct_testing_data/t2/labels.nii.gz -i /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2.nii.gz -t /spare/hardisty/s4r-condaR/sct_testing_data/template/ -v 1 -s /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2_seg.nii.gz -r 0 -param step=1,type=seg,algo=centermassrot,metric=MeanSquares:step=2,type=seg,algo=bsplinesyn,iter=5,metric=MeanSquares:step=3,iter=0 -ref template -ofolder sct_register_to_template_sct_testing_data_161117140245_568835/
Check folder existence...
Check folder existence...

Check template files...
OK: /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_t2.nii.gz
OK: /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_levels.nii.gz
OK: /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_cord.nii.gz

Check parameters:
Data: /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2.nii.gz
Landmarks: /spare/hardisty/s4r-condaR/sct_testing_data/t2/labels.nii.gz
Segmentation: /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2_seg.nii.gz
Path template: /spare/hardisty/s4r-condaR/sct_testing_data/template/
Remove temp files: 0

Check if data, segmentation and landmarks are in the same space...

Check input labels...

Create temporary folder...
mkdir tmp.161117140246_625631/

Copying input data to tmp folder and convert to nii...
sct_convert -i /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2.nii.gz -o tmp.161117140246_625631/data.nii
sct_convert -i /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2_seg.nii.gz -o tmp.161117140246_625631/seg.nii.gz
sct_convert -i /spare/hardisty/s4r-condaR/sct_testing_data/t2/labels.nii.gz -o tmp.161117140246_625631/label.nii.gz
sct_convert -i /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_t2.nii.gz -o tmp.161117140246_625631/template.nii
sct_convert -i /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_cord.nii.gz -o tmp.161117140246_625631/template_seg.nii.gz

Generate labels from template vertebral labeling
sct_label_utils -i /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_levels.nii.gz -vert-body 0 -o template_label.nii.gz

Check if provided labels are available in the template

Binarize segmentation
sct_maths -i seg.nii.gz -bin 0.5 -o seg.nii.gz

Resample data to 1mm isotropic...
sct_resample -i data.nii -mm 1.0x1.0x1.0 -x linear -o data_1mm.nii
sct_resample -i seg.nii.gz -mm 1.0x1.0x1.0 -x linear -o seg_1mm.nii.gz
Position=(31,44,26) -- Value= 3
Useful notation:
31,44,26,3
Position=(32,9,26) -- Value= 5
Useful notation:
31,44,26,3:32,9,26,5
sct_label_utils -i data_1mm.nii -create 31,44,26,3:32,9,26,5 -v 1 -o label_1mm.nii.gz

Change orientation of input images to RPI...
sct_image -i data_1mm.nii -setorient RPI -o data_1mm_rpi.nii
sct_image -i seg_1mm.nii.gz -setorient RPI -o seg_1mm_rpi.nii.gz
sct_image -i label_1mm.nii.gz -setorient RPI -o label_1mm_rpi.nii.gz
sct_crop_image -i seg_1mm_rpi.nii.gz -o seg_1mm_rpi_crop.nii.gz -dim 2 -bzmax

Straighten the spinal cord using centerline/segmentation...
sct_straighten_spinalcord -i seg_1mm_rpi_crop.nii.gz -s seg_1mm_rpi_crop.nii.gz -o seg_1mm_rpi_crop_straight.nii.gz -qc 0 -r 0 -v 1
sct_concat_transfo -w warp_straight2curve.nii.gz -d data_1mm_rpi.nii -o warp_straight2curve.nii.gz

Remove unused label on template. Keep only label present in the input label image...
sct_label_utils -i template_label.nii.gz -o template_label.nii.gz -remove label_1mm_rpi.nii.gz

Dilating input labels using 3vox ball radius
sct_maths -i label_1mm_rpi.nii.gz -o label_1mm_rpi_dilate.nii.gz -dilate 3

Apply straightening to labels...
sct_apply_transfo -i label_1mm_rpi_dilate.nii.gz -o label_1mm_rpi_dilate_straight.nii.gz -d seg_1mm_rpi_crop_straight.nii.gz -w warp_curve2straight.nii.gz -x nn

Estimate transformation for step #0...
Labels src: [[5.17348253089963, -0.7713386593884195, 23.006573742582596], [5.195090509230091, -0.8591864801222293, -11.70876730642011]]
Labels dest: [[-0.0, -0.0, 169.5], [-0.0, -0.0, 135.5]]
Degrees of freedom (dof): Tx_Ty_Tz_Sz
Optimization terminated successfully.
Current function value: 0.004092
Iterations: 2
Function evaluations: 147
Matrix:
[[ 1. 0. 0.]
[ 0. 1. 0.]
[-0. 0. 1.]]
Center:
[ 0. 0. 152.5]
Translation:
[[ 5.18428652 -0.81526257 -146.85109678]]

Concatenate transformations: curve --> straight --> affine...
sct_concat_transfo -w warp_curve2straight.nii.gz,straight2templateAffine.txt -d template.nii -o warp_curve2straightAffine.nii.gz

Apply transformation...
sct_apply_transfo -i data_1mm_rpi.nii -o data_1mm_rpi_straightAffine.nii -d template.nii -w warp_curve2straightAffine.nii.gz
sct_apply_transfo -i seg_1mm_rpi_crop.nii.gz -o seg_1mm_rpi_crop_straightAffine.nii.gz -d template.nii -w warp_curve2straightAffine.nii.gz -x linear

Binarize segmentation...
sct_maths -i seg_1mm_rpi_crop_straightAffine.nii.gz -bin 0.5 -o seg_1mm_rpi_crop_straightAffine_bin.nii.gz
sct_crop_image -i seg_1mm_rpi_crop_straightAffine_bin.nii.gz -dim 2 -bmax -o tmp.nii

Crop data in template space (for faster processing)...
sct_crop_image -i template.nii -o template_crop.nii -dim 2 -start 201 -end 227
sct_crop_image -i template_seg.nii.gz -o template_seg_crop.nii.gz -dim 2 -start 201 -end 227
sct_crop_image -i data_1mm_rpi_straightAffine.nii -o data_1mm_rpi_straightAffine_crop.nii -dim 2 -start 201 -end 227
sct_crop_image -i seg_1mm_rpi_crop_straightAffine_bin.nii.gz -o seg_1mm_rpi_crop_straightAffine_bin_crop.nii.gz -dim 2 -start 201 -end 227

Sub-sample in z-direction (for faster processing)...
sct_resample -i template_crop.nii -o template_crop_sub.nii -f 1x1x0.25
sct_resample -i template_seg_crop.nii.gz -o template_seg_crop_sub.nii.gz -f 1x1x0.25
sct_resample -i data_1mm_rpi_straightAffine_crop.nii -o data_1mm_rpi_straightAffine_crop_sub.nii -f 1x1x0.25
sct_resample -i seg_1mm_rpi_crop_straightAffine_bin_crop.nii.gz -o seg_1mm_rpi_crop_straightAffine_bin_crop_sub.nii.gz -f 1x1x0.25

Register straight spinal cord to template...

Estimate transformation for step #1...
Registration parameters:
type ........... seg
algo ........... centermassrot
slicewise ...... 0
metric ......... MeanSquares
iter ........... 10
smooth ......... 0
laplacian ...... 0
shrink ......... 1
gradStep ....... 0.5
init ...........
poly ........... 5
dof ............ Tx_Ty_Tz_Rx_Ry_Rz

Create temporary folder...

Create temporary folder...
mkdir tmp.161117140336_288549/

Copy input data to temp folder...
sct_convert -i seg_1mm_rpi_crop_straightAffine_bin_crop_sub.nii.gz -o tmp.161117140336_288549/src.nii
sct_convert -i template_seg_crop_sub.nii.gz -o tmp.161117140336_288549/dest.nii

Get image dimensions of destination image...
.. matrix size: 70 x 70 x 7
.. voxel size: 1.0mm x 1.0mm x 7.71429mm

Split input volume...

Split destination volume...

Generate warping field...
Done! Warping field generated: step1Warp.nii.gz

Generate warping field...
Done! Warping field generated: step1InverseWarp.nii.gz

Move warping fields to parent folder...
mv step1Warp.nii.gz ../
mv step1InverseWarp.nii.gz ../

Estimate transformation for step #2...
sct_apply_transfo -i seg_1mm_rpi_crop_straightAffine_bin_crop_sub.nii.gz -d template_seg_crop_sub.nii.gz -w warp_forward_1.nii.gz -o seg_1mm_rpi_crop_straightAffine_bin_crop_sub_regStep1.nii.gz -x nn
Registration parameters:
type ........... seg
algo ........... bsplinesyn
slicewise ...... 0
metric ......... MeanSquares
iter ........... 5
smooth ......... 0
laplacian ...... 0
shrink ......... 1
gradStep ....... 0.5
init ...........
poly ........... 5
dof ............ Tx_Ty_Tz_Rx_Ry_Rz
sct_image -i template_seg_crop_sub.nii.gz -o template_seg_crop_sub_pad.nii.gz -pad 0,0,10

Estimate transformation
isct_antsRegistration --dimensionality 3 --transform bsplinesyn[0.5,1,3] --metric MeanSquares[template_seg_crop_sub_pad.nii.gz,seg_1mm_rpi_crop_straightAffine_bin_crop_sub_regStep1.nii.gz,1,4] --convergence 5 --shrink-factors 1 --smoothing-sigmas 0mm --restrict-deformation 1x1x0 --output [step2,seg_1mm_rpi_crop_straightAffine_bin_crop_sub_regStep1_regStep2.nii.gz] --interpolation BSpline[3] --verbose 1

Estimate transformation for step #3...
sct_apply_transfo -i data_1mm_rpi_straightAffine_crop_sub.nii -d template_crop_sub.nii -w warp_forward_1.nii.gz,warp_forward_2.nii.gz -o data_1mm_rpi_straightAffine_crop_sub_regStep2.nii -x linear
Registration parameters:
type ........... im
algo ........... syn
slicewise ...... 0
metric ......... MeanSquares
iter ........... 0
smooth ......... 0
laplacian ...... 0
shrink ......... 1
gradStep ....... 0.5
init ...........
poly ........... 5
dof ............ Tx_Ty_Tz_Rx_Ry_Rz

Estimate transformation
isct_antsRegistration --dimensionality 3 --transform syn[0.5,3,0] --metric MeanSquares[template_crop_sub.nii,data_1mm_rpi_straightAffine_crop_sub_regStep2.nii,1,4] --convergence 0 --shrink-factors 1 --smoothing-sigmas 0mm --restrict-deformation 1x1x0 --output [step3,data_1mm_rpi_straightAffine_crop_sub_regStep2_regStep3.nii] --interpolation BSpline[3] --verbose 1

Concatenate transformations: anat --> template...
sct_concat_transfo -w warp_curve2straightAffine.nii.gz,warp_forward_1.nii.gz,warp_forward_2.nii.gz,warp_forward_3.nii.gz -d template.nii -o warp_anat2template.nii.gz

Concatenate transformations: template --> anat...
sct_concat_transfo -w warp_inverse_3.nii.gz,warp_inverse_2.nii.gz,warp_inverse_1.nii.gz,-straight2templateAffine.txt,warp_straight2curve.nii.gz -d data.nii -o warp_template2anat.nii.gz
sct_apply_transfo -i template.nii -o template2anat.nii.gz -d data.nii -w warp_template2anat.nii.gz -crop 1
sct_apply_transfo -i data.nii -o anat2template.nii.gz -d template.nii -w warp_anat2template.nii.gz -crop 1

Generate output files...
File created: sct_register_to_template_sct_testing_data_161117140245_568835/warp_template2anat.nii.gz
File created: sct_register_to_template_sct_testing_data_161117140245_568835/warp_anat2template.nii.gz
File created: sct_register_to_template_sct_testing_data_161117140245_568835/template2anat.nii.gz
File created: sct_register_to_template_sct_testing_data_161117140245_568835/anat2template.nii.gz
File created: sct_register_to_template_sct_testing_data_161117140245_568835/warp_curve2straight.nii.gz
File created: sct_register_to_template_sct_testing_data_161117140245_568835/warp_straight2curve.nii.gz
File created: sct_register_to_template_sct_testing_data_161117140245_568835/straight_ref.nii.gz

Finished! Elapsed time: 65s

To view results, type:
fslview /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2.nii.gz sct_register_to_template_sct_testing_data_161117140245_568835/template2anat -b 0,4000 &

fslview /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_t2.nii.gz -b 0,5000 sct_register_to_template_sct_testing_data_161117140245_568835/anat2template &

Spinal Cord Toolbox (version dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_dice_coefficient.py -i /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2_seg.nii.gz -d sct_register_to_template_sct_testing_data_161117140245_568835/test_template2anat.nii.gz
isct_dice_coefficient /spare/hardisty/s4r-condaR/sct_testing_data/t2/t2_seg.nii.gz sct_register_to_template_sct_testing_data_161117140245_568835/test_template2anat.nii.gz

3D Dice coefficient = 0.455751

Spinal Cord Toolbox (version dev-d0e91eb7a5b9e9a87b03304a7582f8ec8ce9a3a2)
/spare/hardisty/git/sct/scripts/sct_dice_coefficient.py -i /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_cord.nii.gz -d sct_register_to_template_sct_testing_data_161117140245_568835/test_anat2template.nii.gz -bmax 1
isct_dice_coefficient /spare/hardisty/s4r-condaR/sct_testing_data/template/template/PAM50_small_cord.nii.gz sct_register_to_template_sct_testing_data_161117140245_568835/test_anat2template.nii.gz -bmax
WARNING: please check bounding box
Origin: 29 32 201
Size: 13 7 27

3D Dice coefficient = 0.922849

Checking test_sct_resample..........................[OK]
Checking test_sct_smooth_spinalcord.................[OK]
Checking test_sct_straighten_spinalcord.............[OK]
Checking test_sct_warp_template.....................[OK]
status: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0]
Finished! Elapsed time: 493s

Remove temporary files...
rm -rf tmp.161117135617_13171/

Perfect!
I'll recompile with VTK_DEBUG_LEAKS:BOOL=OFF, and test a couple things for why the toolbox hangs in slicer.

From what I understand, the core issue here has been addressed. Closing. :)

Was this page helpful?
0 / 5 - 0 ratings