Operating system:Windows11
Slicer version:5.6
Expected behavior: run a python script using 3D slicer
Actual behavior: the 3D slicer source code give me a error
Firstly, I open the python script as a Pycharm Project, and I change the Python Interpreter (System Interpreter) to the D:/Slicer5.6.2/bin/PythonSlicer.exe, the path in 3D Slicer archive.
Secondly, I run the python script aforementioned.
Then, I encounter the error
"D:\Slicer 5.6.2\bin\PythonSlicer.exe" D:\Dataset_preprocess\TCIA_VS_SEG\data_conversion.py -i D:/Dataset/VS_SEG/ -o D:/Dataset/VS_SEG1/
No module named 'logic'
Traceback (most recent call last):
File "D:\Dataset_preprocess\TCIA_VS_SEG\data_conversion.py", line 48, in <module>
from DICOMLib import DICOMUtils
File "D:\Slicer 5.6.2\lib\Slicer-5.6\qt-scripted-modules\DICOMLib\__init__.py", line 1, in <module>
from .DICOMProcesses import *
File "D:\Slicer 5.6.2\lib\Slicer-5.6\qt-scripted-modules\DICOMLib\DICOMProcesses.py", line 38, in <module>
class DICOMProcess:
File "D:\Slicer 5.6.2\lib\Slicer-5.6\qt-scripted-modules\DICOMLib\DICOMProcesses.py", line 84, in DICOMProcess
def start(self, cmd: str, args: list[str]) -> qt.QProcess:
AttributeError: module 'qt' has no attribute 'QProcess'
Process finished with exit code 1
I use the public dataset from TCIA. The raw data includes
every patient’s T1 and T2 DICOM files, RT_Structure.dcmRT_Dose.dcmRT_Plan.dcm and metadata.csv
and tumor segmentation label contour.json
and T1toT2 and T2toT1 registration matrices inv_T1_LPS_to_T2_LPS.tfm or inv_T2_LPS_to_T1_LPS.tfm
In proprecessing raw data, Firstly, TCIA_data_convert_into_convenient_folder_structure.py makes the raw data to a convenient folder structure which puts the every patient’s T1 folder and T2 folder
Secondly, data_conversion.py converts the DICOM images and contour.json to NIFTI using the 3D Slicer. The error happens in this step.