Пример #1
0
    def __init__(self, master):
        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)
        self.variables = AppVariables()

        widget_list = ["button_panel", "taser_image_panel", "pyplot_panel"]
        self.init_w_horizontal_layout(widget_list)

        # define panels widget_wrappers in master frame
        self.button_panel.set_spacing_between_buttons(0)
        self.taser_image_panel.variables.canvas_image_object = SarpyCanvasDisplayImage(
        )  # type: SarpyCanvasDisplayImage
        self.taser_image_panel.set_canvas_size(700, 400)
        self.taser_image_panel.rescale_image_to_fit_canvas = True

        # need to pack both master frame and self, since this is the main app window.
        master_frame.pack()
        self.pack()

        # bind events to callbacks here
        self.button_panel.fname_select.on_left_mouse_click(
            self.callback_initialize_canvas_image)
        self.button_panel.remap_dropdown.on_selection(self.callback_remap)
        self.button_panel.zoom_in.on_left_mouse_click(
            self.callback_set_to_zoom_in)
        self.button_panel.zoom_out.on_left_mouse_click(
            self.callback_set_to_zoom_out)
        self.button_panel.pan.on_left_mouse_click(self.callback_set_to_pan)
        self.button_panel.rect_select.on_left_mouse_click(
            self.callback_set_to_select)

        self.taser_image_panel.canvas.on_left_mouse_release(
            self.callback_left_mouse_release)
Пример #2
0
    def __init__(self, parent):
        # set the master frame
        AbstractWidgetPanel.__init__(self, parent)
        self.app_variables = AppVariables()
        widgets_list = ["image_canvas", "side_panel"]

        self.init_w_vertical_layout(widgets_list)

        self.side_panel.set_spacing_between_buttons(0)
        self.image_canvas.variables.canvas_image_object = SarpyCanvasDisplayImage(
        )
        self.image_canvas.set_canvas_size(600, 400)

        # set up event listeners
        self.side_panel.buttons.zoom_in.on_left_mouse_click(
            self.callback_set_to_zoom_in)
        self.side_panel.buttons.zoom_out.on_left_mouse_click(
            self.callback_set_to_zoom_out)

        self.image_canvas.canvas.on_left_mouse_click(
            self.callback_handle_left_mouse_click)
        self.image_canvas.canvas.on_left_mouse_release(
            self.callback_handle_left_mouse_release)

        self.side_panel.file_selector.set_fname_filters(["*.NITF", ".nitf"])
        self.side_panel.file_selector.select_file.on_left_mouse_click(
            self.callback_select_file)

        self.image_canvas.set_labelframe_text("Image View")
Пример #3
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)

        widgets_list = ["image_canvas", "fft_button_panel"]

        self.init_w_vertical_layout(widgets_list)

        self.fft_button_panel.set_spacing_between_buttons(0)
        self.image_canvas.variables.canvas_image_object = SarpyCanvasDisplayImage(
        )
        self.image_canvas.set_canvas_size(600, 400)

        # specify layout of widget_wrappers in master frame
        self.fft_button_panel.pack(side="bottom")
        self.image_canvas.pack(side="top")

        self.image_canvas.set_labelframe_text("FFT View")

        # set up event listeners
        self.fft_button_panel.select_data.on_left_mouse_click(
            self.callback_set_to_selection_tool)
        self.fft_button_panel.move_rect.on_left_mouse_click(
            self.callback_set_to_translate_shape)
        self.fft_button_panel.save_fft_image_as_png.on_left_mouse_click(
            self.callback_save_fft_panel_as_png)
        self.image_canvas.set_current_tool_to_selection_tool()

        self.fft_button_panel.n_pixels_horizontal.insert(
            0, str(int(self.image_canvas.canvas_width * 0.5)))
        self.fft_button_panel.n_steps.insert(0, str(20))
