Is there any way to import 4D perfusion NIFTI image to DSCMRIAnalysis?

Dear Dr. @fedorov, and Dr. @pieper,

Is there any way to import 4D perfusion NIFTI image to DSCMRIAnalysis?
I understand that currently, only DICOM images can be imported as input to DSCMRIAnalysis module.
However, I want to make some preprocessing (e.g. motion correction, registration) of DICOM images which will be saved as NIFTI files.
So I need to figure out if there is any way to import 4D perfusion NIFTI image to DSCMRIAnalysis.
If it’s impossible, then could you please tell me how to 1) correct motion artifacts and 2) register to T1 contrast enhanced images with NRRD images that were made from mpReviewPreprocessor.py in batch mode (i.e. in command lines) with appropriate Slicer modules?
Always appreciate your response.
Thank you in advance!

Best,
Kyu Sung

Please see the answer to this question in this post: How can I import NIFTI files to DSCMRIAnalysis module?

Dear Dr. @fedorov,

Thanks to your help, I’ve already tried @pieper’s python code, and it was successful in saving NIFTI files in NRRD files.
However, when I enter these NRRD files as inputs to DSCMRIAnalysis module, then it does not recognize frame identifying DICOM tag (error msg below).

image

I’ll send you a 4D DSC DICOM as well as NIFTI files in email.
Could you please fix this problem?
I always appreciate it.

All the best,
Kyu Sung

In the NRRD file you sent me, the attributes that are needed for the analysis are not initialized.

You should specify the following (this is how they are initialized if the DICOM series is imported directly from DICOM for the dataset you shared):

MultiVolume.FrameIdentifyingDICOMTagName:=Time
MultiVolume.FrameIdentifyingDICOMTagUnits:=ms

In the MultiVolumeImporter UI, you have place to initialize those:

image

You can also initialize those programmatically, as done here: MultiVolumeImporter/MultiVolumeImporter.py at master · fedorov/MultiVolumeImporter · GitHub

It does look like those attributes are not initialized from the GUI when import is done from 4D NIfTI, this is probably a bug that we should fix, but you can also fix this in your custom conversion code.

For now, I captured this in a bug report here: MV attributes not propagated from GUI when imported from 4D NIfTI · Issue #33 · fedorov/MultiVolumeImporter · GitHub

1 Like

Dear Dr. @fedorov,

Thank you so much for your kind information.
I managed to add some lines for the code, and the following result is acquired.

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):
importer = MultiVolumeImporter.MultiVolumeImporterWidget()

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

importer.read4DNIfTI(mvNode, path1+filename)
mvNode.SetAttribute(‘MultiVolume.FrameIdentifyingDICOMTagName’,‘Time’)
mvNode.SetAttribute(‘MultiVolume.FrameIdentifyingDICOMTagUnits’,‘ms’)
mvNode.SetAttribute(‘MultiVolume.DICOM.FlipAngle’,‘1.00’)
mvNode.SetAttribute(‘MultiVolume.DICOM.EchoTime’,‘1.00’)
mvNode.SetAttribute(‘MultiVolume.DICOM.RepetitionTime’,‘1.00’)
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()

(I’ve set all the additional information such as FlipAngle, EchoTime, and RepititionTime as ‘1.00’, which is default values of MultiVolumeImporter GUI.)


(Timing: values are seemed to be multiples of 0.00155, i.e. 0.00155 x 0, 1, 2, …, 95, which is the number of time points)

However, the “Timing:” seems a bit different from what I’ve got from the mpReviewPreprocessor.py.


(Timing:0,1,2,3,4,)

The resultant CBV map obtained from DSCMRIAnalysis is attached below.

  1. with NRRD from read4DNIfTI
    image

  2. with NRRD from mpReviewPreprocessor.py
    image

I think 1), and 2) images are a bit different.
Do you think it’s the problem of setting the FlipAngle, EchoTime, and RepititionTime as ‘1.00’?
However, I’ve changed them to 90,40,1900, which are true values from DICOM header information, and it didn’t make any difference.
Thank you in advance!

All the best,
Kyu Sung

You should also initialize frame labels:

All of this metainformation is not populated when importing 4d NIFTI. If you know the correct timing of the acquisition, you should change the default value of 1.

You should also populate the relevant DICOM attributes if you know them.

1 Like