Rank: 42 based on 650 downloads (last 30 days) and 5 files submitted
photo

Jimmy Shen

E-mail
Company/University
Rotman Research Institute

Personal Profile:

http://research.baycrest.org/~jimmy

Professional Interests:

 

Watch this Author's files

 

Files Posted by Jimmy View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
07 Mar 2013 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 analyze, nifti, niftl, image, medical, isotropic 520 110
  • 4.64865
4.6 | 40 ratings
04 Dec 2012 geotiffwrite Write a 2D or 3D array to a single or multi-band GeoTIFF file Author: Jimmy Shen earth sciences, dem, earth science, gps, gis, image 57 20
  • 4.88889
4.9 | 9 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 23 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 affine, 2d, 3d, image, volume, mapping 36 9
  • 4.5
4.5 | 6 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 14 1
  • 4.0
4.0 | 1 rating
Comments and Ratings by Jimmy View all
Updated File Comments Rating
14 May 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

"collapse_nii_scan" is used to integrate multiple single-volume NIfTI or ANALYZE files into one multiple-volume NIfTI file. In your case, if you want to concatenate two 4D NIfTI images into one 4D NIfTI images, you should apply "expand_nii_scan" to your both 4D images. All volumes must be in the same folder, and make sure the file name is correctly renamed (i.e. from 001~999 instead of 1~999). Then, apply "collapse_nii_scan" to all those expanded volumes in the specific folder, and you will get a concatenated 4D NIfTI image file.

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

Hi Zhi:

"collapse_nii_scan.m" will do the job.

Hi Samiy:

This tool can not be used to extract spinal cord. However, once you extracted it and saved into another Analyze/NIfTI file, this tool can load the data into MATLAB for further processing.

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

Received the image, and it is a special RGB data type one. The nii.img ranges from 0 to 1 as usual, but the output value needs to be scaled by (glmax-glmin)+glmin.

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

Would you please send me this image, so I can take a look into it for you tomorrow afternoon.

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

Sure Mark. You need a reference image by the way, so you can see what will happen before and after you apply the transformation matrix. Here's the example:

1. Download "avg152T1_RL_nifti.nii" from NIfTI site. I use it as reference image.

2. View how the reference image looks like: nii=load_nii('avg152T1_RL_nifti.nii');
view_nii(nii);

3. Assume that I have a Transformation Matrix, which will let the reference image turn 30 degree counter-clockwise on XY plane, here will be the matrix: T=[cos(pi/6) -sin(pi/6) 0; sin(pi/6) cos(pi/6) 0; 0 0 1];

4. Get old_xyz from reference image: rl=load_untouch_nii('avg152T1_RL_nifti.nii');
old_xyz=[rl.hdr.hist.srow_x(1:3);rl.hdr.hist.srow_y(1:3);rl.hdr.hist.srow_z(1:3)];

5. Apply your transformation matrix, and save new_xyz into a new image: new_xyz=T*old_xyz; rl.hdr.hist.srow_x(1:3)=new_xyz(1,:); rl.hdr.hist.srow_y(1:3)=new_xyz(2,:); rl.hdr.hist.srow_z(1:3)=new_xyz(3,:); save_untouch_nii(rl, 'rl30.nii'); Now you already have the "rl30.nii", which is a transformed NIfTI image can be used anywhere.

6. In order to view this image using my toolbox, you need to reslice it: reslice_nii('rl30.nii', 'rl30b.nii'); Now, you can load and view the rotated image: rl30b=load_nii('rl30b.nii'); view_nii(rl30b);

Hopefully this answers your questions.

Comments and Ratings on Jimmy's Files View all
Updated File Comment by Comments Rating
25 Jun 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 Orestis

10 Jun 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 Hurley, Samuel

This is great. I replaced a hacked solution of my own that worked terribly with this in literally less that 5 minutes.

28 May 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 Coco Beltramini, Guilherme

14 May 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 Shen, Jimmy

"collapse_nii_scan" is used to integrate multiple single-volume NIfTI or ANALYZE files into one multiple-volume NIfTI file. In your case, if you want to concatenate two 4D NIfTI images into one 4D NIfTI images, you should apply "expand_nii_scan" to your both 4D images. All volumes must be in the same folder, and make sure the file name is correctly renamed (i.e. from 001~999 instead of 1~999). Then, apply "collapse_nii_scan" to all those expanded volumes in the specific folder, and you will get a concatenated 4D NIfTI image file.

14 May 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 Rodolphe

Hello, i tried to concatenate two 4D nifti images using collapse_nii_scan but that gives me an image with just 2 volumes. Am i missing something?

Top Tags Applied by Jimmy
image, 3d, format, medical, save
Files Tagged by Jimmy View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
07 Mar 2013 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 analyze, nifti, niftl, image, medical, isotropic 520 110
  • 4.64865
4.6 | 40 ratings
04 Dec 2012 geotiffwrite Write a 2D or 3D array to a single or multi-band GeoTIFF file Author: Jimmy Shen earth sciences, dem, earth science, gps, gis, image 57 20
  • 4.88889
4.9 | 9 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 23 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 affine, 2d, 3d, image, volume, mapping 36 9
  • 4.5
4.5 | 6 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 14 1
  • 4.0
4.0 | 1 rating

Contact us