Re: [Freesurfer] Orientation by direction cosines

2019-01-26 Thread Greve, Douglas N.,Ph.D.
Some documentaiotn is here
https://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems?action=AttachFile=get=fscoordinates.pdf
The matrix below is the Mdc in the PDF. The first column is the 
direction of the columns (ie, as you go from column 1 to column 2). In 
your case, it is [.999 -.009 .030]' in RAS coordinates. This vector 
means that you will mostly move in the R direction, a little bit in the 
P (negative A) direction, and a little bit in the S direction. Because 
it is mostly R, R is the first letter in the orientation string. The 
next column is the row direction. Is is mostly in the A direction. The 
slice direction is mostly in the S direction. So this would be RAS 
orientation.

On 1/25/19 9:06 PM, Ritesh Mahajan wrote:
>  External Email - Use Caution
>
> Hi Bruce, Thanks for your response.
>
> It would be really helpful if you explain how does it interpret from matrix.
>
> Thanks,
> Ritesh Mahajan
>
> - Original Message -
> From: "Greve, Douglas N.,Ph.D." 
> To: "freesurfer" 
> Sent: Friday, January 25, 2019 10:26:47 PM
> Subject: Re: [Freesurfer] Orientation by direction cosines
>
> mri_info will do it. If you just want the orientation string, you can
> add  --orientation. Or do you still want the interpretation of the matrix?
>
> On 1/25/19 10:10 AM, Bruce Fischl wrote:
>> Hi Ritesh
>>
>> I think that mri_info will try to figure this out and tell you (in the
>> "Orientation" output).
>>
>> cheers
>> Bruce
>>
>>
>> On Fri, 25 Jan 2019, Ritesh Mahajan wrote:
>>
>>>  External Email - Use Caution
>>>
>>> Hello Team,
>>>
>>> Can any one please explain how we come to know whether it is RAI or RAS or 
>>> any other orientation through direction cosines:
>>>
>>> Below is the direction cosine: I saw some non zero and negative values in 
>>> non diagonal values of matrix. What does this signify ?
>>>
>>> 0.9993770-0.0352819
>>> -0.00916448  0.965676-0.259588
>>> 0.0340709  0.25975   0.965075
>>>
>>> Suppose it is Head First Supine. Any help will be really appreciated.
>>>
>>> Thanks,
>>> Ritesh Mahajan
>>>
>>> ___
>>> Freesurfer mailing list
>>> Freesurfer@nmr.mgh.harvard.edu
>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>>
>>>
>>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Orientation by direction cosines

2019-01-25 Thread Bruce Fischl

here's the code if it is any help:

 for (c = 0; c < 3; c++) ostr[c] = '\0';

  for (c = 0; c < 3; c++) {
sag = Mdc[0][c];  // LR axis
cor = Mdc[1][c];  // PA axis
ax = Mdc[2][c];   // IS axis
// printf("c = %d, sag = %g, cor = %g, ax = %g\n",c,sag,cor,ax);
if (fabs(sag) > fabs(cor) && fabs(sag) > fabs(ax)) {
  if (sag > 0)
ostr[c] = 'R';
  else
ostr[c] = 'L';
  continue;
}
if (fabs(cor) > fabs(ax)) {
  if (cor > 0)
ostr[c] = 'A';
  else
ostr[c] = 'P';
  continue;
}
if (ax > 0)
  ostr[c] = 'S';
else
  ostr[c] = 'I';
  }
  return(ostr);

On Sat, 
26 Jan 2019, Ritesh Mahajan 
wrote:



   External Email - Use Caution

Hi Bruce, Thanks for your response.

It would be really helpful if you explain how does it interpret from matrix.

Thanks,
Ritesh Mahajan

- Original Message -
From: "Greve, Douglas N.,Ph.D." 
To: "freesurfer" 
Sent: Friday, January 25, 2019 10:26:47 PM
Subject: Re: [Freesurfer] Orientation by direction cosines

mri_info will do it. If you just want the orientation string, you can
add  --orientation. Or do you still want the interpretation of the matrix?

On 1/25/19 10:10 AM, Bruce Fischl wrote:

Hi Ritesh

I think that mri_info will try to figure this out and tell you (in the
"Orientation" output).

cheers
Bruce


On Fri, 25 Jan 2019, Ritesh Mahajan wrote:


External Email - Use Caution

Hello Team,

Can any one please explain how we come to know whether it is RAI or RAS or any 
other orientation through direction cosines:

