BIC-MNI / minc-toolkit

Metaproject uniting all the available minc tools
GNU General Public License v3.0
37 stars 15 forks source link

minc-toolkit-1.0.04 fails Test #75: minctracc_nonlinear #17

Closed gdevenyi closed 5 years ago

gdevenyi commented 9 years ago
75/75 Test #75: minctracc_nonlinear ..............***Failed    6.01 sec

99% tests passed, 1 tests failed out of 75

Total Test time (real) =  73.09 sec

The following tests FAILED:
     75 - minctracc_nonlinear (Failed)
Errors while running CTest
make: *** [test] Error 8
75/75 Testing: minctracc_nonlinear
75/75 Test: minctracc_nonlinear
Command: "/usr/bin/cmake" "-E" "chdir" "/opt/quarantine/minc-toolkit/1.0.04/src/minc-toolkit/build/mni_autoreg/Testing" "/opt/quarantine/minc-toolkit/1.0.04/src/minc-toolkit/mni_autoreg/Testing/minctracc.test2.cmake"
Directory: /opt/quarantine/minc-toolkit/1.0.04/src/minc-toolkit/build/mni_autoreg/Testing
"minctracc_nonlinear" start time: Oct 20 19:38 EDT
Output:
----------------------------------------------------------
/opt/quarantine/minc-toolkit/1.0.04/src/minc-toolkit/mni_autoreg/Testing/minctracc.test2.cmake xcorr before: 0.7231
This run will use sub-lattice correlation (type 0) between the two input vols.
Source volume size:  64  by  64  by 64 
Source voxel size =    2.000    2.000    2.000
Source min/max real range =    0.000    0.153
Source min/max voxel=    0.000    0.153

Target volume size:  64  by  64  by 64 
Target voxel =    2.000    2.000    2.000
Target min/max real range=    0.000    0.148
Target min/max voxel =    0.000    0.148

AFTER init_params()
Transform matrix    =    1.0000    0.0000    0.0000    0.0000 
                         0.0000    1.0000    0.0000    0.0000 
                         0.0000    0.0000    1.0000    0.0000 

Transform center   =    0.061    0.039   -0.640
Transform rotations  =   -0.000   -0.000   -0.000
Transform trans    =    0.000    0.000    0.000
Transform scale    =    1.000    1.000    1.000
Transform shear    =    0.000    0.000    0.000

Target volume is smallest
Lattice step size  =   10.000   10.000   10.000
Lattice start      =  -61.000  -61.000  -61.000
Lattice count      =       13       13       13

===== Debugging information from minctracc =====
Data filename       = object1_dxyz.mnc
Model filename      = object2_dxyz.mnc
Data mask filename  = 
Model mask filename = 
Input xform name    = 
Output filename     = def.xfm
Step size           = 10.000000 10.000000 10.000000
Sub-lattice dia     = 24.000000 24.000000 24.000000
Objective function  = cross correlation (threshold = 0.000000 0.000000)
Transform linear    = TRUE
Transform inverted? = FALSE
Transform type      = 9
Transform matrix    =    1.0000    0.0000    0.0000    0.0000 
                         0.0000    1.0000    0.0000    0.0000 
                         0.0000    0.0000    1.0000    0.0000 
Transform center   =    0.000    0.000    0.000
Transform rotation   =    0.000    0.000    0.000 

Transform trans    =    0.000    0.000    0.000
Transform scale    =    1.000    1.000    1.000

  using input transformation to get initial parameters:
   Center of rot/scale not forced, will be set to : 0.000000 0.000000 0.000000
In set_up_lattice, xyzv[axes] = 2, 1, 0, -1
   User-requested COG estimate: 0.060613 0.039066 -0.639766
