NIRALUser / DTIPlayground

An integrated framework for DWI Image QC and processing
MIT License
12 stars 2 forks source link

`DTIPlayground` errors on an ancient `DTIPrep` protocol file (adapting a `DTIPrep` protocol file?) #49

Closed jhlegarreta closed 1 year ago

jhlegarreta commented 1 year ago

Hi, thanks for developing and maintaining this tool.

I have installed the tool (dmriprep version 0.5.7) using pip install dtiplayground on my Ubuntu 22.04 machine, then started the tool with dmriplaygroundlab, (chose all default answer for asked questions when the tool has initialized). I have an inherited protocol XML file (attached; renamed to .xml.txt so allow me uploading it to GH) that I am supposed to use as a step in a processing pipeline. It was developed using DTIPrep back in the time.

The web GUI does not seem to allow me to upload any protocol file (or I do not see the option), so I decided to run the protocol from the command line with:

$ dmriprep run -i /path/to/myfile.nrrd -p /path/to/protocol.xml -o /path/to/output/

But the process fails showing 2 errors:

(...)
[2023-06-26-13-42-02]   Image - /path/to/myfile.nrrd loaded
[2023-06-26-13-42-06]   [DWI.loadImage] Processed time : 3.81s
[2023-06-26-13-42-06]   Exception occurred : string indices must be integers
Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.10/site-packages/dtiplayground/dmri/common/pipeline.py", line 218, in loadProtocols
    self.rawdata=_load_protocol(filename)
  File "/opt/anaconda3/lib/python3.10/site-packages/dtiplayground/dmri/common/pipeline.py", line 26, in _load_protocol
    res['io'].setdefault('num_threads',1)
TypeError: string indices must be integers

and

----------------------------------- QC Begins ----------------------------------------
[2023-06-26-13-42-06]   
[2023-06-26-13-42-06]   [Pipeline.runPipeline] begins ... 
[2023-06-26-13-42-06]   Execution ID : 41d2b08a-a32e-4214-838c-cf32306e057b
[2023-06-26-13-42-06]   {'config_dir': '/my/home/.niral-dti/dmriprep-0.5.7', 'input_image_paths': ['/path/to/myfile.nrrd'], 'protocol_path': '/path/to/protocol.xml', 'output_dir': '/path/to/output/', 'default_protocols': None, 'num_threads': 1, 'execution_id': '41d2b08a-a32e-4214-838c-cf32306e057b', 'baseline_threshold': 10, 'output_format': None, 'output_file_base': None, 'no_output_image': False, 'global_variables': {}}
[2023-06-26-13-42-06]   Checking runability ...
[2023-06-26-13-42-06]   [ERROR] Protocols are not set.
[2023-06-26-13-42-06]   Exception occurred in runPipeline Pipe line error
[2023-06-26-13-42-06]   Traceback (most recent call last):
[2023-06-26-13-42-06]     File "/opt/anaconda3/lib/python3.10/site-packages/dtiplayground/dmri/common/pipeline.py", line 379, in runPipeline
[2023-06-26-13-42-06]       self.checkRunnable()
[2023-06-26-13-42-06]     File "/opt/anaconda3/lib/python3.10/site-packages/dtiplayground/dmri/common/pipeline.py", line 335, in checkRunnable
[2023-06-26-13-42-06]       self.checkPipeline()
[2023-06-26-13-42-06]     File "/opt/anaconda3/lib/python3.10/site-packages/dtiplayground/dmri/common/pipeline.py", line 345, in checkPipeline
[2023-06-26-13-42-06]       raise Exception("Pipe line error")
[2023-06-26-13-42-06]   Exception: Pipe line error

Attached the complete output to the standard output.

I have noticed that:

Not sure whether the errors above are related to these things I am noticing.

How can I fix the above issues and/or use/adapt the protocol file to be used with DTIPlayground?

dtiplayground_issue_std_output_anon.txt protocol.xml.txt

scalphunters commented 1 year ago

DTIPrep protocol file cannot be used in DTIPlayground. It only depends on FSL/DTIPlaygroundTools. Slicer is not necessary. Basically you cannot use or adapt/convert old xml protocol file since pipelining information doesnt exist. You have to use DTIPrep for that file.

jhlegarreta commented 1 year ago

OK, thanks for the information @scalphunters. Then trying to debug the above errors is not worthwhile.

Unfortunately, I have also tried launching DTIPrep with little success: https://www.nitrc.org/forum/forum.php?thread_id=14428&forum_id=1188

We can keep the DTIPrep discussion on NITRC, and I will close this issue.