Пример #4
0
    def __init__(self, master):
        AbstractWidgetPanel.__init__(self, master)

        self.variables = AppVariables()
        self.pyplot_utils = PlotStyleUtils()
        widget_list = ["pyplot_canvas", "control_panel"]
        self.init_w_vertical_layout(widget_list)

        canvas_size_pixels = self.pyplot_canvas.canvas.figure.get_size_inches() * self.pyplot_canvas.canvas.figure.dpi

        self.control_panel.scale.config(length=canvas_size_pixels[0] * 0.75)
        self.variables.animation_related_controls = [self.control_panel.scale,
                                                     self.control_panel.rescale_y_axis_per_frame,
                                                     self.control_panel.animate,
                                                     self.control_panel.fps_entry,
                                                     self.control_panel.fps_label]

        self.control_panel.n_colors_label.set_text("n colors")
        self.control_panel.n_colors.set_text(self.pyplot_utils.n_color_bins)

        # set listeners
        self.control_panel.scale.on_left_mouse_motion(self.callback_update_from_slider)
        self.control_panel.rescale_y_axis_per_frame.on_selection(self.callback_set_y_rescale)
        self.control_panel.animate.on_left_mouse_click(self.callback_animate)
        self.control_panel.color_palette.on_selection(self.callback_update_plot_colors)
        self.control_panel.n_colors.on_enter_or_return_key(self.callback_update_n_colors)
        self.control_panel.n_colors.on_left_mouse_release(self.callback_spinbox_update_n_colors)

        self.hide_animation_related_controls()
Пример #5
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)

        controls = ["fname_select",
                    "zoom_in",
                    "zoom_out",
                    "pan",
                    "draw_line_w_drag",
                    "draw_line_w_click",
                    "draw_arrow_w_drag",
                    "draw_arrow_w_click",
                    "draw_rect_w_drag",
                    "draw_rect_w_click",
                    "draw_polygon_w_click",
                    "draw_point_w_click",
                    "select_existing_shape",
                    "modify_existing_shape",
                    "save_kml",
                    "color_selector",
                    "rect_select",
                    "update_rect_image",
                    "remap_dropdown"]

        self.init_w_box_layout(controls, 4, column_widths=20)

        self.remap_dropdown.update_combobox_values(["density",
                                                    "brighter",
                                                    "darker",
                                                    "high contrast",
                                                    "linear",
                                                    "log",
                                                    "pedf",
                                                    "nrl"])
        self.set_label_text("taser buttons")
Пример #6
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.select_data = basic_widgets.Button
        self.move_rect = basic_widgets.Button
        self.inv_fft = basic_widgets.Button

        self.n_pixels_label = basic_widgets.Label
        self.n_pixels_horizontal = basic_widgets.Entry
        self.n_steps_label = basic_widgets.Label
        self.n_steps = basic_widgets.Entry
        self.animate = basic_widgets.Button
        self.save_fft_image_as_png = basic_widgets.Button
        self.save_animation_as_gif = basic_widgets.Button
        self.animation_fps = basic_widgets.Entry

        widget_list = [
            "select_data", "move_rect", "inv_fft", "n_pixels_label",
            "n_pixels_horizontal", "n_steps_label", "n_steps", "animate",
            "save_fft_image_as_png", "save_animation_as_gif", "animation_fps"
        ]

        self.init_w_basic_widget_list(widget_list, 3, [3, 5, 3])
        self.set_label_text("fft select")

        self.n_pixels_label.config(text="n pixel sweep")
        self.n_steps_label.config(text="n steps")

        self.animation_fps.insert(0, "15")
Пример #7
0
 def __init__(self, parent):
     AbstractWidgetPanel.__init__(self, parent)
     widget_list = [
         "single_plot", "multi_plot", "animated_plot", "color_button"
     ]
     self.init_w_horizontal_layout(widget_list)
     self.set_label_text("plot demo buttons")
