open-discussion > DTI Prep Default Protocol Error
Showing 1-8 of 8 posts
Display:
Results per page:
Mar 7, 2017  12:03 PM | Megan Shott
DTI Prep Default Protocol Error
Hello,

I am new to DTIPrep and trying to run the default protocol. After I load my NRRD file and click on the default protocol i get an error that the following programs have not been found (attached is the screen shot of the error): bet2; convertITKformats; ImageMath; DiffusionWeightedVolumeMasking; dtiestim; dtiprocess. 

It says to enter the path manually if necessary but i am not sure what that is referring to.

Thanks!
Attachment: Error.tiff
Mar 8, 2017  03:03 PM | Martin Styner
RE: DTI Prep Default Protocol Error
Hi Megan
Which platform is this (mac, linux) and are you calling DTIPrep through Slicer, if so how exactly? It looks like your paths have not been set up correctly (maybe an issue with the extension).
Martin
Mar 8, 2017  04:03 PM | Megan Shott
RE: DTI Prep Default Protocol Error
Hi Martin,

I am using a macOS Sierra and have DTIPrep as a standalone program.

I actually tried to add it as an extension in Slicer (version 4.6.2) but could not figure out the steps to do that. Do you know how to add it as an extension in that version or an older version? Or, is it best to use the standalone program? 

Also, after I ran the DTI protocol it does create  the QC results and new nrrd image but I cannot figure out how to convert it into a NIFTI format to then use in FSL. I receive an error "The only supported output type is . You may consider using allowLossyConversion option.However, use this option with caution! Conversion from images of a different type may cause data loss due to rounding or truncation." I tried running with allowing LossyConversion but it only saves a bvec and bval file but no NIFTI image. I am unsure if the issue I am having converting the image to FSL format is due to an issue within Slicer or because of the errors i am receiving using the DTIPrep. 

One other question, when I try to view the output to do the visual checking, i click on the 3D viewer mode but do not see a sphere with the distribution of direction of gradients that the manual talks about, it is just a grey screen. 


Any help on these steps would be much appreciated. I've been trying to go off the 'Quality Control Tutorial for DTI' but I am new to this pipeline and am not entirely sure I am doing it correctly. 

Thanks,

Megan
Mar 9, 2017  03:03 PM | Martin Styner
RE: DTI Prep Default Protocol Error
Hi Megan

1) platform: Did you compile it yourself or download from NITRC? Apart from the FSL tools (bet2), the other tools should have come with the DTIPrep download, so those tools should be there. You can specify in the protocol where this tools are located.

2) to Slicer or not to Slicer: Both options are equally workeable, but the nice thing about the Slicer extension is that those external tools should be all setup (apart from the FSL bet). It may though be that we need to update the extension and it's not compatible with the newest version of Slicer.

3) Those additional tools are necessary for a) mask creation and b) tensor computation. Thus, you will get the QCed DWI without the need for these tools DTIPrep did not find.

4) NIFTI: Best use the Slicer module DWIConverter (stand alone DWIConvert) , we use it regularly to take DTIPrep data into the FSL world (e.g. for probabilistic tractography).

5) Gradient sphere: did you enable the sphere and gradient display (click on the correspoding icons)?
Mar 10, 2017  04:03 AM | Megan Shott
RE: DTI Prep Default Protocol Error
Hi Martin,

Thank you for your response:

1. I downloaded DTIPrep version 1.2.7 from the NITRC website. I am able to input the FSL bet2 path but am not sure what paths to input for the other tools. Could you provide me with the directory paths for the other tools? When I look at the package contents I cannot tell where or what files to specify.

2. With Slicer version 4.6.2 I do not see an option to add the DTIPrep extension. If is not compatible then I assume specifying where to find the tools in the standalone version of DTIPrep is the way to go? Otherwise, what version of Slicer is compatible with DTIPrep that would allow me to add as an extension?

3/4. With the output file from DTIPrep I have been trying to figure out in Slicer how to convert the image into FSL format using the DWIConverter but receive several error message. I posted the error log on the Slicer community list but have not gotten any replies. Perhaps you could help me figure out the issue. The following is the errors I receive: 



