Hi,
I export from IDL two .dat files which are 3D and 4D float matrices respectively.
I would like to save these .dat files in Nifti format or csv format but I don’t know how to do that.
I need to do some image-processing in Matlab. I tried many different ways to load the exported IDL .dat data in Matlab without success.
Thus, I thought to save the IDL output data in a different format. I read my .dat file in the format of a 3D matrix using the following code:
;Define image dimensions and file name
Image = ‘Mydata.dat’
Nx = 145
Ny = 145
Nt = 249
;specify the .dat file path
Path = ‘C:Users\’
;create an empty array
Data = fltarr(Nx,Ny,Nt)
openr, 1, path + Image
readu, 1, data
close, 1
After loading the data as a 3D matrix I would like to save it either in Nifti (.nii) format or csv. Any help would be greatly appreciated.
I am using IDL version 6.4.
Thank you in advanced!