Пример #8
0
    def __init__(self, master):
        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)

        widgets_list = ["context_panel", "annotate_panel"]
        self.init_w_horizontal_layout(widgets_list)
        master_frame.pack()
        self.pack()

        self.variables = AppVariables()

        self.annotate_panel.annotate_dashboard.controls.disable_all_buttons()
        self.context_panel.context_dashboard.annotation_selector.disable_all_buttons(
        )
        self.context_panel.context_dashboard.buttons.disable_all_buttons()

        # set up context panel event listeners
        self.context_panel.context_dashboard.buttons.zoom_in.on_left_mouse_click(
            self.callback_context_set_to_zoom_in)
        self.context_panel.context_dashboard.buttons.zoom_out.on_left_mouse_click(
            self.callback_context_set_to_zoom_out)
        self.context_panel.context_dashboard.buttons.pan.on_left_mouse_click(
            self.callback_context_set_to_pan)
        self.context_panel.context_dashboard.buttons.select.on_left_mouse_click(
            self.callback_context_set_to_select)
        self.context_panel.context_dashboard.buttons.move_rect.on_left_mouse_click(
            self.callback_context_set_to_move_rect)
        self.context_panel.context_dashboard.file_selector.select_file.on_left_mouse_click(
            self.callback_context_select_file)
        self.context_panel.context_dashboard.annotation_selector.select_file.on_left_mouse_click(
            self.callback_content_select_annotation_file)

        self.context_panel.image_canvas.canvas.on_left_mouse_release(
            self.callback_context_handle_left_mouse_release)
        self.context_panel.image_canvas.canvas.on_mouse_wheel(
            self.callback_context_handle_mouse_wheel)

        # set up annotate panel event listeners
        self.annotate_panel.image_canvas.canvas.on_mouse_wheel(
            self.callback_handle_annotate_mouse_wheel)
        self.annotate_panel.image_canvas.canvas.on_left_mouse_click(
            self.callback_annotate_handle_canvas_left_mouse_click)
        self.annotate_panel.image_canvas.canvas.on_left_mouse_release(
            self.callback_annotate_handle_left_mouse_release)
        self.annotate_panel.image_canvas.canvas.on_right_mouse_click(
            self.callback_annotate_handle_right_mouse_click)

        self.annotate_panel.annotate_dashboard.controls.draw_polygon.on_left_mouse_click(
            self.callback_set_to_draw_polygon)
        self.annotate_panel.annotate_dashboard.controls.popup.on_left_mouse_click(
            self.callback_annotation_popup)
        self.annotate_panel.annotate_dashboard.controls.pan.on_left_mouse_click(
            self.callback_annotate_set_to_pan)
        self.annotate_panel.annotate_dashboard.controls.select_closest_shape.on_left_mouse_click(
            self.callback_set_to_select_closest_shape)
        self.annotate_panel.annotate_dashboard.controls.delete_shape.on_left_mouse_click(
            self.callback_delete_shape)

        self.annotate_panel.image_canvas.set_labelframe_text("Image View")
Пример #9
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.zoom_in = basic_widgets.Button
        self.zoom_out = basic_widgets.Button

        widget_list = ["zoom_in", "zoom_out"]
        self.init_w_horizontal_layout(widget_list)
        self.set_label_text("wake tool buttons")
Пример #10
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)

        self.init_w_vertical_layout(["fname_select",
                                     "pan",
                                     "display_ortho"])

        self.set_label_text("ortho buttons")
Пример #11
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)

        self.image_canvas = ImageCanvas(parent)
        self.image_canvas.set_canvas_size(600, 400)

        # specify layout of widget_wrappers in master frame
        self.image_canvas.pack(side="right")

        # set up event listeners
        self.image_canvas.set_labelframe_text("adjusted view")
Пример #12
0
    def __init__(
            self,
            parent,
            main_app_variables,  # type: AppVariables
    ):
        self.label_schema = main_app_variables.label_schema
        self.main_app_variables = main_app_variables
        self.variables = AppVariables

        self.parent = parent
        self.master_frame = tkinter.Frame(parent)
        AbstractWidgetPanel.__init__(self, self.master_frame)
        widget_list = [
            "parent_types", "thing_type_label", "thing_type", "comment_label",
            "comment", "confidence_label", "confidence", "reset", "submit"
        ]
        self.init_w_basic_widget_list(widget_list, 5, [1, 2, 2, 2, 2])
        self.set_label_text("annotate")

        # set up base types for initial dropdown menu
        self.setup_main_parent_selections()
        self.setup_confidence_selections()

        # set label text
        self.thing_type_label.set_text("object type")
        self.comment_label.set_text("comment")
        self.confidence_label.set_text("confidence")

        self.master_frame.pack()
        self.pack()

        self.parent_types.set_text(self.variables.parent_types_main_text)

        # set up callbacks
        self.thing_type.on_selection(self.callback_update_selection)
        self.reset.on_left_mouse_click(self.callback_reset)
        self.submit.on_left_mouse_click(self.callback_submit)

        # populate existing fields if editing an existing geometry
        previous_annotation = self.main_app_variables.canvas_geom_ids_to_annotations_id_dict[
            str(self.main_app_variables.current_canvas_geom_id)]
        if previous_annotation.properties:
            object_type = previous_annotation.properties.elements[0].label_id
            comment = previous_annotation.properties.elements[0].comment
            confidence = previous_annotation.properties.elements[0].confidence

            self.thing_type.set(object_type)
            self.thing_type.configure(state="disabled")
            self.comment.set_text(comment)
            self.confidence.set(confidence)
        else:
            self.thing_type.set("")
            self.comment.set_text("")
            self.confidence.set("")
