Back to PLS Help

intensities from raw image
lucyc
Posted on 11/23/07 07:04:53
Number of posts: 3
lucyc posts:

Hi, I would like to get the intensity values at particular coordinates from the raw image (that the datamat is created from) rather than from the datamat itself. In the FAQ it says that: "If you need raw image values, you have to load images by yourself, and extract only the voxels indexed by the XYZmm file you provided".

Could anybody give me a bit more advice about how to do this?

Thanks in advance,

Lucy

Replies:

Untitled Post
rmcintosh
Posted on 11/23/07 10:04:01
Number of posts: 394
rmcintosh replies:

quote:
Hi, I would like to get the intensity values at particular coordinates from the raw image (that the datamat is created from) rather than from the datamat itself. In the FAQ it says that: "If you need raw image values, you have to load images by yourself, and extract only the voxels indexed by the XYZmm file you provided".

Could anybody give me a bit more advice about how to do this?

Thanks in advance,

Lucy

We have not written a facility to access the "raw" data in the PLSgui.  Depending on what your imaging modality is, there are other software packages that you can use (e.g., MarsBar).  Another alternative is to create the datamat and deselect all the normalization options.  The data will be as raw as raw can be.  You can then run a mock PLS analysis (no permutations or bootstraps) and extract the voxel(s) of interest from the results module.

Randy


Untitled Post

I'm Online
jshen
Posted on 11/23/07 11:27:16
Number of posts: 291
jshen replies:

quote:
Hi, I would like to get the intensity values at particular coordinates from the raw image (that the datamat is created from) rather than from the datamat itself. In the FAQ it says that: "If you need raw image values, you have to load images by yourself, and extract only the voxels indexed by the XYZmm file you provided".

Could anybody give me a bit more advice about how to do this?

Thanks in advance,

Lucy

Let's say your raw image is:

    filename = 'SCAN.img';
    or filename = 'SCAN.nii';

and you would like to get the intensity values at particular coordinates from it.

First, you need to load the image by yourself:

    nii = load_nii(filename);

Then, display the image:

   view_nii(nii);

Since you have already prepared XYZ(mm) in voxel file, you need to switch the selection of "Axes Unit" from "Voxel" to "Millimeter", and then enter each XYZmm value in "[X Y Z] at crosshair" field and click TAB key.

The value displayed in "Value at crosshair" is the intensity value at the particular coordinate you entered.

If you have many coordinates, I suggest that you prepare an XYZ file instead of an XYZ(mm) file, which is also available in the result window. Now, you can use the following simple script to generate the intensity list all at once. Let's say, for example:

   xyz = [   33    44    14;
                 33    12     8;   ];

Here's the simple script:

intensity=[];
for i=1:size(xyz,1)
intensity=[intensity;img.img(xyz(i,1),xyz(i,2),xyz(i,3)];
end



Untitled Post

I'm Online
jshen
Posted on 11/23/07 12:14:34
Number of posts: 291
jshen replies:

I forgot that we also have such a function in PLSgui:

xyz = xyzmm2xyz(xyzmm, result_file);

which will automatically convert your existing XYZ(mm) list to an XYZ list, based on the particular result file for the XYZ(mm) file.




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