In set_up_lattice, xyzv[axes] = 2, 1, 0, -1
slice lim 0 12
row lim   0 12
col lim   0 12
thresh =    0.00000    0.00000
In set_up_lattice, xyzv[axes] = 2, 1, 0, -1
In append_new_default_deformation_field...
in append new def, the start is:  -61.000  -61.000  -61.000
in append_new_default_deformation_field:
    count_extended= 3 18 18 18
 point:  -86.000  -86.000  -86.000 
 start:  -86.000  -86.000  -86.000 
 wstrt:  -86.000  -86.000  -86.000 
 voxel:    0.000    0.000    0.000 
 dirs:    1.000    0.000    0.000 
 dirs:    0.000    1.000    0.000 
 dirs:    0.000    0.000    1.000 
There are 1 feature pairs
0: [0] [1.00000] object1_dxyz.mnc <-> object2_dxyz.mnc
A sub-lattice is needed for at least one feature
Sub-lattice dia     = 24.000000 24.000000 24.000000
orig transform is 2 long
all_until_last is 1 long
Before super sampling, orig def field:
curnt sizes:       3       18       18       18        0
curnt steps:    0.00    10.00    10.00    10.00     0.00
curnt start:    0.00   -86.00   -86.00   -86.00     0.00
vol trans  :  -86.00   -86.00   -86.00     0.00     0.00
v[0,0,0] ->:  -86.00   -86.00   -86.00  
In set_up_lattice, xyzv[axes] = 3, 2, 1, 0
After super sampling:
super sizes:       3       36       36       36        0
super steps:    0.00     5.00     5.00     5.00     0.00
super start:    0.00   -88.50   -88.50   -88.50     0.00
vol trans  :  -88.50   -88.50   -88.50     0.00     0.00
v[0,0,0] ->:  -88.50   -88.50   -88.50  
inside do_nonlinear: thresh:     0.0000     0.0000
   2197    2197 -> 0.48197961

Debug info from do_nonlinear_optimization---------------
Initial corr         = 0.481980
Source vol threshold = 0.000000
Target vol threshold = 0.000000
Iteration limit      = 4
Iteration weight     = 0.600000
xyzv                 =   3   2   1   0 
number_dimensions    = 3
num_of_dims_to_opt   = 3
smoothing_weight     = 0.500000
loop                 = (1 17) (1 17) (1 17)
current_def_vector   = 0.000000 0.000000 0.000000

Fitting STRATEGY ----------
  This fit will use local simplex optimization and
  Simplex radius =    5.00 (voxels) or   10.00(mm)
    global smoothing.
  The similarity function will be evaluated using tri-linear interpolation
    on a ellipsoidal sub-lattice with a radii of
    5 nodes across the diameter
      12.00,  12.00,  12.00  (data voxels),
      24.00   24.00   24.00 (mm) width 
       3.00    3.00    3.00 (data voxels) per node 
       6.00    6.00    6.00 (mm) per node 
-----------------------

TIME:Interpolating super-sampled data : 0 us
Iteration  1 of  4
Statistics report:
 variable name         mean          std          rms          min          max          cnt
     num_funks    23.474537    10.255759    25.615886    12.000000    64.000000         1728
       def_mag     3.184281     3.055977     4.412849     0.000000    11.696578         1728
Nodes seen = 4096: [no def = 0], [w/def = 1728 (over = 17)]
there are 368 of 1728 over (mean+1std) out of 1035 estimated.

TIME:Estimation defs : 0 us

TIME:Adding additional to current : 0 us

TIME:Smoothing the current warp : 0 us
   2197    2197 -> 0.15210809
initial corr 0.481980 ->  this step 0.152108

TIME:This iteration : 0 us

TIME:Interpolating super-sampled data : 0 us
Iteration  2 of  4
Statistics report:
 variable name         mean          std          rms          min          max          cnt
     num_funks    22.186921     8.781746    23.860719    12.000000    56.000000         1728
       def_mag     2.248968     2.139018     3.103322     0.000000     9.702624         1728
Nodes seen = 4096: [no def = 0], [w/def = 1728 (over = 1)]
there are 308 of 1728 over (mean+1std) out of 1026 estimated.

TIME:Estimation defs : 1000 ms

TIME:Adding additional to current : 0 us