Below is the direction cosine: I saw some non zero and negative values in non 
diagonal values of matrix. What does this signify ?

0.9993770-0.0352819
-0.00916448  0.965676-0.259588
0.0340709  0.25975   0.965075

Suppose it is Head First Supine. Any help will be really appreciated.

Thanks,
Ritesh Mahajan

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer




___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Orientation by direction cosines

2019-01-25 Thread Ritesh Mahajan
External Email - Use Caution

Hi Bruce, Thanks for your response.

It would be really helpful if you explain how does it interpret from matrix.

Thanks,
Ritesh Mahajan

- Original Message -
From: "Greve, Douglas N.,Ph.D." 
To: "freesurfer" 
Sent: Friday, January 25, 2019 10:26:47 PM
Subject: Re: [Freesurfer] Orientation by direction cosines

mri_info will do it. If you just want the orientation string, you can 
add  --orientation. Or do you still want the interpretation of the matrix?

On 1/25/19 10:10 AM, Bruce Fischl wrote:
> Hi Ritesh
>
> I think that mri_info will try to figure this out and tell you (in the
> "Orientation" output).
>
> cheers
> Bruce
>
>
> On Fri, 25 Jan 2019, Ritesh Mahajan wrote:
>
>> External Email - Use Caution
>>
>> Hello Team,
>>
>> Can any one please explain how we come to know whether it is RAI or RAS or 
>> any other orientation through direction cosines:
>>
>> Below is the direction cosine: I saw some non zero and negative values in 
>> non diagonal values of matrix. What does this signify ?
>>
>> 0.9993770-0.0352819
>> -0.00916448  0.965676-0.259588
>> 0.0340709  0.25975   0.965075
>>
>> Suppose it is Head First Supine. Any help will be really appreciated.
>>
>> Thanks,
>> Ritesh Mahajan
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Orientation by direction cosines

2019-01-25 Thread Greve, Douglas N.,Ph.D.
mri_info will do it. If you just want the orientation string, you can 
add  --orientation. Or do you still want the interpretation of the matrix?

On 1/25/19 10:10 AM, Bruce Fischl wrote:
> Hi Ritesh
>
> I think that mri_info will try to figure this out and tell you (in the
> "Orientation" output).
>
> cheers
> Bruce
>
>
> On Fri, 25 Jan 2019, Ritesh Mahajan wrote:
>
>> External Email - Use Caution
>>
>> Hello Team,
>>
>> Can any one please explain how we come to know whether it is RAI or RAS or 
>> any other orientation through direction cosines:
>>
>> Below is the direction cosine: I saw some non zero and negative values in 
>> non diagonal values of matrix. What does this signify ?
>>
>> 0.9993770-0.0352819
>> -0.00916448  0.965676-0.259588
>> 0.0340709  0.25975   0.965075
>>
>> Suppose it is Head First Supine. Any help will be really appreciated.
>>
>> Thanks,
>> Ritesh Mahajan
>>
>> ___
>> Freesurfer mailing list
>> Freesurfer@nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Orientation by direction cosines

2019-01-25 Thread Bruce Fischl
Hi Ritesh

I think that mri_info will try to figure this out and tell you (in the 
"Orientation" output).

cheers
Bruce


On Fri, 25 Jan 2019, Ritesh Mahajan wrote:

>External Email - Use Caution
>
> Hello Team,
>
> Can any one please explain how we come to know whether it is RAI or RAS or 
> any other orientation through direction cosines:
>
> Below is the direction cosine: I saw some non zero and negative values in non 
> diagonal values of matrix. What does this signify ?
>
> 0.9993770-0.0352819
> -0.00916448  0.965676-0.259588
> 0.0340709  0.25975   0.965075
>
> Suppose it is Head First Supine. Any help will be really appreciated.
>
> Thanks,
> Ritesh Mahajan
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] Orientation by direction cosines

2019-01-25 Thread Ritesh Mahajan
External Email - Use Caution

Hello Team, 

Can any one please explain how we come to know whether it is RAI or RAS or any 
other orientation through direction cosines: 

Below is the direction cosine: I saw some non zero and negative values in non 
diagonal values of matrix. What does this signify ?

0.9993770-0.0352819
-0.00916448  0.965676-0.259588
0.0340709  0.25975   0.965075

Suppose it is Head First Supine. Any help will be really appreciated.

Thanks,
Ritesh Mahajan

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer