AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
July 28, 2013 09:02AM
Hi Ziad,

thanks for your reply.

ziad Wrote:
-------------------------------------------------------
> It does look like there is an LPI/RAI problem here
> but I am not sure where it is getting introduced.
> I do use GIFTI versions of FreeSurfer surfaces
> fine so there has to be something else going on
> here.

FYI, the GIFTI surface I use were generated using python nibabel.gifti module. So far everything seems to work well, though, except for this LPI/RAI issue.

> If I understand what is going correctly, if the
> GIFTI files do not have the affine transform
> modified to have -1 in the 1st two diagonal
> elements, then after pressing 't', the contours of
> the surfaces look flipped in AFNI.
>
> If you use -1 in the 1st two diagonal elements,
> then contours look fine in AFNI, but rotation in
> SUMA is messed up.

Exactly.

>
> 1- Let us verify what is happening to the Center
> of Mass Estimate in SUMA:
> Start SUMA on the set of GIFTI surfaces without
> changes to the affine transform, open the surface
> controller for one hemisphere and click 'more'
> under the "surface properties" block. Then search
> for "Center of Mass" and note the value
> Repeat on the set of GIFTI surfaces with the
> changes to the affine transform, what is the new
> value of the center of mass?

In both cases I get the following:

Center of Mass: [-29.494 -21.959 17.559]
Surface geometry is considered irregular.
Sphere Center Set To: [-1.000 -1.000 -1.000]
Sphere Radius Set To: [-1.000]
MaxDist From Center: 95.656 at node 218
MinDist From Center: 5.638 at node 7053
Maximum: [1.630 68.839 77.995] (aMax 77.995)
Minimum: [-68.736 -104.722 -46.911] (aMin -104.722)

(There are no swaps of signs anywhere, irrespective of whether the xform is changed or not)

>
> 2- Instead of changing the affine transform, can
> you explicitly flip the x and y coord sign before
> writing out the GIFTI files? And when you do this,
> do things work OK?

Yes, they work ok, in the sense that overlay (on the anatomical image in the AFNI viewer) is fine and rotation (in SUMA) too.
*But* the coordinates are now - as expected - in RAI format. The center of mass has the signs swapped too:

Center of Mass: [29.494 21.959 17.559]

and min/max coordinates have changed as well.

That does not seem desirable as I would assume that every tool that
works with surfaces expects LPI coordinates, no?

(For completeness I also swapped both the signs in the xform matrix *and* swapped the signs of the x and y coordinates of the vertices. As expected, this gives both a wrong overlay *and* rotation issues.)

> Hopefully this will get us somewhere good quickly.
> I am glad you reached the GIFTI route, I was going
> to propose using it anyway.

Great minds think alike?
smiling smiley

As always, thanks for your help.

best,
Nick
Subject Author Posted

Feature request: compressed .asc SUMA surface files?

nick July 01, 2013 01:20PM

Re: Feature request: compressed .asc SUMA surface files?

Bob Cox July 01, 2013 09:08PM

Re: Feature request: compressed .asc SUMA surface files?

nick July 03, 2013 10:00AM

Re: Feature request: compressed .asc SUMA surface files?

nick July 26, 2013 11:50AM

Re: Feature request: compressed .asc SUMA surface files?

ziad July 26, 2013 12:42PM

Re: Feature request: compressed .asc SUMA surface files?

nick July 28, 2013 09:02AM

Re: Feature request: compressed .asc SUMA surface files?

ziad July 29, 2013 12:06PM

Re: Feature request: compressed .asc SUMA surface files?

nick July 29, 2013 02:04PM

Re: Feature request: compressed .asc SUMA surface files?

ziad July 30, 2013 04:39PM

Re: Feature request: compressed .asc SUMA surface files?

nick July 31, 2013 08:26AM

Re: Feature request: compressed .asc SUMA surface files?

ziad July 31, 2013 05:38PM

Re:GIFTI surfaces and LPI / RAI coordinates [was: Feature request: compressed .asc SUMA surface files?]

nick August 01, 2013 05:45AM

Re: GIFTI surfaces and LPI / RAI coordinates [resolved]

nick August 07, 2013 08:39AM