Hi, I am trying to import some DWI data into Slicer.
I have successfully done this in the past using .nrrd files. This new data is .nii and seems to load fine but in the Diffusion Brain Masking module it is not found as a potential Input DWI Volume, so cannot be used.
Do you know why this may not be working correctly, or if I have to go through any other steps first?
Thank you!
Hi!
Is it a .nii or a .nii.gz file? (I dont think it is possible to use “.nii” files, DWI data should not be converted to a single .nii file.)
For DWI data not in .nrrd format, you can use the DWIConvert module. Here you can either use the DICOMS or FSL files (.nii.gz).
To get the .nii.gz file, you can convert the DICOMs using dcm2niix (https://github.com/rordenlab/dcm2niix). But you could also directly convert to .nrrd (implemented in the newest build for dcm2niix as command-line option, not implemented in the GUI of mricrogl). Does that help?
Thanks, I have a lot of files and not really sure which I’m supposed to be using.
It’s NIH data from their online repository.
I have attached some screenshots of what I have. This is all in a folder labelled “dti”. I just want some kind of DWI file that I can input into Slicer to work on.
Any help would be much appreciated!
Is the raw data format stated somewhere where you downloaded the files? I think you need to work on the raw data (either corrected or uncorrected, dont know what correction that is…).
Thanks, I thought that but didn’t know how or which files!
This is the information I have for the data:
DTI (3 mm resolution): 498 datasets from 274 subjects
Expanded DTI (2.5 mm resolution): 193 datasets from 152 subjects
Diffusion-weighted images
Raw images (native resolution and orientation)
Processed/corrected images (motion and distortion corrected)
Reoriented to a standardized reference frame
Resampled to 2mm isotropic resolution
Tensor-derived quantities
Diffusion tensor elements computed from corrected images
Trace of diffusion tensor (equal to 3x mean
diffusivity)
Eigenvalues
Fractional anisotropy index
Lattice anisotropy index
Directionally encoded color (DEC) maps
This Diffusion Tensor Imaging (DTI) data release contains data collected with higher resolution (2.5mm)
acquisition protocol and data collected with lower resolution (3mm) or the “conventional” DTI protocol.
DTI data was sometimes collected in sessions that were separated from the other measure in time.
When this occurred, a visit number was assigned based on age and proximity to the other data
acquisitions. In some instances, the corresponding clinical/behavioral data for that visit number may be
unavailable.
For the low resolution DTI data, two sets of data are available for download; DTI release 1 (REL01)
contains datasets that were virtually artifact‐free and therefore did not need additional post‐processing
with artifact remediation strategies (85 scans from 62 unique subjects), while DTI release 2 (REL02)
contains all DTI data that passed set quality criteria (498 scans from 274 unique subjects).
The higher resolution, expanded DTI (eDTI) data includes low (b=0s/mm2) and high (b=1100s/mm2)
image volumes, but also includes a number of intermediate b‐values as well (b=100s/mm2, b=300s/mm2, b=500s/mm2, and b=800s/mm2). Up to nine (9) files of tensor derived quantities are included in the database: Directionally encoded color maps (DEC); Eigenvalues (EV) as 4D image file with volumes in the order of λ1, λ2, λ3; Fractional anisotropy (FA); Lattice index (LI); Relative anisotropy (RA); Trace of the diffusion tensor (TR) (equal to 3*Mean Diffusivity); Chi‐Squared map of the fitting (CS) – a measure of the goodness of fit of the tensor model; Outlier map (OUT) – indicates the percentage of data points identified as outliers and removed from the tensor fitting on a voxel‐by‐voxel basis; and Brain mask (MS).
I think the NIH researchers used the programme TORTOISE to convert the raw (presumably DICOM) data into the files that I have. I’ve attempted to look into using TORTOISE to open or convert what I have but have not really managed to progress anywhere with that.
What do you want to do with the data?
My guess would be that the “0001”,“0002”… files are DICOM files (or other…), but windows does not recognize the format, hence the weird datatype.
Try importing these files using dcm2nii or other converter software (all files for one subject) into nii.gz.
This should result in datafiles as well as bvalue and bvector files. (I cant find these in your folder structure, so you probably have to start from the raw data).
Thank you, I’ll give that a go!
I’m just wanting to look at the tractography of the brains and do some measurements of tracts. Ive done this with other data, but was just really struggling with the file structure here.
Try looking in the RAW_CPRRECTED folder. You want the raw data (DWI) with their corrections (eddy current etc.)
I have multiple folders of what I assume are DICOM files for each scan of each person. Would I be able to load these multiple folders into dcm2nii? I’ve not used this programme before
Maybe just try it out to see if the images are really DICOM.
dcm2nii searches DICOM files throughout subfolders, unless you say otherwise. So which files/folders are included depends on which folder you use as inputfolder.
You can use mricrogl if you are unfamiliar with the program and want to have a GUI for dcm2nii: https://www.nitrc.org/frs/?group_id=889
(but converting to .nrrd is not supported there yet, only .nii.gz)
Presuming you still have the DICOMs, the easiest solution is probably to use dcm2niix to export the DICOM’s to Slicer’s preferred NRRD format (use ‘-e y’ to export to this format).
Option 1:
install the SlicerDcm2nii
Option 2:
You will want to make sure you get the latest release of dcm2niix v1.0.20190410 as NRRD support is new. Assuming you have the latest version, you can run this command line option, which will export to NRRD and set the output filename to be the series number followed by the protocol name:
dcm2niix -e y -f %s_%p c:\dti04\1013
Option 3:
For the upcoming releases of MRIcroGL and MRIcron, you can go to the Import/ConvertDICOMtoNIfTI menu item and select NRRD from the “Output Format” pull down menu (choose either compressed or uncompressed NRRD). The new graphical interface allows you to select the different options, includes tooltips, remembers your preferences, and your selections build a command line that is also displayed. That way you can use the graphical interface all the time if you want, or use it to design a command line for your own scripts.
Thanks Chris!
For option #1, SlicerDCM2nii is available through the extension manager.
Thank you all for your suggestions!
I’ve only just now had a chance to actually implement your suggestions - I’m having difficulty opening DICOMs in MRIcroGL (other files that I know are definitely DICOMs). I’ve tried just dragging and dropping onto the main window and also tried using the dcm2nii converter within MRIcroGL with no success. Does anyone have any idea where I’m going wrong?
Thanks again!
Hi! If you use the nightly Slicer version we have a new dcm2nii module in the extension manager. It will load DICOM DWI data directly into Slicer. We’re working on a tutorial and in the meantime if you have questions please ask here.
Note the module requires your DWI to be the only data in its folder. There’s a DICOM patcher Module that can help with that. See a recent post on the forum about it.
Hi, I wonder if it’s possible to work with nifti format in Slicer as well? I encountered the same problem, the nifti file loaded is not detected in 3D sclicer. And sadly I have only nifti files at hand, no DICOM…
@R_Lin if you have a dwi file in nifti with bval and bvec files, you might be able to use this experimental loader. You’ll need to add the module to your module path or put it in the right directory and reload Slicer. Let us know if it works for you.
Thank you for your reply! That works! I also found there’s a DWIConvert tool in 3D slicer that does the trick too.