Warping the vertices should not need to change the faces, so that shouldn't
be a problem.  That scrambling makes me wonder if something is getting the
endianness wrong, are the values extremely large?

If you can put your warpfield into a 3-brick nifti volume, with format of
relative x, y, and z offset (relative shifts), you should be able to get
wb_command to apply the warp with -surface-apply-warpfield (as the command
help says, make sure it is the inverse of the warpfield used to resample a
volume), assuming it uses the nifti sform/qform for alignment to the
surface.

Tim



On Thu, Aug 22, 2013 at 4:33 PM, Colin Reveley <[email protected]> wrote:

> I should say: it loads in workbench. it just doest work.
>
> images (gifti in matlab, same in workbench) attached. also the header I'm
> trying to load. You'll see the header has quite a lot of detritus.
>
> best
>
> Colin
>
>
> On 22 August 2013 22:24, Colin Reveley <[email protected]> wrote:
>
>> hi.
>>
>> we have a system (a bespoke system) for non-linear registration of
>> volumes.
>>
>> we wondered if we could take the output transform and use that data to
>> shift the vertices of a surf.gii so that it's transformed.
>>
>> much like wb_command and fnirt.
>>
>> we tried it. in matlab (using gifti lib) it works.
>>
>> unfortunately the resulting surface renders in matlab, but when saved not
>> in caret or workbench.
>>
>> there are a million reasons why that could be. And I'm happy to mess with
>> the headers till it works.
>>
>> but before i do I wondered if there might be an in-principle problem:
>>
>> we move the vertices. but the face definitions remain the same, as in
>>
>> gii =
>>
>>     vertices: [211995x3 single]
>>          mat: [4x4 double]
>>        faces: [423986x3 int32]
>>
>> is that the basic problem, or is it just a question of messing with the
>> xml till caret or workbench accepts it?
>>
>> I accept it's complicated. But our code does appear to work in terms of
>> moving vertices and aligning to a nifti within matlab, so unless the face
>> definitions are the fundamental issue for loading in caret5/7 (mainly
>> caret5 for the moment) I can just twiddle with headers till it loads
>> hopefully.
>>
>> but if it's the faces I have a bigger problem.
>>
>> best wishes
>>
>> Colin
>>
>
>
> _______________________________________________
> caret-users mailing list
> [email protected]
> http://brainvis.wustl.edu/mailman/listinfo/caret-users
>
>
_______________________________________________
caret-users mailing list
[email protected]
http://brainvis.wustl.edu/mailman/listinfo/caret-users

Reply via email to