TIME:Smoothing the current warp : 0 us
   2197    2197 -> 0.04700499
initial corr 0.481980 ->  this step 0.047005

TIME:This iteration : 1000 ms

TIME:Interpolating super-sampled data : 0 us
Iteration  3 of  4
Statistics report:
 variable name         mean          std          rms          min          max          cnt
     num_funks    20.451389     8.126743    22.006023    10.000000    54.000000         1728
       def_mag     1.885603     1.901042     2.677194     0.000000     8.341553         1728
Nodes seen = 4096: [no def = 0], [w/def = 1728 (over = 0)]
there are 319 of 1728 over (mean+1std) out of 1004 estimated.

TIME:Estimation defs : 0 us

TIME:Adding additional to current : 0 us

TIME:Smoothing the current warp : 0 us
   2197    2197 -> 0.02449241
initial corr 0.481980 ->  this step 0.024492

TIME:This iteration : 0 us

TIME:Interpolating super-sampled data : 0 us
Iteration  4 of  4
Statistics report:
 variable name         mean          std          rms          min          max          cnt
     num_funks    19.192130     7.761657    20.701360     7.000000    63.000000         1728
       def_mag     1.864847     1.892517     2.656539     0.000000     8.453575         1728
Nodes seen = 4096: [no def = 0], [w/def = 1728 (over = 0)]
there are 276 of 1728 over (mean+1std) out of 1034 estimated.

TIME:Estimation defs : 0 us

TIME:Adding additional to current : 0 us

TIME:Smoothing the current warp : 0 us
   2197    2197 -> 0.01777114
initial corr 0.481980 ->  this step 0.017771

TIME:This iteration : 0 us
Initial objective function val = 0.48197961
Final objective function value = 0.01777114
Transforming slices:................................................................Done
/opt/quarantine/minc-toolkit/1.0.04/src/minc-toolkit/mni_autoreg/Testing/minctracc.test2.cmake xcorr after: 0.9878
/opt/quarantine/minc-toolkit/1.0.04/src/minc-toolkit/mni_autoreg/Testing/minctracc.test2.cmake Corr test after failed
<end of output>
Test time =   6.01 sec
----------------------------------------------------------
Test Failed.
"minctracc_nonlinear" end time: Oct 20 19:38 EDT
"minctracc_nonlinear" time elapsed: 00:00:06
----------------------------------------------------------

End testing: Oct 20 19:38 EDT
gdevenyi commented 9 years ago

Looks like a floating point comparison problem instead of a compare to tolerance, I see it's fixed here https://github.com/BIC-MNI/mni_autoreg/commit/9d7cee84f81c3c32010616853558f650e772a1f2

I guess version included needs to be bumped

rdvincent commented 9 years ago

I found and fixed the problem, but have not yet merged it with master.

vfonov commented 9 years ago

it's related to this commit: https://github.com/BIC-MNI/mni_autoreg/commit/2166db53a92a79cd5439361bacd4f176a8cebd65 , which changes behaviour of minctracc

I made it optional in https://github.com/BIC-MNI/mni_autoreg/commit/b2440b2cc49f1df6006861eea5e2581556bfe232 , but didn't update tests to reflect the change in behaviour.

I think relaxing test condition is not the right think to do - it will hide other potential problems

rdvincent commented 9 years ago

OK, but the effect of your change is that comparing the result with a fixed constant fails, because the new correlation value is slightly better than previous. My change "relaxes" the constraint by allowing higher values for the final correlations. Is there a situation where a higher correlation would be clearly an error?

vfonov commented 9 years ago

it's a synthetic test, so it always supposed to produce exactly the same result. So, if correlation changes without any specific reason it would tell us that results of minctracc change - which will affect quite a lot of projects (by making their results irreproducable).

rdvincent commented 9 years ago

Fine, then we need to rewrite the test to work correctly with both build cases.

poquirion commented 8 years ago

Hello I still have the same error after running make install in minc-toolkit-1.9.11 should I consider that a not "normal" error?

87/87 Test #87: minctracc_nonlinear ..............***Failed    1.46 sec

