Dear Kent,
There is a way to print out the cost function value, but I don't think
this is what
you really need.
The problem with using cost function evaluations in this instance is
that there are
substantial portions of the EPI image which are affected by signal
loss. Consequently,
they do not form good intensity matches with the structural image (even
for probabilistic
intensity matching as used by mutual information). Practically this
means that it will tend
to prefer a registration that has incorrectly pushed the signal loss
areas outside of the
brain by inappropriate stretching, translation or rotation. Hence I
would not recommend
this method to assess the quality of your registrations.
Unfortunately we do not have a better automatic way of assessing quality
for such images.
If we did, we'd use it to drive a registration method to get better
results. So the best
method that exists is one where you try to identify anatomical landmarks
in the two images
and then assess how well matched these landmarks are after registration.
All the best,
Mark
P.S. For the record, the best way to get the cost function is to use a
special schedule
file that prints it at the end. I'm attaching this schedule file - just
use it by using the option:
-schedule printcost.sch
and the first value in the output line is the cost value (the others are
the transformation parameters)
Dave Flitney wrote:
> Oops. Jumped the gun there. That's not the cost function value. Sorry.
> I'll have another look...
>
> On 9 Jan 2008, at 15:05, Dave Flitney wrote:
>
>> Kent,
>>
>> Looking at the sources: in find_cost_minima it will output "COST
>> minima" if verbose level is >= 3. Haven't had a chance to test it but
>> hopefully that'll do the trick?
>>
>> On 9 Jan 2008, at 14:45, Kent Conover wrote:
>>
>>> Hi Everybody,
>>>
>>> Thanks to some advice that I received from Heather Urry, I have had
>>> some success unwarping
>>> my EPI volumes. My question is, is there a way to statistically
>>> assess the effectiveness of FUGUE?
>>> I imagine that one could compare the mutual information scores for
>>> the registrations of
>>> distorted and corrected volumes to the subjects high resolution
>>> anatomical. However, FLIRT
>>> apparently does not report the final values of the cost function. I
>>> would appreciate any
>>> suggestions.
>>>
>>> Regards,
>>>
>>> -Kent
>>>
>>> PS. Here is Heather's advice on how to the transform the field map
>>> produced by the Siemens Magnetom Trio gre_field_mapping protocol for
>>> use by FUGUE:
>>>
>>> Hi Kent,
>>>
>>> For what it's worth, when I reconstruct our Siemens Magnetom Trio DICOM
>>> fieldmap images using MRIcron, I get 2 magnitude images and one
>>> phase map.
>>> The phase map is scaled with slope of 2 and an intercept of -4096. To
>>> convert that to radians per sec, I use the following command:
>>>
>>> fslmaths fieldmapping64s006a201.nii.gz -mul 3.14159 -div 4096 -div
>>> .00246
>>> fieldmap.nii.gz
>>>
>>> fieldmapping64s006a201.nii.gz is the name of the phase map.
>>>
>>> Multiplying the phase map by 3.14159 and dividing by 4096 converts the
>>> image to -pi to pi. Dividing again by .00246 converts to
>>> radians/sec. .00246 is the TE difference, in seconds. In my case,
>>> TE1 =
>>> 2.84 ms and TE2 = 5.3 ms, thus TE diff = 2.46 ms, or .00246 s.
>>>
>>> fieldmap.nii.gz is the properly scaled fieldmap that is output by this
>>> command. It's the one that I use for B0 unwarping in FEAT.
>>>
>>> Hope this is helpful! Ignore if this isn't what you were looking
>>> for. :)
>>>
>>> Cheers,
>>>
>>> Heather
>>>
>>>
>>>
>>>
>>
>> --
>> Cheers, Dave
>>
>> Dave Flitney, IT Manager
>> Oxford Centre for Functional MRI of the Brain
>> E:[log in to unmask] <mailto:[log in to unmask]>
>> W:+44-1865-222713 F:+44-1865-222717
>> URL: http://www.fmrib.ox.ac.uk/~flitney
>> <http://www.fmrib.ox.ac.uk/%7Eflitney>
>>
>>
>
> --
> Cheers, Dave
>
> Dave Flitney, IT Manager
> Oxford Centre for Functional MRI of the Brain
> E:[log in to unmask] <mailto:[log in to unmask]>
> W:+44-1865-222713 F:+44-1865-222717
> URL: http://www.fmrib.ox.ac.uk/~flitney
> <http://www.fmrib.ox.ac.uk/%7Eflitney>
>
>
# 8mm scale
setscale 8
setoption smoothing 8
clear S
clear P
search
# 4mm scale
setscale 4
setoption smoothing 4
clear U
clear UA
clear UB
clear US
clear UP
# remeasure costs at this scale
measurecost 7 S 0 0 0 0 0 0 rel
copy U US
clear U
measurecost 7 P 0 0 0 0 0 0 rel
copy U UP
dualsort US UP
# optimise best 3 candidates (pre and post 8mm optimisations)
clear U
optimise 7 US:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
optimise 7 UP:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
sort U
copy U UA
# select best 3 optimised solutions and try perturbations of these
clear U
copy UA:1-3 U
optimise 7 UA:1-3 1.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
optimise 7 UA:1-3 -1.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
optimise 7 UA:1-3 0.0 1.0 0.0 0.0 0.0 0.0 0.0 rel 4
optimise 7 UA:1-3 0.0 -1.0 0.0 0.0 0.0 0.0 0.0 rel 4
optimise 7 UA:1-3 0.0 0.0 1.0 0.0 0.0 0.0 0.0 rel 4
optimise 7 UA:1-3 0.0 0.0 -1.0 0.0 0.0 0.0 0.0 rel 4
optimise 7 UA:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.1 abs 4
optimise 7 UA:1-3 0.0 0.0 0.0 0.0 0.0 0.0 -0.1 abs 4
optimise 7 UA:1-3 0.0 0.0 0.0 0.0 0.0 0.0 0.2 abs 4
optimise 7 UA:1-3 0.0 0.0 0.0 0.0 0.0 0.0 -0.2 abs 4
sort U
copy U UB
# 2mm scale
setscale 2
setoption smoothing 2
clear U
clear UC
clear UD
clear UE
clear UF
# remeasure costs at this scale
measurecost 7 UB 0 0 0 0 0 0 rel
sort U
copy U UC
clear U
optimise 7 UC:1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 4
copy U UD
setoption boundguess 1
if MAXDOF > 7
clear U
if MAXDOF > 7
optimise 9 UD:1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 1
copy U UE
if MAXDOF > 9
clear U
if MAXDOF > 9
optimise 12 UE:1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 2
sort U
copy U UF
# 1mm scale
setscale 1
setoption smoothing 1
setoption boundguess 1
clear U
optimise 12 UF:1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 rel 1
sort U
printparams U:1
|