ziad Wrote:
> nick Wrote:
> > ziad Wrote:
> > > Problem solved, I hope. The gifti coordinates
> > > transform was being applied after center of
> > mass
> > > computation. The next set of binaries will
> > contain
> > > the fix.
> >
> > Thanks for making this fix - I will give it a
> try
> > once the new binaries are there.
The center of mass issue is fixed now - thanks!
But see below... there still seems to be an LPI/RAI issue.
> > Does that mean I should set the xform matrix m
> for
> > the vertices such that m[0,0]=m[1,1]=-1 and
> > m[2,2]=1, to achieve RAI/LPI compatibility?
>
> Sure
Indeed when setting the xform matrix in that way the overlay in the afni volume viewer is now good.
However I am concerned that this approach is not conforming to the GIFTI specification.
Coordinates in the gifti files I generated are originally in LPI. (as, for example, the .asc surfaces generated by @SUMA_Make_Spec_FS which calls mris_convert). The xform matrix with m[0,0]=m[1,1]=-1 ensures that the overlay is fine in SUMA (and coordinates reported in the SUMA viewer are RAI, as is the case with .asc surfaces). However, the GIFTI specification at
www.nitrc.org/frs/download.php/2871/GIFTI_Surface_Format.pdf
prescribes (page 15):
"The application of a CoordinateSystemTransformMatrix, places the coordinates into the system shown in the table below. All coordinates are in millimeters.
Negative X Left
Positive X Right
Negative Y Posterior
Positive Y Anterior
Negative Z Inferior
Positive Z Superior",
in other words requires that after the xform matrix coordinates should be in LPI. That seems not consistent with how SUMA treats these coordinates, or is it?
(As a side note: I loaded these surfaces also with caret6 and there the coordinates are reported in LPI, always - it seems to ignore the xform matrix).
> In
> > your earlier post you mentioned " I do use
> GIFTI
> > versions of FreeSurfer surfaces fine" - could
> you
> > take a look and see what the xform matrix for
> the
> > surface coordinates contains for these files?
>
> I do not set the xform for my output, rather I set
> the coordinates directly, and assume they are RAI
> at loading time.
So this is different from the common SUMA pipeline with \@SUMA_Make_Spec_FS (and mris_convert) because these surfaces are in LPI rather than RAI, no?
> I hesitate to assume LPI across
> the board for my GIFTI surfaces because I worry
> this will cause me grief elsewhere. Years ago when
> we were testing compatibility, GIFTI test surfaces
> for different packages did display properly in
> SUMA and AFNI so I hesitate to touch anything on
> that front unless I have to.
That is fair enough. However I would like to generate surfaces that are GIFTI-standard compliant - including the requirement that surfaces after applying the xform matrix should have the nodes in LPI coordinates - and now I don't see how to achieve both that objective and be able to view and overlay these surfaces properly in SUMA/AFNI. Do you have suggestions on how to approach this?
As always, thanks for your help.
best,
NIck