aramis-lab/clinicadl

Where is the roi mask??

BanDoong opened this issue · 1 comments

Hi,

Now I'm using your tool clinicadl.
I have some problem while training ROI.

I searched many area to find left hippocampus & right hippocampus masks, but can't.
How do I download the ROI masks??

The error messeges are bellow

Thank you for your answer in advance.
Best Regards,

joblib.externals.loky.process_executor._RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/joblib/externals/loky/process_executor.py", line 436, in _process_worker
r = call_item()
File "/opt/conda/lib/python3.8/site-packages/joblib/externals/loky/process_executor.py", line 288, in call
return self.fn(*self.args, **self.kwargs)
File "/opt/conda/lib/python3.8/site-packages/joblib/_parallel_backends.py", line 595, in call
return self.func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/joblib/parallel.py", line 262, in call
return [func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/joblib/parallel.py", line 262, in
return [func(*args, *kwargs)
File "/opt/conda/lib/python3.8/site-packages/clinicadl/extract/extract.py", line 152, in prepare_roi
check_mask_list(
File "/opt/conda/lib/python3.8/site-packages/clinicadl/extract/extract_utils.py", line 328, in check_mask_list
raise FileNotFoundError(
FileNotFoundError: The ROI 'rightHippocampusBox' does not correspond to a mask in the CAPS directory. The mask should follow the pattern caps_new/masks/tpl-MNI152NLin2009cSym/res-1x1x1_roi-rightHippocampusBox_mask.nii
. and contain 'desc-Crop' string.
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/conda/bin/clinicadl", line 8, in
sys.exit(cli())
File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/conda/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, *kwargs)
File "/opt/conda/lib/python3.8/site-packages/clinicadl/extract/extract_cli.py", line 285, in roi_cli
DeepLearningPrepareData(
File "/opt/conda/lib/python3.8/site-packages/clinicadl/extract/extract.py", line 173, in DeepLearningPrepareData
Parallel(n_jobs=n_proc)(delayed(prepare_roi)(file) for file in input_files)
File "/opt/conda/lib/python3.8/site-packages/joblib/parallel.py", line 1056, in call
self.retrieve()
File "/opt/conda/lib/python3.8/site-packages/joblib/parallel.py", line 935, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/opt/conda/lib/python3.8/site-packages/joblib/_parallel_backends.py", line 542, in wrap_future_result
return future.result(timeout=timeout)
File "/opt/conda/lib/python3.8/concurrent/futures/_base.py", line 444, in result
return self.__get_result()
File "/opt/conda/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
FileNotFoundError: The ROI 'rightHippocampusBox' does not correspond to a mask in the CAPS directory. The mask should follow the pattern caps_new/masks/tpl-MNI152NLin2009cSym/res-1x1x1_roi-rightHippocampusBox_mask.nii
. and contain 'desc-Crop' string.

Hello @BanDoong ,

Sorry for the late reply.

We don't provide the mask for the regions of interest you need. In fact the mask depend on the data you have and the region you need to extract.

Here, in the documentation, we give the exemple of left hippocampus & right hippocampus masks just for the files names. However you have to bring your own masks.

To make a mask you can simply use a brain atlas with the region of interest you need and binarize it.
Once you have your file, you have to properly name it and store it in the right location in the CAPS directory.

Do not hesitate if you have more questions,

Regards