Project

General

Profile

Actions

Bug #1850

closed

Sprint #1835: Sprint20210825

Sprint #1836: Autoregistration

Sprint #1837: Bug Fixing

SPRINT20210825 - Update_Views Throws Error

Added by Peter Qian almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
28/08/2021
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

Summary

The program crashes after the user selects a 'Change Window' from the dropdown menu.

Steps to Reproduce

  1. Open Program
  2. Select Patient Image
  3. Change Window

Expected Results

Change the Window of the images.

Actual Results

Program crashes.

Additional Information

Source Code can be found here

https://github.com/Alamancy/OnkoDICOM/blob/PQ-branch/src/View/mainpage/MainPage.py

This code was implemented after implementation of image fusion.

    def update_views(self):
        """ 
        This function is a slot for signals to request the updating of the DICOM View and DVH tabs in order to reflect
        changes made by other components of the main window (for example, when a structure in the structures tab is
        selected, this method needs to be called in order for the DICOM view window to be updated to show the new
        region of interest.
        """ 
        self.image_fusion_view_single_view.update_view(color=True)
        self.image_fusion_view_view_axial.update_view(color=True)
        self.image_fusion_view_view_coronal.update_view(color=True)
        self.image_fusion_view_view_sagittal.update_view(color=True)

Files

Screenshot 2021-08-28 151314.png (70.5 KB) Screenshot 2021-08-28 151314.png Peter Qian, 28/08/2021 03:13 PM
Actions #2

Updated by Peter Qian almost 4 years ago

Output Results

(venv) E:\Coding Projects\OnkoDICOM-Alamancy-20-8>python main.py
E:\Coding Projects\OnkoDICOM-Alamancy-20-8\venv\lib\site-packages\fuzzywuzzy\fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
PDPI: 93.29868532778966
Multithreading with maximum 8 threads
QCoreApplication::exec: The event loop is already running
<class 'AttributeError'> 'MainWindow' object has no attribute 'image_fusion_view_single_view' <traceback object at 0x0000024893BFFC80>
Traceback (most recent call last):
  File "E:\Coding Projects\OnkoDICOM-Alamancy-20-8\src\Controller\ActionHandler.py", line 243, in handler
    self.windowing_handler(state, text_)
  File "E:\Coding Projects\OnkoDICOM-Alamancy-20-8\src\Controller\ActionHandler.py", line 309, in windowing_handler
    self.__main_page.update_views()
  File "E:\Coding Projects\OnkoDICOM-Alamancy-20-8\src\View\mainpage\MainPage.py", line 218, in update_views
    self.image_fusion_view_single_view.update_view(color=True)
AttributeError: 'MainWindow' object has no attribute 'image_fusion_view_single_view'

Actions #3

Updated by Joshua Thomas almost 4 years ago

Windowing has not been implemented for image fusion yet

Actions #4

Updated by Joshua Thomas almost 4 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

These fixes are on Jt-branch, but for specific fixes

line 239-243

# self.image_fusion_view_single_view.update_view(color=True)
if hasattr(self, 'image_fusion_view'):
            self.image_fusion_view_axial.update_view(color=True)
            self.image_fusion_view_coronal.update_view(color=True)
            self.image_fusion_view_sagittal.update_view(color=True)

Actions #5

Updated by Joshua Thomas almost 4 years ago

  • Parent task set to #1837
Actions

Also available in: Atom PDF