Back to PLS Help

Bug in exporting Seed PLS results?
as22kk
Posted on 05/16/12 08:05:03
Number of posts: 60
as22kk posts:

 

Dear Jimmy,

 

 

I have noticed that “save datamat correlation to IMG” utility, which may be used after seed PLS analysis in order to save the correlation matrix to a data matrix, flips the coordinate of the extracted regions. Just want to let you know! 

Best

 

/Alireza

 

Replies:

Untitled Post

I'm Online
jshen
Posted on 05/16/12 08:19:52
Number of posts: 291
jshen replies:

Would you please provide me with more details, like which coordinate gets flipped? and what module (PET / E.R.fMRI / Blocked fMRI) are you using? Once I get these information, I will look into this issue.



Untitled Post
as22kk
Posted on 05/16/12 08:49:29
Number of posts: 60
as22kk replies:

 

The x-axis gets flipped in the blocked fMRI module after running a regular behavioral PLS with a seed voxel. It looks fine in the graphic interface but when one uses save function (save datamat correlation to IMG), the x-axis gets flipped in the image file.

/Alireza

 


Untitled Post

I'm Online
jshen
Posted on 05/16/12 12:35:02
Number of posts: 291
jshen replies:

I looked into the case, and found the program is working fine.

Please remember that the output images from PLSgui is always in old ANALYZE format with neurological convention. If you display the saved image with most neurological software (like MRIcro, MRIcron, AFNI, Analyze, even SPM99), you will not find the x-axis get flipped. If you use FSL, SPM2 anb above, you will find x-axis flipped. This is because they assume all ANALYZE format image are in radiological convention, and they simply flipped all ANALYIZE image without notifying user.

I hope the following web page that I created can give you some help:

http://www.rotman-baycrest.on.ca/~jimmy/UseANALYZE.htm




Untitled Post
grace
Posted on 06/21/12 14:48:06
Number of posts: 16
grace replies:

Hi Jimmy, Thanks for the advice regarding .img files. Unfortunately I'm still confused about laterality. I've saved downloaded .img files with save_nii to convert them to .nii, but both sform and qform are set to zero. I read your note and am wondering if what I'm seeing in SPM when I load the nii files are RAS or LAS. (Loading .img directly vs loading the .nii gives mirror images, but I'm not sure which one is flipped!) Also, where in the hdr can we check laterality? Thank you! Grace


Untitled Post

I'm Online
jshen
Posted on 06/21/12 14:54:33
Number of posts: 291
jshen replies:

You said: "... I've saved downloaded .img files with save_nii to convert them to .nii, but both sform and qform are set to zero ..." How do you know that "both sform and qform are set to zero"?


Untitled Post
grace
Posted on 06/21/12 15:11:42
Number of posts: 16
grace replies:

Hi Jimmy, I was checking hdr information like this: >> analyzename = 'plsMC_bsr_lv_1_bsr_lv1_lag1.nii'; analyze = load_nii(analyzename); >> analyze.hdr.hist ans = descrip: [1x79 char] aux_file: 'none' qform_code: 0 sform_code: 0 quatern_b: 6.0985e-42 quatern_c: 0 quatern_d: 0 qoffset_x: 0 qoffset_y: 0 qoffset_z: 0 srow_x: [4 0 0 -80] srow_y: [0 4 0 -108] srow_z: [0 0 4 -64] intent_name: '' magic: 'n+1' originator: [21 28 17 0 0] rot_orient: [] flip_orient: []


Untitled Post

I'm Online
jshen
Posted on 06/21/12 15:25:03
Number of posts: 291
jshen replies:

If you look at:

http://www.rotman-baycrest.on.ca/~jimmy/NIfTI/FAQ.htm

The 1st one will answer you why sform / qform are actually not zero.

-------------------------------

You also said that "... saved downloaded .img files with save_nii to convert them to .nii ...".

Search "Question regarding to format conversion" under:

http://www.rotman-baycrest.on.ca/~jimmy/NIfTI/FAQ.htm

and you will also get answer.

====================
I briefly emphasize it here:
====================

- You CAN NOT use "save_nii" to convert a .img file to .nii file, and there is absolutely no reason for you to do so.
- SPM can read both img/hdr and nii file.
- nii is NIfTI file, while img/hdr can be either NIfTI or ANALYZE file. If you use save_nii to change.img to .nii, you have made some assupmtion, which can be found in my web site. However, other software may have different assuption, as I have described clearly in: http://www.rotman-baycrest.on.ca/~jimmy/UseANALYZE.htm

So, in one word, don't use save_nii to change file name. You are using the tool in a wrong way.




Untitled Post
grace
Posted on 06/21/12 16:06:33
Number of posts: 16
grace replies:

Thanks for your patience in answering all my questions Jimmy, I've now loaded the .img files directly using load_nii and the file type is 0. According to your answer on "Question for orientation" on http://www.rotman-baycrest.on.ca/~jimmy/NIfTI/FAQ.htm, this means I can't tell anything about laterality by looking at the header? What laterality are the imgs downloaded from PLS gui?


Untitled Post

I'm Online
jshen
Posted on 06/21/12 16:17:10
Number of posts: 291
jshen replies:

If images are in NIfTI format, PLSgui will take the orientation in NIfTI header.

If images are in ANALYZE format, PLSgui will assume that it is in Neurological convension, i.e. in RAS orientation.

If you use view_nii to view the structure that is loaded by load_nii, that's what you will see from PLS gui.





Login to reply to this topic.

  • Keep in touch

Enter your email above to receive electronic messages from Baycrest, including invitations to programs and events, newsletters, updates and other communications.
You can unsubscribe at any time.
Please refer to our Privacy Policy or contact us for more details.

  • Follow us on social
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube

Contact Us:

3560 Bathurst Street
Toronto, Ontario
Canada M6A 2E1
Phone: (416) 785-2500

Baycrest is an academic health sciences centre fully affiliated with the University of Toronto