예제 #1
0
    def draw_inclusions_before(self):
        self.number_of_inclusions_draw = int(
            self.number_of_inclusions.toPlainText())
        self.size_of_inclusions_draw = int(
            self.size_of_inclusions.toPlainText())
        self.width_draw = int(self.width.toPlainText())
        self.height_draw = int(self.height.toPlainText())
        self.number_of_grains_draw = int(self.number_of_grains.toPlainText())

        if self.shape_square_check.isChecked():
            self.shape_square_check_bool = True
            self.shape_circular_check_bool = False
        else:
            self.shape_square_check_bool = False
            self.shape_circular_check_bool = True

        if self.von_neumann_check.isChecked():
            self.von_neumann_check_draw = True
            self.moore_check_draw = False
        else:
            self.von_neumann_check_draw = False
            self.moore_check_draw = True

        grain_grow2 = mm.Grain_grow()
        grain_grow2.draw_inc_before(
            self.number_of_inclusions_draw, self.size_of_inclusions_draw,
            self.shape_square_check_bool, self.shape_circular_check_bool,
            self.width_draw, self.height_draw, self.number_of_grains_draw,
            self.von_neumann_check_draw, self.moore_check_draw)
예제 #2
0
 def lab_2_validate(self):
     self.width_draw, self.height_draw, self.number_of_inclusions_draw, self.size_of_inclusions_draw, self.shape_square_check_bool, self.shape_circular_check_bool = self.lab_2_whole(
     )
     grain_grow = mm.Grain_grow()
     grain_grow.final_image_lab2(self.width_draw, self.height_draw,
                                 self.number_of_inclusions_draw,
                                 self.size_of_inclusions_draw,
                                 self.shape_square_check_bool,
                                 self.shape_circular_check_bool)
예제 #3
0
    def draw(self):

        self.width_draw = int(self.width.toPlainText())
        self.height_draw = int(self.height.toPlainText())
        self.number_of_grains_draw = int(self.number_of_grains.toPlainText())

        if self.von_neumann_check.isChecked():
            self.von_neumann_check_draw = True
            self.moore_check_draw = False
        else:
            self.von_neumann_check_draw = False
            self.moore_check_draw = True
        try:
            grain_grow = mm.Grain_grow()
            grain_grow.start(self.width_draw, self.height_draw,
                             self.number_of_grains_draw,
                             self.von_neumann_check_draw,
                             self.moore_check_draw)
        except:
            grain_grow = mm.Grain_grow()
            grain_grow.start(self.width_draw, self.height_draw,
                             self.number_of_grains_draw,
                             self.von_neumann_check_draw,
                             self.moore_check_draw)
예제 #4
0
    def lab3_draw1(self):
        self.draw1 = int(self.dp_grain_ID.toPlainText())
        self.draw2 = int(self.dp_grain_number.toPlainText())
        self.width_draw = int(self.width.toPlainText())
        self.height_draw = int(self.height.toPlainText())
        self.number_of_grains_draw = int(self.number_of_grains.toPlainText())
        if self.von_neumann_check.isChecked():
            self.von_neumann_check_draw = True
            self.moore_check_draw = False
        else:
            self.von_neumann_check_draw = False
            self.moore_check_draw = True

        grain_grow3 = mm.Grain_grow()
        grain_grow3.draw_1st_phase(self.draw1, self.draw2, self.width_draw,
                                   self.height_draw,
                                   self.number_of_grains_draw,
                                   self.von_neumann_check_draw,
                                   self.moore_check_draw)
예제 #5
0
 def lab5_draw2(self):
     grain_grow = mm.Grain_grow()
     grain_grow.lab5_2_draw()