Beispiel #1
0
    def test_vtk_progress_exception_masking(self):
        """Ensure progress events are not masking exceptions.
        """

        import vtk
        import vtkdevide

        def observer_progress(o, e):
            print "DICOM progress %s." % (str(o.GetProgress() * 100.0),)

        r = vtkdevide.vtkDICOMVolumeReader()
        r.AddObserver("ProgressEvent", observer_progress)

        try:
            r.Update()
        except RuntimeError, e:
            pass
Beispiel #2
0
    def __init__(self, module_manager):
        # call the constructor in the "base"
        ModuleBase.__init__(self, module_manager)

        # setup necessary VTK objects
        self._reader = vtkdevide.vtkDICOMVolumeReader()

        module_utils.setup_vtk_object_progress(self, self._reader,
                                               'Reading DICOM data')

        self._viewFrame = None

        self._fileDialog = None

        # setup some defaults
        self._config.dicomFilenames = []
        self._config.seriesInstanceIdx = 0
        self._config.estimateSliceThickness = 1

        # do the normal thang (down to logic, up again)
        self.sync_module_logic_with_config()
Beispiel #3
0
    def __init__(self, module_manager):
        # call the constructor in the "base"
        ModuleBase.__init__(self, module_manager)

        # setup necessary VTK objects
        self._reader = vtkdevide.vtkDICOMVolumeReader()

        module_utils.setup_vtk_object_progress(self, self._reader,
                                           'Reading DICOM data')
        

        self._viewFrame = None

        self._fileDialog = None

        # setup some defaults
        self._config.dicomFilenames = []
        self._config.seriesInstanceIdx = 0
        self._config.estimateSliceThickness = 1

        # do the normal thang (down to logic, up again)
        self.sync_module_logic_with_config()