How can I import NIFTI files to DSCMRIAnalysis module?

Dear Dr. @pieper and Dr. @fedorov,

Thank you so much!
It works perfectly, and moreover, I think reading multiple DSC files in the folder works fine with the code below. (There are a few warnings, though.)

import os
import slicer
import MultiVolumeImporter

path1 = “/home/cndl/DSC/test/4d_nifti/”
path2 = “/home/cndl/DSC/test/nrrd/”
os.mkdir(path2)
list = os.listdir(path1)

for filename in sorted(list):
#[success, loadedVolumeNode] = slicer.util.loadVolume(path1+filename, returnNode=True) ## for 3D NIFTI
importer = MultiVolumeImporter.MultiVolumeImporterWidget()

mvNode = slicer.mrmlScene.CreateNodeByClass(‘vtkMRMLMultiVolumeNode’)
slicer.mrmlScene.AddNode(mvNode)

importer.read4DNIfTI(mvNode, path1+filename)
fn_ext = os.path.splitext(filename)
true_fn_ext = os.path.splitext(fn_ext[0])
slicer.util.saveNode(mvNode, path2+true_fn_ext[0]+“.nrrd”)

exit()

image

However, after I load these 3 NRRD files (test_DSC, test2_DSC, and TCGA-08-0524_DSC.nrrd) and enter as input to DSCMRIAnalysis module in command line, it does not recognize frame identifying DICOM tag (error msg below). When I enter just 1 NRRD file saved with the code above as an input file, same error msg pops up. Maybe this NRRD file is not the same NRRD file that I obtained using mpReviewPreprocessor.py (the post you answer is linked here)

image

Could you please fix this problem?
I always appreciate it.

All the best,
Kyu Sung