save matrix into .nii or .img file

4 ビュー (過去 30 日間)
Priyanka Gorijala
Priyanka Gorijala 2020 年 7 月 7 日
編集済み: Omar Salah 2020 年 7 月 7 日
Hello,
I have .nii file which I filtered basing on distance criteria; now I have a list of filtered coordinates
like this : file =
MNI_x MNI_y MNI_z Z_value
50 -4 -46 4.1706
50 -2 -46 4.1706
50 0 -46 4.1706
54 -6 -44 4.1706
52 -6 -44 4.1706
50 -6 -44 4.1706
54 -4 -44 4.1706
52 -4 -44 4.1706
can anyone please help me to find a way to save those filtered coordinates in to .img or .nii file.
  3 件のコメント
Rik
Rik 2020 年 7 月 7 日
Have you read the documentation for those functions? Did they contain any examples? Were you able to reproduce those?
Priyanka Gorijala
Priyanka Gorijala 2020 年 7 月 7 日
I read, but I am not able to reproduce those.
So I am trying for something which converts matrix to .img or .nii file

サインインしてコメントする。

回答 (1 件)

Omar Salah
Omar Salah 2020 年 7 月 7 日
編集済み: Omar Salah 2020 年 7 月 7 日
Marsbar toolbox have ready made functions for that. http://marsbar.sourceforge.net/ you would usually construct a roi first with the coordinates using the object constructor called "maroi_pointlist" then save them with another function.
Here is what I use in my code:
img_mat = maroi_pointlist(struct('XYZ',<COORDINATES>,'vals',<VALUES>,'roithresh',0,'binarize',0,'mat',<Inversion matrix (I got it from SPM)>,'descrip','', 'label', <Label> ),'vox');
img_roi=saveroi(img_mat, <IMAGENAME>);
save_as_image(img_roi, <IMAGENAME>);

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by