[MINC-users] nonlinear registration bombs with 0.5 mm isotropic voxels
EJ Nikelski
nikelski at bic.mni.mcgill.ca
Fri May 29 13:27:45 EDT 2009
Hi All,
I've tried Patrick's script on my system (32-bit OS X, minctracc
0.99.3) and minctracc fails in the same place (start of the 20
iteration loop). Andrew's suggestion of using the '-no_super' switch
has no effect on my system (it still fails in the same place). FWIW.
Cheers,
-Jim
On Fri, May 29, 2009 at 1:01 PM, Patrick Bermudez
<patrick at bic.mni.mcgill.ca> wrote:
>> Date: Fri, 29 May 2009 11:57:28 -0400
>> From: Claude LEPAGE <claude at bic.mni.mcgill.ca>
>> Subject: Re: [MINC-users] nonlinear registration bombs with 0.5 mm
>> isotropic voxels
>> To: minc-users at bic.mni.mcgill.ca
>> Message-ID: <200905291557.n4TFvSGj010293 at grumio.bic.mni.mcgill.ca>
>>
>> Patrick,
>>
>> I could not reproduce your error.
>>
>> I tried with mni_autoreg 0.99.3 and 0.99.5 (internal cvs version)
>> on both 32 and 64 bits architectures. I also ran 0.99.3 and 0.99.5
>> 32-bits through valgrind successfully. I would say that the code is
>> probably safe. Perhaps, as Andrew suggested, you ran out of memory.
>> I know that many minc applications do not check the return status of
>> memory allocation and keep on going as if memory had been allocated.
>
> Hi Claude. Thanks for the test. I somehow doubt that this has been a
> memory problem for the following two reasons:
>
> 1) The script dies on the first iteration of the first fit (with a
> step size of 16 mm) on a system with 8 GB of RAM
> 2) When I source a 32-bit CIVET 1.1.9 environment (with minctracc
> 0.99.3) and run on the same machine, I have no trouble.
>
> So it seems that either minctracc or one of the other tools called by
> the script (e.g. mincblur, minccalc) under a fully 64-bit installation
> (Ubuntu Hardy) is causing trouble. Any thoughts? Thanks.
>
> Patrick
>
>
>>> Dear MINCphilic colleagues,
>>>
>>> I am experiencing a problem with a nonlinear fit of 0.5 mm isotropic
>>> volumes. The script exits at the first iteration of the first fit.
>>> I've placed everything I'm using here:
>>>
>>> /data/scratch/scratch2/patrick
>>>
>>> and the command I'm using is:
>>>
>>> ./04mm_NLfit.pl -source_mask 0.5mm_lsq12_subject_004_t1_nuc_mask.mnc
>>> -target_mask 0.5mm_icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc
>>> 0.5mm_lsq12_subject_004_t1_nuc.mnc
>>> 0.5mm_icbm_avg_152_t1_tal_nlin_symmetric_VI.mnc nl.xfm
>>>
>>>
>>> The resulting minctracc debug output looks like this:
>>>
>>> ===== Debugging information from minctracc =====
>>> Data filename =
>>> /tmp/04mm_NLfit.pl-6uIu8oTx/0.5mm_lsq12_subject_004_t1_nuc_8_blur.mnc
>>> Model filename =
>>> /tmp/04mm_NLfit.pl-6uIu8oTx/0.5mm_icbm_avg_152_t1_tal_nlin_symmetric_VI_8_blur.mnc
>>> Data mask filename = 0.5mm_lsq12_subject_004_t1_nuc_mask.mnc
>>> Model mask filename = 0.5mm_icbm_avg_152_t1_tal_nlin_symmetric_VI_mask.mnc
>>> Input xform name =
>>> Output filename =
>>> /tmp/04mm_NLfit.pl-6uIu8oTx/0.5mm_lsq12_subject_004_t1_nuc_0.xfm
>>> Step size = 16.000000 16.000000 16.000000
>>> Sub-lattice dia = 48.000000 48.000000 48.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
>>>
>>> This run will use sub-lattice correlation (type 5) between the two input
>>> vols.
>>> Source volume size: 361 by 433 by 361
>>> Source voxel = 0.500 0.500 0.500
>>> min/max value= 0.001 80.845
>>> min/max voxel= 0.000 4095.000
>>>
>>> Target volume size: 361 by 433 by 361
>>> Target voxel = 0.500 0.500 0.500
>>> min/max value= -0.000 65.645
>>> min/max voxel= -32768.000 32767.000
>>>
>>>
>>> using input transformation to get initial parameters:
>>> Center of rot/scale not forced, will be set to : 0.000000 0.000000
>>> 0.000000
>>> 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.000 0.000 0.000
>>> 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
>>>
>>> In set_up_lattice, xyzv[axes] = 2, 1, 0, -1
>>> slice lim 0 9
>>> row lim 1 12
>>> col lim 1 9
>>> thresh = 0.00000 0.00000
>>> In set_up_lattice, xyzv[axes] = 2, 1, 0, -1
>>> Target volume is smallest
>>> Lattice step size = 16.000 16.000 16.000
>>> Lattice start = -64.000 -106.000 -62.000
>>> Lattice count = 9 12 10
>>>
>>> In append_new_default_deformation_field...
>>> in append new def, the start is: -64.000 -106.000 -62.000
>>> in append_new_default_deformation_field:
>>> count_extended= 3 15 17 14
>>> point: -104.000 -146.000 -102.000
>>> start: -104.000 -146.000 -102.000
>>> wstrt: -104.000 -146.000 -102.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: [5] [1.00000]
>>> /tmp/04mm_NLfit.pl-6uIu8oTx/0.5mm_lsq12_subject_004_t1_nuc_8_blur.mnc
>>> <->
>>> /tmp/04mm_NLfit.pl-6uIu8oTx/0.5mm_icbm_avg_152_t1_tal_nlin_symmetric_VI_8_blur.mnc
>>> A sub-lattice is needed for at least one feature
>>> Sub-lattice dia = 48.000000 48.000000 48.000000
>>> orig transform is 2 long
>>> all_until_last is 1 long
>>> inside do_nonlinear: thresh: 0.0000 0.0000
>>> 443 433 -> 0.00440087
>>>
>>>
>>> Debug info from do_nonlinear_optimization---------------
>>> Initial corr = 0.004401
>>> Source vol threshold = 0.000000
>>> Target vol threshold = 0.000000
>>> Iteration limit = 20
>>> Iteration weight = 1.000000
>>> xyzv = 3 2 1 0
>>> number_dimensions = 3
>>> num_of_dims_to_opt = 3
>>> smoothing_weight = 1.000000
>>> loop = (1 13) (1 16) (1 14)
>>> current_def_vector = 0.000000 0.000000 0.000000
>>>
>>> Fitting STRATEGY ----------
>>> This fit will use local simplex optimization and
>>> Simplex radius = 32.00 (voxels) or 16.00(mm)
>>> global smoothing.
>>> The similarity function will be evaluated using tri-linear interpolation
>>> on a ellipsoidal sub-lattice with a radii of
>>> 6 nodes across the diameter
>>> 96.00, 96.00, 96.00 (data voxels),
>>> 48.00 48.00 48.00 (mm) width
>>> 19.20 19.20 19.20 (data voxels) per node
>>> 9.60 9.60 9.60 (mm) per node
>>> -----------------------
>>> Iteration 1 of 20
>>> Died at ./04mm_NLfit.pl line 285.
>>>
>>>
>>> A colleague has tracked down the following (in case it helps): minctracc
>>> aborts in function "go_get_samples_with_offset" (sub_lattice.c:612) when
>>> it attempts to make use of a null/zero Volume pointer (pointer
>>> "sshort_ptr", line 612). The indices themselves appear to be within range.
>>>
>>> Any and all help will be greatly appreciated. Cheers.
>>>
>>> Patrick
>
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www2.bic.mni.mcgill.ca/mailman/listinfo/minc-users
>
--
=================================
Jim Nikelski, Ph.D.
Postdoctoral Research Fellow
Bloomfield Centre for Research in Aging
Lady Davis Institute for Medical Research
Sir Mortimer B. Davis - Jewish General Hospital
McGill University
More information about the MINC-users
mailing list