Пример #13
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.zoom_in = basic_widgets.Button
        self.zoom_out = basic_widgets.Button
        self.pan = basic_widgets.Button
        self.select = basic_widgets.Button
        self.move_rect = basic_widgets.Button

        widget_list = ["zoom_in", "zoom_out", "pan", "select", "move_rect"]
        self.init_w_horizontal_layout(widget_list)
        self.set_label_text("controls")
Пример #14
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.decimation_label = basic_widgets.Label
        self.decimation_val = basic_widgets.Entry

        widget_list = ["decimation_label", "decimation_val"]

        self.init_w_box_layout(widget_list, n_columns=2, column_widths=[20, 10])
        self.set_label_text("info panel")

        self.decimation_label.config(text="decimation")
        self.decimation_val.config(state='disabled')
Пример #15
0
    def __init__(self, parent):
        # set the master frame
        AbstractWidgetPanel.__init__(self, parent)
        self.app_variables = AppVariables()
        widgets_list = ["image_canvas", "annotate_dashboard"]

        self.init_w_vertical_layout(widgets_list)

        self.annotate_dashboard.set_spacing_between_buttons(0)
        self.image_canvas.variables.canvas_image_object = SarpyCanvasDisplayImage(
        )
        self.image_canvas.set_canvas_size(600, 400)
Пример #16
0
    def __init__(self, parent):
        # TODO: there is bad super behavior going on here? Wrong parent?
        AbstractWidgetPanel.__init__(self, parent)

        self.image_canvas = ImageCanvas(parent)
        self.image_canvas.set_canvas_size(600, 400)

        # specify layout of widget_wrappers in master frame
        self.image_canvas.pack(side="right")

        # set up event listeners
        self.image_canvas.set_labelframe_text("adjusted view")
Пример #17
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.rect_draw = basic_widgets.Button
        self.line_draw = basic_widgets.Button
        self.point_draw = basic_widgets.Button
        self.zoom_in = basic_widgets.Button
        self.zoom_out = basic_widgets.Button
        self.foreground_color = basic_widgets.Button

        widget_list = ["line_draw", "point_draw", "foreground_color", "zoom_in", "zoom_out"]
        self.init_w_box_layout(widget_list, 3, column_widths=8, row_heights=2)
        self.set_label_text("wake tool buttons")
Пример #18
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)

        self.init_w_vertical_layout([
            "fname_select", "zoom_in", "zoom_out", "pan", "rect_select",
            "remap_dropdown"
        ])

        self.remap_dropdown.update_combobox_values([
            "density", "brighter", "darker", "high contrast", "linear", "log",
            "pedf", "nrl"
        ])
        self.set_label_text("taser buttons")
Пример #19
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        tkinter.LabelFrame.__init__(self, parent)
        self.config(borderwidth=2)
        self.fname = None

        widget_list = ["select_file", "fname_label"]
        self.init_w_horizontal_layout(widget_list)
        self.set_label_text("file selector")
        self.fname_filters = [('All files', '*')]
        # in practice this would be overridden if the user wants more things to happen after selecting a file.
        self.select_file.on_left_mouse_click(self.event_select_file)
        self.initialdir = os.path.expanduser("~")
