I am trying use the below sample code from vscode , but getting the error captured below.
from DICOMLib import DICOMUtils
with DICOMUtils.TemporaryDICOMDatabase() as db:
DICOMUtils.importDicom(dicomDataDir, db)
patientUIDs = db.patients()
for patientUID in patientUIDs:
loadedNodeIDs.extend(DICOMUtils.loadPatientByUID(patientUID))
Error
No module named ‘logic’
3.9.10 (main, Jan 23 2025, 23:04:06) [MSC v.1942 64 bit (AMD64)]
Traceback (most recent call last):
File “c:\Users\praveen.selvaraj\Downloads\Slicer-5.6.2-Win\bin\import sys.py”, line 10, in
from DICOMLib import DICOMUtils
File “C:\Users\praveen.selvaraj\AppData\Local\slicer.org\Slicer 5.8.0\lib\Slicer-5.8\qt-scripted-modules\DICOMLib_init_.py”, line 1, in
from .DICOMProcesses import *
File “C:\Users\praveen.selvaraj\AppData\Local\slicer.org\Slicer 5.8.0\lib\Slicer-5.8\qt-scripted-modules\DICOMLib\DICOMProcesses.py”, line 38, in
class DICOMProcess:
File “C:\Users\praveen.selvaraj\AppData\Local\slicer.org\Slicer 5.8.0\lib\Slicer-5.8\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’