Found CommandLine Module, target is /Applications/Slicer.app/Contents/lib/Slicer-4.6/cli-modules/DWIConvert
ModuleType: CommandLineModule
DWIConverter command line:
/Applications/Slicer.app/Contents/lib/Slicer-4.6/cli-modules/DWIConvert --conversionMode NrrdToFSL --inputVolume /var/folders/gm/5xjgw9fs1cd6w3f79y7bj72w0000gn/T/Slicer/GHAD_vtkMRMLDiffusionWeightedVolumeNodeB.nrrd --outputVolume /var/folders/gm/5xjgw9fs1cd6w3f79y7bj72w0000gn/T/Slicer/GHAD_vtkMRMLDiffusionWeightedVolumeNodeB.nrrd --inputDicomDirectory /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new --outputBValues /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new/bvals.bval --outputBVectors /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new/bvecs.bvec --outputDirectory /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new --smallGradientThreshold 0.2
DWIConverter standard error:
Error: ReadVolume: Unsupported source pixel type.
Input volume: unsigned_short
Output volume: short
The only supported output type is . You may consider using allowLossyConversion option.
However, use this option with caution! Conversion from images of a different type may cause data loss due to rounding or truncation.
DWIConverter standard error:
Error: ReadVolume: Unsupported source pixel type.
Input volume: unsigned_short
Output volume: short
The only supported output type is . You may consider using allowLossyConversion option.
However, use this option with caution! Conversion from images of a different type may cause data loss due to rounding or truncation.
DWIConverter completed with errors
Found CommandLine Module, target is /Applications/Slicer.app/Contents/lib/Slicer-4.6/cli-modules/DWIConvert
ModuleType: CommandLineModule
DWIConverter command line:
/Applications/Slicer.app/Contents/lib/Slicer-4.6/cli-modules/DWIConvert --conversionMode NrrdToFSL --inputVolume /var/folders/gm/5xjgw9fs1cd6w3f79y7bj72w0000gn/T/Slicer/GHAD_vtkMRMLDiffusionWeightedVolumeNodeB.nrrd --outputVolume /var/folders/gm/5xjgw9fs1cd6w3f79y7bj72w0000gn/T/Slicer/GHAD_vtkMRMLDiffusionWeightedVolumeNodeD.nrrd --inputDicomDirectory /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new --outputBValues /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new/bvals.bval --outputBVectors /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new/bvecs.bvec --outputDirectory /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new --smallGradientThreshold 0.2
DWIConverter standard error:
Error: ReadVolume: Unsupported source pixel type.
Input volume: unsigned_short
Output volume: short
The only supported output type is . You may consider using allowLossyConversion option.
However, use this option with caution! Conversion from images of a different type may cause data loss due to rounding or truncation.
DWIConverter completed with errors
Found CommandLine Module, target is /Applications/Slicer.app/Contents/lib/Slicer-4.6/cli-modules/DWIConvert
ModuleType: CommandLineModule
DWIConverter command line:
/Applications/Slicer.app/Contents/lib/Slicer-4.6/cli-modules/DWIConvert --conversionMode NrrdToFSL --inputVolume /var/folders/gm/5xjgw9fs1cd6w3f79y7bj72w0000gn/T/Slicer/GHAD_vtkMRMLDiffusionWeightedVolumeNodeB.nrrd --outputVolume /var/folders/gm/5xjgw9fs1cd6w3f79y7bj72w0000gn/T/Slicer/GHAD_vtkMRMLDiffusionWeightedVolumeNodeD.nrrd --inputDicomDirectory /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new --outputBValues /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new/bvals.bval --outputBVectors /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new/bvecs.bvec --outputDirectory /Users/MEGAN/Documents/WORK/DataAnalyses/DTI/CWANAdol/CW_0044B_4/dicom_dti/new --smallGradientThreshold 0.2
DWIConverter standard error:
Error: ReadVolume: Unsupported source pixel type.
Input volume: unsigned_short
Output volume: short
The only supported output type is . You may consider using allowLossyConversion option.
However, use this option with caution! Conversion from images of a different type may cause data loss due to rounding or truncation.
DWIConverter completed with errors


I checked the "Lossy Conversion" option and it ran with no errors, but my output files that were saved included the .bvec and .bval file but no NIFTI file.

Do you have a list of steps to take to convert to NIFTI format with the pipeline you use for your FSL analyses? Originally I used DWIConverter to convert my DICOM images to NRRD. And then am trying to use the NRRD to FSL option with the output from DTIPrep.

5. I did enable the sphere and gradient display as the manual shows but there is just a blank screen when I click on 3d mode. When I switch back to MPR I see the gradient I am trying to view but then nothing when I go back to 3d view. 

One other question is about the default protocol values and how to determine whether I should use the default protocol or make any changes. A tutorial I found on the NITRC site says that more information on the default protocol is available on the site but i cannot find that information. 

I'm sorry for all the questions, I am definitely a novice with these programs and recently discovered them when I was trying to figure out how to increase reliability in longitudinal TBSS studies. 

Thank you for your help,

Megan
Apr 5, 2017  03:04 PM | Martin Styner
RE: DTI Prep Default Protocol Error
Hi Meghan
1) you have the newest version, that's good (though the Mac version has not been tested, so there may be issues).
2) re Slicer: we have not yet updated DTIPrep to the newest Slicer release (due to changes in every Slicer release, we need to modify/update the extension to remain compatible, which is quite a bit of a hassle). On linux Slicer 4.4 has the DTIPrep 1.2.7 extension (not sure about mac)
3) Looking at your output, I see an immediate issue. It seems like the output node is a NRRD and not a nitfti file. It can very well be that you cannot run DWIConverter within Slicer (as it will use by default a NRRD output), but rather need to run DWIConvert via the command line.  You can do that by using your Terminal, try the following in a Terminal:
/Applications/Slicer.app/Contents/lib/Slicer-4.5/cli-modules/DWIConvert --help
(assuming you installed the Slicer app in /Applications) . If that works, you can do the conversion via that command line command (which is what we are doing, though on linux).
5) I think the sphere display does not work on the Mac, we need to correct that.

6) default protocol: that one sets reasonable values, but we usually adopt the parameters by running it on sample data from a study and adjusting threshold up/down based on whether the QC was too strict or not strict enough.

hope this helps
Martin
Jan 24, 2019  11:01 AM | Franziska Baer
RE: DTI Prep Default Protocol Error
Dear Megan and Martin

I am working with DTI prep a short while now and I have a simular problem as Megan had a year ago.
After I transformed my Nifti/DICOM Datas into NRRD  without a problem I could run the Default protocol, but now I can not transform the nrrd back to nifti with 3DSlicer. When I try that I get this Error:

DWIConverter standard error:
Error: ReadVolume: Unsupported source pixel type.
Input volume: unsigned_short
Output volume: short
The only supported output type is . You may consider using allowLossyConversion option.
However, use this option with caution! Conversion from images of a different type may cause data loss due to rounding or truncation.

I just don't know why I got these Error and so i ask for your help.

Here some informations tu my data set:

diffusion weighting: 1
b-value: 1300 s/mm²
diffusion directions: 36
Phase encoding direction: p-a

Thank you for your help,

Franziska
Jan 25, 2019  04:01 AM | Martin Styner
RE: DTI Prep Default Protocol Error
This sounds exactly like the same issue that Megan had, but I am not sure whether she found a way to solve it. 

I am not sure why we do not encounter it in our linux workflow, but I can recreate it on the Mac. It has to do with the DWIConvert and it's issue if the NRRD file has type "unsigned short" rather than "short" (don't ask me why it should not be able convert "unsigned short" data). (So it's not really a DTIPrep issue but rather about DWIConvert)

There several ways around this:
a) hack the header: since you unlikely have values higher than 32k in your DWI data, you can simply change "unsigned short" to "short" in the header (for values from 0-32k the two datatypes are equivalent). Since the header is ASCII readable, you can just edit the nrrd file in an editor, I used "vi" and it worked like a charm.
b) you can convert rather than hack the file: there is neat swiss-army-knife-tool (it does a little bit of everything) specifically for nrrd data and that tool is called "unu" (http://teem.sourceforge.net/unrrdu/). It comes with Slicer on linux, but unfortunately not on Mac (don't know why). You can then use "unu convert" to convert the nrrd file from unsigned short to short.

hope this helps
Martin