Rank: 81 based on 770 downloads (last 30 days) and 5 files submitted
photo

Jimmy Shen

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Jimmy View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
22 Jan 2014 Screenshot Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen medical, reslice, isotropic, image, header, niftl 605 130
  • 4.65116
4.7 | 47 ratings
04 Dec 2012 geotiffwrite Write a 2D or 3D array to a single or multi-band GeoTIFF file Author: Jimmy Shen geotiff format write ..., earth, science, geotiff, format, write 54 27
  • 4.9
4.9 | 10 ratings
22 Feb 2011 Load BIOPAC ACQ (AcqKnowledge for PC) data Load BIOPAC's *.acq file (AcqKnowledge for Windows data format). Author: Jimmy Shen medical, biopac acqknowledge, acq, eeg, file, data 47 15
  • 4.625
4.6 | 8 ratings
16 Apr 2009 Screenshot Resampling volume or image with affine matrix Use affine matrix to convert 3D vol or 2D img to orthogonal one with corresponding affine matrix. Author: Jimmy Shen geometric transformat..., image registration, 3d, image, volume, voxel 35 14
  • 4.57143
4.6 | 7 ratings
22 Aug 2008 Screenshot 3D Bresenham's line generation Generate X Y Z coordinates of a 3D Bresenham's line between two given points Author: Jimmy Shen specialized, plotting, 3d, bresenham algorithm, raster, line 29 1
  • 4.0
4.0 | 1 rating
Comments and Ratings by Jimmy View all
Updated File Comments Rating
14 Feb 2014 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen

you can't do it. check faq.pdf when you need load_untouch_nii or load_nii

12 Feb 2014 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen

because it's not the business of view_nii to interpret and apply header info.

31 Dec 2013 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen

Nicolas, please tell me what is the exact "clues" or "messages" that confuse you. In addition, please tell me what you try to do.

19 Nov 2013 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen

You can use "load_untouch_nii / save_untouch_nii" pair. Here's an example:

nii = load_untouch_nii('avg152T1_LR_nifti.nii');
nii.hdr.hist.descrip = 'Mengye';
save_untouch_nii(nii, 'new_avg152T1_LR_nifti.nii');

Unless you touch nii.img by yourself, e.g. nii.img(1)=0, it will not be changed, although it is also loaded and saved. Only the header (nii.hdr) is edited in the way you make the change.

In addition, if the input file is in Analyze 7.5 format, the output will be kept in Analyze 7.5 format. If the input is in NIfTI format, the output will be kept in NIfTI format.

That is why I have "load_untouch_" as well as "load_" feature. However, in most case, you want to use "load_" feature, since you don't want to interpret affine matrix in the header, and make all sorts of flipping and rotation by yourself, do you?

11 Nov 2013 Resampling volume or image with affine matrix Use affine matrix to convert 3D vol or 2D img to orthogonal one with corresponding affine matrix. Author: Jimmy Shen

The output volume is determined by the original volume, the affine matrix, and the new voxel_size that you choose. If any of the above inputs change, the output will also change. Otherwise, the output should be consistent.

The difference in dimension between output volume and original one is obvious. Just think about a unit square in 2D plane with dimension of [1 1]. If you rotate it 45 degree, you have to use a dimension of [1.414 1.414] to hold the same square. However, the distance from origin to edges are still 1.

In order to properly crop the transformed volume, you need to keep in mind that we are focusing on the unit of distance from the originator based on the affine matrix (e.g. millimeter), and don't worry about voxel size or its dimension. Since I have not used it for registration, I don't have detail procedure for you.

Comments and Ratings on Jimmy's Files View all
Updated File Comment by Comments Rating
22 Jul 2014 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen Jing

Thanks so much!!!

11 Jul 2014 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen Shantanu

I came across your MATLAB code on loading and viewing .nii files. I am presently working on brain mapping and brain imaging of Autism patients. I have got the mri images of patients from ABIDE database. But I am really new to MATLAB. I am not able to understand how this code will work. It says to replace the filename with the name of file, I did the same. But I guess it needs some more editing so that i could use it. Could you please help me out as in how to use this code.

26 Jun 2014 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen Sui, Yi

Great work!
I updated it a little bit and added a few new features.
Please check
http://www.mathworks.com/matlabcentral/fileexchange/47072-3d-nifti-data-viewer

20 Jun 2014 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen Christian

20 Jun 2014 Tools for NIfTI and ANALYZE image Load, save, make, reslice, view (and edit) both NIfTI and ANALYZE data on any platform Author: Jimmy Shen Christian

thank you very much for this useful tool!

Contact us