KitwareMedical / SlicerQReads

Slicer-based implementation of QREADS medical image viewer used at Mayo Clinic
Other
2 stars 1 forks source link

Error getting DICOM header value (includes error output) #68

Closed spycolyf closed 3 years ago

spycolyf commented 3 years ago

The DICOM values don't appear in the SlicerQREADS title bar. Here in the error output...

Switching to temporary DICOM database: C:/Users/dvp01/AppData/Local/Temp/Slicer/20210416_213815_TempDICOMDatabase
True
Traceback (most recent call last):
  File "C:\ProgramData\NA-MIC\Slicer 4.11.20200930\lib\Slicer-4.11\qt-scripted-modules\DICOMLib\DICOMUtils.py", line 675, in getLoadablesFromFileLists
    loadablesByPlugin[plugin] = plugin.examine(fileLists)
  File "C:/SlicerQReads-0.1.0-2021-04-08-win-amd64/lib/SlicerQReads-4.13/qt-scripted-modules/DICOMGeAbusPlugin.py", line 43, in examine
    loadables += self.examineFiles(files)
  File "C:/SlicerQReads-0.1.0-2021-04-08-win-amd64/lib/SlicerQReads-4.13/qt-scripted-modules/DICOMGeAbusPlugin.py", line 53, in examineFiles
    detailedLogging = self.isDetailedLogging()
AttributeError: 'DICOMGeAbusPluginClass' object has no attribute 'isDetailedLogging'
DICOM Plugin failed: 'DICOMGeAbusPluginClass' object has no attribute 'isDetailedLogging'
Loading with imageIOName: GDCM
Specified database directory 'C:/Users/dvp01/Documents/SlicerDICOMDatabase' cannot be found
Unable to open DICOM database C:/Users/dvp01/Documents/SlicerDICOMDatabase
>>> 
Traceback (most recent call last):
  File "C:/SlicerQReads-0.1.0-2021-04-08-win-amd64/lib/SlicerQReads-4.13/qt-scripted-modules/QReads.py", line 240, in _update
    values = {QReadsLogic.DICOM_TAGS[tag]: value for tag, value in QReadsLogic.dicomTagValues(node).items()}
  File "C:/SlicerQReads-0.1.0-2021-04-08-win-amd64/lib/SlicerQReads-4.13/qt-scripted-modules/QReads.py", line 734, in dicomTagValues
    return QReadsLogic.DICOM_TAG_VALUES[instanceUIDs[0]]
KeyError: '1.3.12.2.1107.5.1.4.75850.30000020080813094591000072336'
jcfr commented 3 years ago
jcfr commented 3 years ago

After building the application on windows (based of 84386e02746cd2), I was not able to reproduce the problem.

Command used to start the application:

SlicerQReads.exe --python-code "from QReads import QReadsLogic; QReadsLogic.loadDICOMDataDirectory('C:/D/SQR-data/BadOrientation')"

Screenshot of interface with toolbar:

image

spycolyf commented 3 years ago

OK, this is the command I've been using:

C:
cd C:\SlicerQReads-0.1.0-2021-04-08-win-amd64
SlicerQReads.exe --python-code "folder='.\TestImageVolumes\TestCompressed'; import os; slicer.util.loadVolume(folder + '/' + os.listdir(folder)[0], {'singleFile': False})"

It loads images but does not display the info in the title bar

Your command works:

SlicerQReads.exe --python-code "from QReads import QReadsLogic; QReadsLogic.loadDICOMDataDirectory('C:/SlicerQReads-0.1.0-2021-04-08-win-amd64/TestImageVolumes/TestCompressed')"

... but does not load images with the relative path. I guess the database does not consider the current path.

But, this is good! Thanks!

spycolyf commented 3 years ago

Solved! :-)

jcfr commented 3 years ago

For future reference, the instructions to load data are in the README. See https://github.com/KitwareMedical/SlicerQReads#command-line-arguments