Пример #20
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.pan = basic_widgets.Button  # type: basic_widgets.Button
        self.draw_polygon = basic_widgets.Button  # type: basic_widgets.Button
        self.select_closest_shape = basic_widgets.Button  # type: basic_widgets.Button
        self.delete_shape = basic_widgets.Button  # type: basic_widgets.Button
        self.popup = basic_widgets.Button  # type: basic_widgets.Button

        widget_list = [
            "pan", "draw_polygon", "select_closest_shape", "delete_shape",
            "popup"
        ]
        self.init_w_horizontal_layout(widget_list)
        self.set_label_text("annotate controls")
Пример #21
0
    def __init__(self, master):
        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)

        widgets_list = ["zoomer_panel", "fft_panel", 'adjusted_view_panel']
        self.init_w_horizontal_layout(widgets_list)
        master_frame.pack()
        self.pack()

        self.app_variables = AppVariables()
        self.zoomer_panel.image_canvas.canvas.on_left_mouse_release(self.callback_handle_zoomer_left_mouse_release)
        self.fft_panel.fft_button_panel.inv_fft.on_left_mouse_click(self.callback_get_adjusted_image)
        self.fft_panel.fft_button_panel.animate.on_left_mouse_click(self.callback_animate_horizontal_fft_sweep)
        self.fft_panel.fft_button_panel.save_animation_as_gif.on_left_mouse_click(self.callback_save_animation)
Пример #22
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        widget_list = ["color_palette_label", "color_palette", "n_colors_label", "n_colors",
                       "scale",
                       "rescale_y_axis_per_frame",
                       "fps_label", "fps_entry", "animate"]

        self.init_w_basic_widget_list(widget_list, 4, [4, 1, 1, 3])
        self.color_palette.update_combobox_values(PYPLOT_UTILS.get_all_palettes_list())
        self.n_colors.config(from_=0)
        self.n_colors.config(to=10)
        self.scale.set(0)
        self.rescale_y_axis_per_frame.update_combobox_values([SCALE_Y_AXIS_PER_FRAME_TRUE, SCALE_Y_AXIS_PER_FRAME_FALSE])
        self.fps_label.set_text("fps")
        self.fps_entry.set_text("30")
Пример #23
0
    def __init__(self, parent):
        # set the master frame
        AbstractWidgetPanel.__init__(self, parent)
        self.app_variables = AppVariables()
        widgets_list = ["image_canvas", "context_dashboard"]

        self.init_w_vertical_layout(widgets_list)

        self.context_dashboard.set_spacing_between_buttons(0)
        self.image_canvas.variables.canvas_image_object = SarpyCanvasDisplayImage(
        )
        self.image_canvas.set_canvas_size(600, 400)

        self.context_dashboard.file_selector.set_fname_filters(
            ["*.NITF", ".nitf"])
        self.image_canvas.set_labelframe_text("Image View")
Пример #24
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.canvas_distance_label = basic_widgets.Label
        self.canvas_distance_val = basic_widgets.Entry
        self.pixel_distance_label = basic_widgets.Label
        self.pixel_distance_val = basic_widgets.Entry
        self.geo_distance_label = basic_widgets.Label
        self.geo_distance_val = basic_widgets.Entry

        widget_list = ["canvas_distance_label", "canvas_distance_val",
                       "pixel_distance_label", "pixel_distance_val",
                       "geo_distance_label", "geo_distance_val"]
        self.init_w_box_layout(widget_list, n_columns=2, column_widths=[20, 10])
        self.set_label_text("info panel")

        self.canvas_distance_val.config(state='disabled')
        self.pixel_distance_val.config(state='disabled')
        self.geo_distance_val.config(state='disabled')
Пример #25
0
    def __init__(self, master):
        # set the master frame
        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)
        widget_list = ["pyplot_panel", "button_panel"]
        self.init_w_vertical_layout(widget_list)

        # need to pack both master frame and self, since this is the main app window.
        master_frame.pack()
        self.pack()

        # set up event listeners
        self.button_panel.single_plot.on_left_mouse_click(self.callback_single_plot)
        self.button_panel.multi_plot.on_left_mouse_click(self.callback_muli_plot)
        self.button_panel.animated_plot.on_left_mouse_click(self.callback_animated_plot)
        self.button_panel.color_button.on_left_mouse_click(self.callback_color)

        self.pyplot_panel.set_y_margin_percent(5)
        self.pyplot_panel.variables.set_y_margins_per_frame = True
