Hi Pedro,
>
>
> I calculate a voxel displacement map using the Fielmap toolbox. I
> introduce the created vdm*.img filename in the sFP field of the
> parameters structure that I should later use as an input in
> spm_uw_estimate function.
>
>
>
> Sometimes the Graphics window shows me deformation fields that seem to
> be visually ok, but sometimes I see white boxes in a black square
> windowand re-estimated movement parameters are zeroes. If I obtain
> thisbizarre result and I run the script again they may become correct
> mysteriously.
>
Yes it does seem a little mysterious. Just to make things clear, this happens as part of the Fieldmap tollbox estimation, not the subsequent Unwarp, right? Is it just the graphics output that gets garbled, or are the underlying maps wrong as well?
When this happens does it always happen as part of a script in which fields have alreday been unwarped, or can it happen to the first attempted field in a fresh Matlab? If it is the former I suspect there may be side-effects from a previous field-run that affects things. There are a few "persistent" variables in Fieldmap.m (which in retrospect may or may not have been a brilliant idea) that might cause problems if they are not cleared properly (which, if they are not would be a bug).
If you send me (off the mailbase) an example of a script with associated fieldmaps that reliably cause this problem I might be able to find the bug. I must warn you though that I will not be able to look at in the next two weeks.
Good luck Jesper
|