Import 2017-06-07 23:51:09: master 95e6cb26

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-03-04 09:27:28 master fea88892
Changeset

BUG: Do not attempt to create DICOM annotation if no local database exists

In case no local database has been created on the system, running test
"py_RSNAQuantTutorial" will fail because SliceViewAnnotation attempts
to use "slicer.dicomDatabase" object whereas non has been created. Error
like the following were reported:

551: Test using the PETCT module ... Traceback (most recent call last):
551: File "/path/to/lib/Slicer-4.4/qt-scripted-modules/DataProbeLib/SliceViewAnnotations.py", line 622, in updateCornerAnnotations
551: self.makeAnnotationText(caller)
551: File "/path/to/lib/Slicer-4.4/qt-scripted-modules/DataProbeLib/SliceViewAnnotations.py", line 832, in makeAnnotationText
551: self.makeDicomAnnotation(bgUid,fgUid)
551: File "/path/to/lib/Slicer-4.4/qt-scripted-modules/DataProbeLib/SliceViewAnnotations.py", line 901, in makeDicomAnnotation
551: backgroundDicomDic = self.extractDICOMValues(bgUid)
551: File "/path/to/lib/Slicer-4.4/qt-scripted-modules/DataProbeLib/SliceViewAnnotations.py", line 1078, in extractDICOMValues
551: value = slicer.dicomDatabase.instanceValue(uid,tag)

The steps to reproduce the problem independently of the test are the
following:

(1) clear Slicer settings:

$ rm -rf ~/.config/NA-MIC

(2) start Slicer

$ ./Slicer

(3) load PET_CT_pre-treatment.mrb that can be obtained after extracting the
zip archive available here: http://slicer.kitware.com/midas3/download?items=124185

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24014 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Modules/Scripted/DataProbe/DataProbeLib/SliceViewAnnotations.py Diff File