Пример #26
0
    def __init__(
            self,
            parent,
            main_app_variables,  # type: AppVariables
    ):
        self.main_app_variables = main_app_variables

        self.parent = parent
        self.master_frame = tkinter.Frame(parent)
        AbstractWidgetPanel.__init__(self, self.master_frame)
        widget_list = ["new_annotation", "edit_existing_annotation"]
        self.init_w_horizontal_layout(widget_list)

        self.master_frame.pack()
        self.pack()

        # set up callbacks
        self.new_annotation.on_left_mouse_click(self.callback_new)
        self.edit_existing_annotation.on_left_mouse_click(
            self.callback_existing)
Пример #27
0
    def __init__(self, master):
        # set the master frame
        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)
        widget_list = ["image_canvas", "side_panel"]
        self.init_w_vertical_layout(widget_list)
        self.variables = AppVariables()

        self.side_panel.set_spacing_between_buttons(0)
        self.image_canvas.variables.canvas_image_object = SarpyCanvasDisplayImage(
        )  # type: SarpyCanvasDisplayImage
        self.image_canvas.set_canvas_size(600, 400)

        # need to pack both master frame and self, since this is the main app window.
        master_frame.pack()
        self.pack()

        # set up event listeners
        self.side_panel.buttons.line_draw.on_left_mouse_click(
            self.callback_press_line_button)
        self.side_panel.buttons.point_draw.on_left_mouse_click(
            self.callback_press_point_button)
        self.side_panel.buttons.foreground_color.on_left_mouse_click(
            self.callback_select_color)
        self.side_panel.buttons.zoom_in.on_left_mouse_click(
            self.callback_set_to_zoom_in)
        self.side_panel.buttons.zoom_out.on_left_mouse_click(
            self.callback_set_to_zoom_out)

        self.image_canvas.variables.line_width = self.variables.line_width
        self.image_canvas.canvas.on_left_mouse_click(
            self.callback_handle_left_mouse_click)
        self.image_canvas.canvas.on_left_mouse_motion(
            self.callback_on_left_mouse_motion)

        self.side_panel.file_selector.set_fname_filters([("*.NITF", ".nitf")])
        self.side_panel.file_selector.select_file.on_left_mouse_click(
            self.callback_select_file)
Пример #28
0
    def __init__(self, master):
        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)
        self.variables = AppVariables()

        widget_list = ["button_panel", "raw_frame_image_panel", "ortho_image_panel"]
        self.init_w_horizontal_layout(widget_list)

        # define panels widget_wrappers in master frame
        self.button_panel.set_spacing_between_buttons(0)
        self.raw_frame_image_panel.variables.canvas_image_object = SarpyCanvasDisplayImage()  # type: SarpyCanvasDisplayImage
        self.raw_frame_image_panel.set_canvas_size(500, 400)
        self.raw_frame_image_panel.rescale_image_to_fit_canvas = True
        self.ortho_image_panel.set_canvas_size(300, 200)
        self.ortho_image_panel.rescale_image_to_fit_canvas = True

        # need to pack both master frame and self, since this is the main app window.
        master_frame.pack()
        self.pack()

        # bind events to callbacks here
        self.button_panel.fname_select.on_left_mouse_click(self.callback_initialize_canvas_image)
        self.button_panel.pan.on_left_mouse_click(self.callback_set_to_pan)
        self.button_panel.display_ortho.on_left_mouse_click(self.callback_display_ortho_image)
Пример #29
0
 def __init__(self, parent):
     AbstractWidgetPanel.__init__(self, parent)
     widget_list = ["file_selector", "buttons", "info_panel"]
     self.init_w_basic_widget_list(widget_list, 2, [1, 2])
     self.set_label_text("wake tool controls")
Пример #30
0
 def __init__(self, parent):
     AbstractWidgetPanel.__init__(self, parent)
     widget_list = ["controls", "info_panel"]
     self.init_w_basic_widget_list(widget_list, 2, [1, 2])