How to separate 3D .img file from 4D nii file?

Question:

I have 4D .nii fMRI data file. I want to separate header and image file (.img) and save them separately. I googled it but could not get a working code for this. Please share your knowledge if you have any codes available to you.

Asked By: Js541

||

Answers:

I have solved this issue. I am posting my solution here. 4D data means 3D image data plus 1 D header data. First I extracted all the image slices from 4D files. Then converted extracted images into .mat files. This was the requirement of my code.

Answered By: Js541
Categories: questions Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.