-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-operative segmentation not detecting manually-set sequence type (T1-CE) #74
Comments
@ft-zhang Not sure what the issue is, but @dbouget should be able to assist you. I observed that anaconda seems to be used instead of the Python interpreter bundled with Raidionics. That was surprising to me. Have you seen something like this before @dbouget? Windows is kind of strange with its Path variable. Maybe there is something wrong with our PyInstaller setup? I have previously seen that if two Python versions are on the same build machine, both are bundled with. Maybe not related but PyInstaller Spec file might have a solution for this. EDIT: It might be that the local Python is used when you spin a new subprocess! That would made a lot of sense as this is outside PyInstaller's control. After Installation, is the Python version inside the raidionics.exe file or outside of it? If outside, I think we have a solution for this :] |
Sorry -- forgot to add that I am not using the Windows executable but a conda environment running main.py. Thanks again for your help. |
Which If you try to run Raidionics from source, you have to remember that Raidionics only works for a very specific configuration! If you want to do this, you need to use Python 3.8 (and 3.8 only), you have to use the basic Python and not Python from Anaconda. You also have to follow these installation steps as seen here (or at least you should to ensure that everything works fine): For any other use, please download the installer of Raidionics for Windows from here: And then run the program as you would with any other software. No need to run from python directly, unless you have very specific requirements on what you are trying to do. If so, I would likely to know more what you are trying to do, because it might be that Raidionics already supports this :] |
Thank you @andreped for your continued attention and support. I am indeed running from source by installing the Raidionics dependencies manually then running More broadly -- I would like to be able to programmatically deploy Raidionics segmentation/other tools as part of a pipeline/workflow, and not have to use the GUI. Guidance on this front would also be appreciated. Thank you again! |
Hi @ft-zhang, Running Raidionics without GUIIf you are willing to integrate the processing from Raidionics without the need for the GUI, then I recommend you directly look into this repository. You will find several notebook tutorials to get started which are also available on Colab. Here is the example for running a preoperative segmentation model, on Github and Colab Debugging the missing radiological volume errorSince you will be running the Python code, you can set break points along the way. I would recommend to set one here, so that you can investigate the content (i.e., MRI volumes and annotations) associated with the current patient to be processed. If you want to investigate how a folder is parsed to populate a PatientStructure, which could explain why the T1-CE volume is not properly found or associated as T1-CE, you can set a break point here. Let me know if it helped identifying the issue! |
Very similar error, but different situation. I have just set up Raidionincs on a Mac Book Pro (Apple M2 Pro chip, Sonoma 14.5) and am trying to run the test case using the GUI. Downloaded Case27-Flair.nii and Case27-T1.nii, set sequence type to T1-CE and tried to run the pre-operative segmentation(Note: in YouTube tutorial, is says to run glioblastoma model and in Github notes is says meningioma--I have tried both). Fails with following message: File "raidionicsrads/Pipelines/SegmentationStep.py", line 71, in setup Loading of the files seemed to well and patient was saved in ~/.raidionics/patients/name |
Hi @Bayesianworld, The provided test-case images are compatible with either the glioblastoma or meningioma model. The meningioma model is simply "faster" to run because it does not require the segmentation of the brain to happen beforehand. You could try letting Raidionics identify itself the MR sequence for each provided input by leaving the following box unticked: You can load the two images from wherever on your machine, it should not pose any problem indeed. What I would recommend is to try running the following:
|
Thanks for the quick reply, but still no luck. Here is most of the log file: |
Your advice to unblock "Use manual MRI sequences" worked. The test case then proceeded as advertised. Thanks |
Describe the bug
Uploading my own T1-CE .nii and performing pre-operative segmentation yields an error "No radiological volume for {'timestamp': 0, 'sequence': 'T1-CE', 'labels': None, 'space': {'timestamp': 0, 'sequence': 'T1-CE'}}" even after manually setting the sequence type to T1-CE. This behaviour does not appear with the approved example data.
Computer settings:
To Reproduce
Error messages
Note -- filename anonymized in error output below
DEBUG:root:New patient creation requested.
INFO:root:Output patient directory set to: C:\Users\frede.raidionics\patients\temp_patient
INFO:root:Renamed current output folder to: C:\Users\frede.raidionics\patients\melody_montano
DEBUG:root:Active patient uid changed from None to 84275.
DEBUG:root:Loading patient 84275 from memory.
INFO:root:New data file imported: 7065_02216760_2019-06-13_ANON_t1_vibe_tra_p2_FS_STRAIGHT
DEBUG:root:Unsaved changes - Patient object expanded with new volumes.
INFO:root:[MRISeriesLayerWidget] Visibility toggled to True for 7065_02216760_2019-06-13_ANON_t1_vibe_tra_p2_FS_STRAIGHT
DEBUG:root:Unsaved changes - MRI volume sequence changed to T1-CE
INFO:root:Starting pipeline process for task: preop_segmentation.
INFO:root:Starting pipeline process for patient 84275 and task preop_segmentation.
INFO:root:Saving patient results in: C:\Users\frede.raidionics\patients\melody_montano
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): github.com:443
DEBUG:urllib3.connectionpool:https://github.com:443 "GET /raidionics/Raidionics-models/releases/download/1.2.0/raidionics_cloud_models_list_github.csv HTTP/1.1" 302 0
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): objects.githubusercontent.com:443
DEBUG:urllib3.connectionpool:https://objects.githubusercontent.com:443 "GET /github-production-release-asset-2e65be/601122702/e623363f-d633-4134-ad39-0a9a03cdbd92?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240229%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240229T065226Z&X-Amz-Expires=300&X-Amz-Signature=aefbb8d3a2372378dbf32dbc8ca1e6800d641146b8cd16eaea3dfd43cf0dd3b4&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=601122702&response-content-disposition=attachment%3B%20filename%3Draidionics_cloud_models_list_github.csv&response-content-type=application%2Foctet-stream HTTP/1.1" 200 1754
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): github.com:443
DEBUG:urllib3.connectionpool:https://github.com:443 "GET /raidionics/Raidionics-models/releases/download/1.2.0/raidionics_cloud_models_list_github.csv HTTP/1.1" 302 0
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): objects.githubusercontent.com:443
DEBUG:urllib3.connectionpool:https://objects.githubusercontent.com:443 "GET /github-production-release-asset-2e65be/601122702/e623363f-d633-4134-ad39-0a9a03cdbd92?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240229%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240229T065226Z&X-Amz-Expires=300&X-Amz-Signature=aefbb8d3a2372378dbf32dbc8ca1e6800d641146b8cd16eaea3dfd43cf0dd3b4&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=601122702&response-content-disposition=attachment%3B%20filename%3Draidionics_cloud_models_list_github.csv&response-content-type=application%2Foctet-stream HTTP/1.1" 200 1754
C:\Users\frede\anaconda3\Lib\site-packages\paramiko\transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
ERROR:root:Pipeline process for patient 84275, for task preop_segmentation failed with:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Users\frede\anaconda3\Lib\site-packages\raidionicsrads\Pipelines\SegmentationStep.py", line 71, in setup
raise ValueError("No radiological volume for {}.".format(input_json))
ValueError: No radiological volume for {'timestamp': 0, 'sequence': 'T1-CE', 'labels': None, 'space': {'timestamp': 0, 'sequence': 'T1-CE'}}.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\frede\anaconda3\Lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "C:\Users\frede\anaconda3\Lib\multiprocessing\pool.py", line 48, in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^
File "C:\Research\fgs\segmentation\raidionics\Raidionics-master\utils\backend_logic.py", line 187, in run_pipeline_wrapper
run_rads(params[0], params[1])
File "C:\Users\frede\anaconda3\Lib\site-packages\raidionicsrads\compute.py", line 30, in run_rads
patient_parameters = pip.execute(patient_parameters=patient_parameters)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\frede\anaconda3\Lib\site-packages\raidionicsrads\Pipelines\PipelineStructure.py", line 90, in execute
self._steps[s].setup(patient_parameters)
File "C:\Users\frede\anaconda3\Lib\site-packages\raidionicsrads\Pipelines\SegmentationStep.py", line 147, in setup
raise ValueError("[SegmentationStep] setup failed.")
ValueError: [SegmentationStep] setup failed.
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Research\fgs\segmentation\raidionics\Raidionics-master\utils\backend_logic.py", line 126, in run_pipeline
ret = result.get()[0]
^^^^^^^^^^^^
File "C:\Users\frede\anaconda3\Lib\multiprocessing\pool.py", line 774, in get
raise self._value
File "C:\Users\frede\anaconda3\Lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^
File "C:\Users\frede\anaconda3\Lib\multiprocessing\pool.py", line 48, in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^^
File "C:\Research\fgs\segmentation\raidionics\Raidionics-master\utils\backend_logic.py", line 187, in run_pipeline_wrapper
run_rads(params[0], params[1])
^^^^^^^^^^^^^^^^^
File "C:\Users\frede\anaconda3\Lib\site-packages\raidionicsrads\compute.py", line 30, in run_rads
patient_parameters = pip.execute(patient_parameters=patient_parameters)
^^^^^^^^^^^^^^^^^
File "C:\Users\frede\anaconda3\Lib\site-packages\raidionicsrads\Pipelines\PipelineStructure.py", line 90, in execute
self._steps[s].setup(patient_parameters)
^^^^^^^^^^^^^^^^^
File "C:\Users\frede\anaconda3\Lib\site-packages\raidionicsrads\Pipelines\SegmentationStep.py", line 147, in setup
raise ValueError("[SegmentationStep] setup failed.")
^^^^^^^^^^^^^^^^^
ValueError: [SegmentationStep] setup failed.
INFO:root:Saving patient results in: C:\Users\frede.raidionics\patients\melody_montano
Any assistance would be greatly appreciated!
The text was updated successfully, but these errors were encountered: