Thank you so much!
I’m working on resting state fMRI (Phillips) from ADNI (http://adni.loni.usc.edu/data-samples/access-data/).
One subject has 6720 .dcm files and the dimension of one fMRI data is [64, 64, 48, 140].
I tried to use your script, however, I had some problems.
The error message said that my data has no “PerFrameFunctionalGroupsSequence”.
When I read dicom file through pydicom, the dicom file needs to be one 4D fMRI data?
PathDicom = "/home/rrt/MyProject/Dicom2/003_S_5019/2013_01_01/fMRI/"
lstFilesDCM = []
for dirName, subdirList, fileList in os.walk(PathDicom):
for filename in fileList:
if ".dcm" in filename.lower(): # check whether the file's DICOM
lstFilesDCM.append(os.path.join(dirName,filename))
ds = pydicom.dcmread(lstFilesDCM[0])
print(ds)
One of this results shows that "(0018, 0023) MR Acquisition Type CS: ‘2D’ ".
What should I do?
Is it possible to read 6720 files at once?
Or do I have to concatenate 6720 files to one 4D .dcm file? For this case, I have no information about the order of 6720 files.
Accordingly, there are no FrameContentSequence, PlanePositionSequence…