nirs2img, create an image file from NIRS data

51 sec read

I was asked where to get nirs2img script. Here it is. The download link is at the bottom of this article.

nirs2img is to create an image file from the input data. Then the
image file can be viewed by any fmri image viewing programs such as
xjview. This function requires function mni2cor and spm

function nirs2img(imgFileName, mni, value, doInterp, doXjview, bilateral)

imgFileName: the file name to be saved, e.g. ‘testnirs.img’
mni: Nx3 matrix, each row a coordinate in mni space
value: Nx1 matrix, each row is the value corresponding to mni
doInterp: 1 or 0 , whether or not do linear interpolation to
smooth data.
doXjview: 1 or 0, whether or not to view the generated image by xjview
bilateral: 1 or 0, whether or not the input mni is bilateral or not. If
bilateral, the first half points are considered as left side. There is no
interpolation between left and right side. (This argument is
useless if doInterp is 0)

an image file whose name is specified by input

If you have mni points of probes (instead of channels), you may need to
convert first. Use function probe2channel

This function will write to a image file which can be viewed by xjview.
In xjview, you need to check render view.

nirs2img(‘nirs_test.img’, mni, value, 1, 1, 0);

Xu Cui
last update: 2009/07/06: have an option that left and right do not


Don't want to miss new papers in your field? Check out Stork we developed:

Phrase frequency analysis on fNIRS hyperscanning with Stork Big…

In the previous blog, we have used Stork’s big analysis to analyze the literature of fNIRS. At that time, Stork only analyzed the frequency...
Xu Cui
1 min read

NIRS_SPM 批处理成像的一个小改进

This is a guest post by Dr. Ning Liu from Stanford. 前些天 在用 NIRS_SPM批处理 做fNIRS脑图时,有几组数据总是报错(大约占总数的三分之一左右),总是说无法生成图像。 ??? Error using ==> image Error using ==> image...
Xu Cui
58 sec read

Leave a Reply

Your email address will not be published. Required fields are marked *