99% tests passed, 1 tests failed out of 87

Total Test time (real) =  31.66 sec

The following tests FAILED:
     87 - minctracc_nonlinear (Failed)
Errors while running CTest
make: *** [test] Error 8

And I have the same values as in the orignal post for the error log.

vfonov commented 8 years ago

Can you run ctest -R minctracc_nonlinear -VV

poquirion commented 8 years ago

Voilà:

UpdateCTestConfiguration  from :/home/poquirion/simexp/minc/ubuntu_14.04/DartConfiguration.tcl
Parse Config file:/home/poquirion/simexp/minc/ubuntu_14.04/DartConfiguration.tcl
UpdateCTestConfiguration  from :/home/poquirion/simexp/minc/ubuntu_14.04/DartConfiguration.tcl
Parse Config file:/home/poquirion/simexp/minc/ubuntu_14.04/DartConfiguration.tcl
Test project /home/poquirion/simexp/minc/ubuntu_14.04
Constructing a list of tests
Done constructing a list of tests
Checking test dependency graph...
Checking test dependency graph end
test 87
    Start 87: minctracc_nonlinear

87: Test command: /usr/bin/cmake "-E" "chdir" "/home/poquirion/simexp/minc/ubuntu_14.04/mni_autoreg/Testing" "/home/poquirion/simexp/minc/minc-toolkit-v2/mni_autoreg/Testing/minctracc.test2.cmake"
87: Test timeout computed to be: 1500
87: /home/poquirion/simexp/minc/minc-toolkit-v2/mni_autoreg/Testing/minctracc.test2.cmake xcorr before: 0.7231
87: This run will use sub-lattice correlation (type 0) between the two input vols.
87: Source volume size:  64  by  64  by 64 
87: Source voxel size =    2.000    2.000    2.000
87: Source min/max real range =    0.000    0.153
87: Source min/max voxel=    0.000    0.153
87: 
87: Target volume size:  64  by  64  by 64 
87: Target voxel =    2.000    2.000    2.000
87: Target min/max real range=    0.000    0.148
87: Target min/max voxel =    0.000    0.148
87: 
87: 
87: AFTER init_params()
87: Transform matrix    =    1.0000    0.0000    0.0000    0.0000 
87:                          0.0000    1.0000    0.0000    0.0000 
87:                          0.0000    0.0000    1.0000    0.0000 
87: 
87: Transform center   =    0.061    0.039   -0.640
87: Transform rotations  =   -0.000   -0.000   -0.000
87: Transform trans    =    0.000    0.000    0.000
87: Transform scale    =    1.000    1.000    1.000
87: Transform shear    =    0.000    0.000    0.000
87: 
87: Target volume is smallest
87: Lattice step size  =   10.000   10.000   10.000
87: Lattice start      =  -61.000  -61.000  -61.000
87: Lattice count      =       13       13       13
87: 
87: ===== Debugging information from minctracc =====
87: Data filename       = object1_dxyz.mnc
87: Model filename      = object2_dxyz.mnc
87: Data mask filename  = 
87: Model mask filename = 
87: Input xform name    = 
87: Output filename     = def.xfm
87: Step size           = 10.000000 10.000000 10.000000
87: Sub-lattice dia     = 24.000000 24.000000 24.000000
87: Objective function  = cross correlation (threshold = 0.000000 0.000000)
87: Transform linear    = TRUE
87: Transform inverted? = FALSE
87: Transform type      = 9
87: Transform matrix    =    1.0000    0.0000    0.0000    0.0000 
87:                          0.0000    1.0000    0.0000    0.0000 
87:                          0.0000    0.0000    1.0000    0.0000 
87: Transform center   =    0.000    0.000    0.000
87: Transform rotation   =    0.000    0.000    0.000 
87: 
87: Transform trans    =    0.000    0.000    0.000
87: Transform scale    =    1.000    1.000    1.000
87: 
87:   using input transformation to get initial parameters:
87:    Center of rot/scale not forced, will be set to : 0.000000 0.000000 0.000000
87: In set_up_lattice, xyzv[axes] = 2, 1, 0, -1
87:    User-requested COG estimate: 0.060613 0.039066 -0.639766
87: In set_up_lattice, xyzv[axes] = 2, 1, 0, -1
87: slice lim 0 12
87: row lim   0 12
87: col lim   0 12
87: thresh =    0.00000    0.00000
87: In set_up_lattice, xyzv[axes] = 2, 1, 0, -1
87: In append_new_default_deformation_field...
87: in append new def, the start is:  -61.000  -61.000  -61.000
87: in append_new_default_deformation_field:
87:     count_extended= 3 18 18 18
87:  point:  -86.000  -86.000  -86.000 
87:  start:  -86.000  -86.000  -86.000 
87:  wstrt:  -86.000  -86.000  -86.000 
87:  voxel:    0.000    0.000    0.000 
87:  dirs:    1.000    0.000    0.000 
87:  dirs:    0.000    1.000    0.000 
87:  dirs:    0.000    0.000    1.000 
87: There are 1 feature pairs
87: 0: [0] [1.00000] object1_dxyz.mnc <-> object2_dxyz.mnc
87: A sub-lattice is needed for at least one feature
87: Sub-lattice dia     = 24.000000 24.000000 24.000000
87: orig transform is 2 long
87: all_until_last is 1 long
87: Before super sampling, orig def field:
87: curnt sizes:       3       18       18       18        0
87: curnt steps:    0.00    10.00    10.00    10.00     0.00
87: curnt start:    0.00   -86.00   -86.00   -86.00     0.00
87: vol trans  :  -86.00   -86.00   -86.00     0.00     0.00
87: v[0,0,0] ->:  -86.00   -86.00   -86.00  
87: In set_up_lattice, xyzv[axes] = 3, 2, 1, 0
87: After super sampling:
87: super sizes:       3       36       36       36        0
87: super steps:    0.00     5.00     5.00     5.00     0.00
87: super start:    0.00   -88.50   -88.50   -88.50     0.00
87: vol trans  :  -88.50   -88.50   -88.50     0.00     0.00
87: v[0,0,0] ->:  -88.50   -88.50   -88.50  
87: inside do_nonlinear: thresh:     0.0000     0.0000
87:    2197    2197 -> 0.48197961
87: 
87: 
87: Debug info from do_nonlinear_optimization---------------
87: Initial corr         = 0.481980
87: Source vol threshold = 0.000000
87: Target vol threshold = 0.000000
87: Iteration limit      = 4
87: Iteration weight     = 0.600000
87: xyzv                 =   3   2   1   0 
87: number_dimensions    = 3
87: num_of_dims_to_opt   = 3
87: smoothing_weight     = 0.500000
87: loop                 = (1 17) (1 17) (1 17)
87: current_def_vector   = 0.000000 0.000000 0.000000
87: 
87: Fitting STRATEGY ----------
87:   This fit will use local simplex optimization and
87:   Simplex radius =    5.00 (voxels) or   10.00(mm)
87:     global smoothing.
87:   The similarity function will be evaluated using tri-linear interpolation
87:     on a ellipsoidal sub-lattice with a radii of
87:     5 nodes across the diameter
87:       12.00,  12.00,  12.00  (data voxels),
87:       24.00   24.00   24.00 (mm) width 
87:        3.00    3.00    3.00 (data voxels) per node 
87:        6.00    6.00    6.00 (mm) per node 
87: -----------------------
87: 
87: TIME:Interpolating super-sampled data : 0 us
87: Iteration  1 of  4
87: Statistics report:
87:  variable name         mean          std          rms          min          max          cnt
87:      num_funks    23.474537    10.255759    25.615886    12.000000    64.000000         1728
87:        def_mag     3.184281     3.055977     4.412849     0.000000    11.696578         1728
87: Nodes seen = 4096: [no def = 0], [w/def = 1728 (over = 17)]
87: there are 368 of 1728 over (mean+1std) out of 1035 estimated.
87: 
87: TIME:Estimation defs : 0 us
87: 
87: TIME:Adding additional to current : 0 us
87: 
87: TIME:Smoothing the current warp : 0 us
87:    2197    2197 -> 0.15210809
87: initial corr 0.481980 ->  this step 0.152108
87: 
87: TIME:This iteration : 1000 ms
87: 
87: TIME:Interpolating super-sampled data : 0 us
87: Iteration  2 of  4
87: Statistics report:
87:  variable name         mean          std          rms          min          max          cnt
87:      num_funks    22.186921     8.781746    23.860719    12.000000    56.000000         1728
87:        def_mag     2.248968     2.139018     3.103322     0.000000     9.702624         1728
87: Nodes seen = 4096: [no def = 0], [w/def = 1728 (over = 1)]
87: there are 308 of 1728 over (mean+1std) out of 1026 estimated.
87: 
87: TIME:Estimation defs : 0 us
87: 
87: TIME:Adding additional to current : 0 us
87: 
87: TIME:Smoothing the current warp : 0 us
87:    2197    2197 -> 0.04700499
87: initial corr 0.481980 ->  this step 0.047005
87: 
87: TIME:This iteration : 0 us
87: 
87: TIME:Interpolating super-sampled data : 0 us
87: Iteration  3 of  4
87: Statistics report:
87:  variable name         mean          std          rms          min          max          cnt
87:      num_funks    20.451389     8.126743    22.006023    10.000000    54.000000         1728
87:        def_mag     1.885603     1.901042     2.677194     0.000000     8.341553         1728
87: Nodes seen = 4096: [no def = 0], [w/def = 1728 (over = 0)]
87: there are 319 of 1728 over (mean+1std) out of 1004 estimated.
87: 
87: TIME:Estimation defs : 0 us
87: 
87: TIME:Adding additional to current : 0 us
87: 
87: TIME:Smoothing the current warp : 0 us
87:    2197    2197 -> 0.02449241
87: initial corr 0.481980 ->  this step 0.024492
87: 
87: TIME:This iteration : 0 us
87: 
87: TIME:Interpolating super-sampled data : 0 us
87: Iteration  4 of  4
87: Statistics report:
87:  variable name         mean          std          rms          min          max          cnt
87:      num_funks    19.192130     7.761657    20.701360     7.000000    63.000000         1728
87:        def_mag     1.864847     1.892517     2.656539     0.000000     8.453575         1728
87: Nodes seen = 4096: [no def = 0], [w/def = 1728 (over = 0)]
87: there are 276 of 1728 over (mean+1std) out of 1034 estimated.
87: 
87: TIME:Estimation defs : 0 us
87: 
87: TIME:Adding additional to current : 0 us
87: 
87: TIME:Smoothing the current warp : 0 us
87:    2197    2197 -> 0.01777114
87: initial corr 0.481980 ->  this step 0.017771
87: 
87: TIME:This iteration : 0 us
87: Initial objective function val = 0.48197961
87: Final objective function value = 0.01777114
87: Transforming slices:................................................................Done
87: /home/poquirion/simexp/minc/minc-toolkit-v2/mni_autoreg/Testing/minctracc.test2.cmake xcorr after: 0.9878
87: /home/poquirion/simexp/minc/minc-toolkit-v2/mni_autoreg/Testing/minctracc.test2.cmake: 22: /home/poquirion/simexp/minc/minc-toolkit-v2/mni_autoreg/Testing/minctracc.test2.cmake: bc: not found
1/1 Test #87: minctracc_nonlinear ..............***Failed    1.54 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   1.55 sec

The following tests FAILED:
     87 - minctracc_nonlinear (Failed)
Errors while running CTest
vfonov commented 8 years ago

Looks like it fails because you don't have 'bc' installed. Since it looks like it is an Ubuntu 14.04, maybe you can run "sudo apt-get install bc" and repeat the test?

poquirion commented 8 years ago

Thank! The error was perhaps to far away to the right for me to see it...