コード例 #1
0
 def setup_class(self):
     """ setup any state specific to the execution of the given class (which
     usually contains tests).
     """
     '''Create the GUI'''
     self.app = QApplication(sys.argv)
     oseg = lisa.organ_segmentation.OrganSegmentation()
     self.oseg_w = OrganSegmentationWindow(oseg) # noqa
コード例 #2
0
class LisaGUITest(unittest.TestCase):

    def setUp(self):
        '''Create the GUI'''
        self.app = QApplication(sys.argv)
        oseg = lisa.organ_segmentation.OrganSegmentation()
        self.oseg_w = OrganSegmentationWindow(oseg) # noqa
        # self.form = MargaritaMixer.MargaritaMixer()

    @attr('interactive')
    def test_click(self):
        # i5 = self.oseg_w.grid.itemAt(5)
        dcmdirw = self.oseg_w.uiw['dcmdir']
        QTest.mouseClick(dcmdirw, Qt.LeftButton)

    @attr('interactive')
    def test_lisa_run(self):
        # i5 = self.oseg_w.grid.itemAt(5)
        # dcmdirw = self.oseg_w.uiw['dcmdir']
        # QTest.mouseClick(dcmdirw, Qt.LeftButton)
        pass
        self.app.exec_()

    def test_zz_quit_gui(self):
        """
        Tests event of quit
        """
        self.assertTrue(self.oseg_w.quit(event=None))

    @attr('interactive')
    def test_split(self):
        self.oseg_w.oseg.load_data(r"C:\Users\miros\lisa_data\P09_cropped_portal_tree_labeled.pklz")
        self.app.exec_()
        # self.oseg_w.loadDataFile()

    @attr('interactive')
    def test_split_on_ircad(self):
        self.oseg_w.oseg.load_data(io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True))
        self.app.exec_()
        # self.oseg_w.loadDataFile()

    @attr('interactive')
    def test_relabel(self):
        self.oseg_w.oseg.load_data(io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True))
        self.oseg_w.ui_select_label("hura")
        self.app.exec_()

    def test_bodynavigation(self):
        self.oseg_w.oseg.load_data(io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True))
        self.oseg_w.ui_select_label("hura")
コード例 #3
0
ファイル: lisa_gui_test.py プロジェクト: Trineon/lisa
class LisaGUITest(unittest.TestCase):
    def setUp(self):
        """Create the GUI"""
        self.app = QApplication(sys.argv)
        oseg = lisa.organ_segmentation.OrganSegmentation()
        self.oseg_w = OrganSegmentationWindow(oseg)  # noqa
        # self.form = MargaritaMixer.MargaritaMixer()

    @attr("interactive")
    def test_click(self):
        # i5 = self.oseg_w.grid.itemAt(5)
        dcmdirw = self.oseg_w.uiw["dcmdir"]
        QTest.mouseClick(dcmdirw, Qt.LeftButton)

    def test_quit_gui(self):
        """
        Tests event of quit
        """
        self.assertTrue(self.oseg_w.quit(event=None))
コード例 #4
0
ファイル: lisa_gui_test.py プロジェクト: kunesj/lisa
class LisaGUITest(unittest.TestCase):
    def setUp(self):
        '''Create the GUI'''
        self.app = QApplication(sys.argv)
        oseg = lisa.organ_segmentation.OrganSegmentation()
        self.oseg_w = OrganSegmentationWindow(oseg)  # noqa
        # self.form = MargaritaMixer.MargaritaMixer()

    @attr('interactive')
    def test_click(self):
        # i5 = self.oseg_w.grid.itemAt(5)
        dcmdirw = self.oseg_w.uiw['dcmdir']
        QTest.mouseClick(dcmdirw, Qt.LeftButton)

    def test_quit_gui(self):
        """
        Tests event of quit
        """
        self.assertTrue(self.oseg_w.quit(event=None))
コード例 #5
0
class LisaGUITest(object):

    # def setUp(self):
    @classmethod
    def setup_class(self):
        """ setup any state specific to the execution of the given class (which
        usually contains tests).
        """
        '''Create the GUI'''
        self.app = QApplication(sys.argv)
        oseg = lisa.organ_segmentation.OrganSegmentation()
        self.oseg_w = OrganSegmentationWindow(oseg) # noqa
        # self.form = MargaritaMixer.MargaritaMixer()

    @classmethod
    def teardown_class(cls):
        """ teardown any state that was previously setup with a call to
        setup_class.
        """


    @pytest.mark.interactive
    def test_click(self):
        # i5 = self.oseg_w.grid.itemAt(5)
        dcmdirw = self.oseg_w.uiw['dcmdir']
        QTest.mouseClick(dcmdirw, Qt.LeftButton)

    @pytest.mark.interactive
    def test_lisa_run(self):
        # i5 = self.oseg_w.grid.itemAt(5)
        # dcmdirw = self.oseg_w.uiw['dcmdir']
        # QTest.mouseClick(dcmdirw, Qt.LeftButton)
        pass
        self.app.exec_()


    @pytest.mark.interactive
    def test_split(self):
        self.oseg_w.oseg.load_data(r"C:\Users\miros\lisa_data\P09_cropped_portal_tree_labeled.pklz")
        self.app.exec_()
        # self.oseg_w.loadDataFile()

    @pytest.mark.interactive
    def test_split_on_ircad(self):
        self.oseg_w.oseg.load_data(io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True))
        self.app.exec_()
        # self.oseg_w.loadDataFile()

    @pytest.mark.interactive
    def test_relabel(self):
        self.oseg_w.oseg.load_data(io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True))
        self.oseg_w.ui_select_label("hura")
        self.app.exec_()

    @pytest.mark.interactive
    def test_bodynavigation(self):
        self.oseg_w.oseg.load_data(io3d.datasets.join_path("medical", "orig", "3Dircadb1.1", "PATIENT_DICOM", get_root=True))
        self.oseg_w.ui_select_label("hura")

    def test_zz_quit_gui(self):
        """
        Tests event of quit
        """
        self.assertTrue(self.oseg_w.quit(event=None))
コード例 #6
0
 def setUp(self):
     '''Create the GUI'''
     self.app = QApplication(sys.argv)
     oseg = lisa.organ_segmentation.OrganSegmentation()
     self.oseg_w = OrganSegmentationWindow(oseg) # noqa