Source code for Apps_TubeInspection

"""
This module defines the TubeInspection class, which handles tube inspection operations in a PyQt application.

Classes:
    - TubeInspection: A class for managing tube inspection operations.

Dependencies:
    - ShowResult: A module providing functionality to display various types of images.
"""
from ShowResult import ShowImageResult


[docs] class TubeInspection: """ TubeInspection class manages tube inspection operations in a PyQt application. Attributes: parent: Reference to the MainWindow of the application. show: Instance of ShowImageResult to display images. Methods: - __init__: Initializes the TubeInspection object. - tubeInspection: Performs tube inspection operations and displays the result. """ def __init__(self, MainWindow): self.parent = MainWindow self.show = ShowImageResult(self.parent)
[docs] def tubeInspection(self): """ Performs tube inspection operations and displays the result. If an image is available, it displays the original image and shows any associated annotations. """ if self.parent.image is None: pass else: image = self.parent.image.copy() self.show.showOriginalImage(image) if self.parent.ui.checkAnypoint.isChecked(): self.parent.anypoint.showPolygon() self.show.showPanoAnyImage(self.parent.angle) elif self.parent.ui.checkPanorama.isChecked(): self.parent.panorama.showOriginalPanorama() self.show.showPanoAnyImage() else: self.show.showResult(image)