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")
예제 #2
0
    def __init__(
            self,
            parent,
            app_variables,  # type: AppVariables
    ):
        # set the master frame
        AbstractWidgetPanel.__init__(self, parent)
        widgets_list = ["toolbar", "image_canvas"]

        self.parent = parent
        self.app_variables = app_variables

        self.init_w_vertical_layout(widgets_list)

        sicd_reader = ComplexImageReader(app_variables.sicd_fname)
        # self.image_canvas_panel = ImageCanvas()
        self.image_canvas.set_canvas_size(1000, 1000)
        self.image_canvas.canvas.set_image_reader(sicd_reader)

        self.pack()

        self.toolbar.zoom_in.on_left_mouse_click(
            self.set_current_tool_to_zoom_in)
        self.toolbar.zoom_out.on_left_mouse_click(
            self.set_current_tool_to_zoom_out)
        self.toolbar.pan.on_left_mouse_click(self.set_current_tool_to_pan)
        self.toolbar.select_aoi.on_left_mouse_click(
            self.set_current_tool_to_selection_tool)
        self.toolbar.submit_aoi.on_left_mouse_click(self.submit_aoi)
예제 #3
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)

        self.init_w_box_layout(["Aperture Fraction:", "aperture_fraction"],
                               n_columns=2,
                               column_widths=[20, 10])
        self.aperture_fraction.set_text("0.25")
예제 #4
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.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.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)
예제 #5
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.canvas.variables.canvas_image_object = ImageCanvasPanel  # type: ImageCanvasPanel
        self.taser_image_panel.canvas.set_canvas_size(700, 400)

        # 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)
예제 #6
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.parent = parent
        self.config(borderwidth=2)

        widget_list = [
            "", "Cross-Range", "", "Range", "", "Start %",
            "start_percent_cross", "", "start_percent_range", "", "Stop %",
            "stop_percent_cross", "", "stop_percent_range", "", "Fraction",
            "fraction_cross", "", "fraction_range", "", "Resolution",
            "resolution_cross", "resolution_cross_units", "resolution_range",
            "resolution_range_units", "Sample Spacing", "sample_spacing_cross",
            "sample_spacing_cross_units", "sample_spacing_range",
            "sample_spacing_range_units", "Ground Resolution",
            "ground_resolution_cross", "ground_resolution_cross_units",
            "ground_resolution_range", "ground_resolution_range_units",
            "full_aperture_button", "english_units_checkbox"
        ]
        self.init_w_box_layout(widget_list, 5, column_widths=20)

        self.resolution_cross_units.set_text("Units")
        self.sample_spacing_cross_units.set_text("Units")
        self.ground_resolution_cross_units.set_text("Units")

        self.resolution_range_units.set_text("Units")
        self.sample_spacing_range_units.set_text("Units")
        self.ground_resolution_range_units.set_text("Units")

        self.full_aperture_button.set_text("Full Aperture")
        self.english_units_checkbox.set_text("English Units")

        self.parent.protocol("WM_DELETE_WINDOW", self.close_window)
예제 #7
0
    def __init__(self, master):
        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)

        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.set_canvas_size(600, 400)
        self.raw_frame_image_panel.canvas.rescale_image_to_fit_canvas = True
        self.ortho_image_panel.set_canvas_size(600, 400)
        self.ortho_image_panel.canvas.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_set_filename)
        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)
예제 #8
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)

        self.init_w_box_layout(["Min Res", "min_res", "Max Res", "max_res"],
                               n_columns=2,
                               column_widths=[20, 10])

        self.min_res.set_text("10")
        self.max_res.set_text("100")
예제 #9
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_rows_list = [["parent_types"],
                            ["thing_type_label", "thing_type"],
                            ["comment_label", "comment"],
                            ["confidence_label", "confidence"],
                            ["reset", "submit"]
                            ]
        self.init_w_rows(widget_rows_list)

        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("")
예제 #10
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.init_w_box_layout(["nx_label", "nx", "ny_label", "ny"],
                               n_columns=2)
        self.nx.config(state="disabled")
        self.ny.config(state="disabled")

        self.nx_label.set_text("nx: ")
        self.ny_label.set_text("ny: ")
        self.pack()
예제 #11
0
    def __init__(self, parent):
        # set the master frame
        AbstractWidgetPanel.__init__(self, parent)
        self.app_variables = AppVariables()
        widgets_list = ["image_canvas_panel", "annotate_dashboard"]

        self.init_w_vertical_layout(widgets_list)

        self.annotate_dashboard.set_spacing_between_buttons(0)
        self.image_canvas_panel.set_canvas_size(600, 400)
예제 #12
0
    def __init__(self, parent):
        # set the master frame
        AbstractWidgetPanel.__init__(self, parent)
        self.parent = parent
        widgets_list = [
            "mode_panel", "animation_settings", "fast_slow_settings",
            "resolution_settings"
        ]

        self.init_w_vertical_layout(widgets_list)
        self.pack()
        self.parent.protocol("WM_DELETE_WINDOW", self.close_window)
예제 #13
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.decimation_label = basic_widgets.Label
        self.annotate_decimation_val = basic_widgets.Entry

        widget_list = ["decimation_label", "annotate_decimation_val"]

        self.init_w_box_layout(widget_list,
                               n_columns=2,
                               column_widths=[20, 10])

        self.decimation_label.config(text="decimation")
        self.annotate_decimation_val.config(state='disabled')
예제 #14
0
    def __init__(self, parent):
        # set the master frame
        AbstractWidgetPanel.__init__(self, parent)
        widgets_list = ["file_selector", "chip_size_panel"]

        self.init_w_basic_widget_list(widgets_list,
                                      n_rows=2,
                                      n_widgets_per_row_list=[1, 2])

        self.file_selector.set_fname_filters([("NITF files",
                                               ".nitf .NITF .ntf .NTF")])
        self.pack()
        self.parent.protocol("WM_DELETE_WINDOW", self.close_window)
예제 #15
0
    def __init__(self, parent):
        # set the master frame
        AbstractWidgetPanel.__init__(self, parent)
        self.app_variables = AppVariables()
        widgets_list = ["image_canvas_panel", "context_dashboard"]

        self.init_w_vertical_layout(widgets_list)

        self.context_dashboard.set_spacing_between_buttons(0)
        self.image_canvas_panel.set_canvas_size(600, 400)

        self.context_dashboard.file_selector.set_fname_filters(
            ["*.NITF", ".nitf"])
예제 #16
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")
예제 #17
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)
        self.init_w_horizontal_layout([
            "slow_time", "fast_time", "aperture_percent",
            "full_range_bandwidth", "full_az_bandwidth", "reverse"
        ])
        self.selected_value = tkinter.IntVar()
        self.selected_value.set(1)

        self.slow_time.config(variable=self.selected_value, value=1)
        self.fast_time.config(variable=self.selected_value, value=2)
        self.aperture_percent.config(variable=self.selected_value, value=3)
        self.full_range_bandwidth.config(variable=self.selected_value, value=4)
        self.full_az_bandwidth.config(variable=self.selected_value, value=5)
        self.pack()
예제 #18
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")
예제 #19
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")
예제 #20
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_coords", "edit_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")
    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)
예제 #22
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')
예제 #23
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_panel.canvas.on_left_mouse_release(self.callback_context_handle_left_mouse_release)
        self.context_panel.image_canvas_panel.canvas.on_mouse_wheel(self.callback_context_handle_mouse_wheel)

        # set up annotate panel event listeners
        self.annotate_panel.image_canvas_panel.canvas.on_mouse_wheel(self.callback_handle_annotate_mouse_wheel)
        self.annotate_panel.image_canvas_panel.canvas.on_left_mouse_click(self.callback_annotate_handle_canvas_left_mouse_click)
        self.annotate_panel.image_canvas_panel.canvas.on_left_mouse_release(self.callback_annotate_handle_left_mouse_release)
        self.annotate_panel.image_canvas_panel.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)
예제 #24
0
    def __init__(self, parent):
        AbstractWidgetPanel.__init__(self, parent)

        self.init_w_box_layout([
            "Number of Frames:",
            "number_of_frames",
            "",
            "",
            "Frame Rate:",
            "frame_rate",
            "fps",
            "",
            "step_back",
            "step_forward",
            "play",
            "stop",
            "cycle_continuously",
        ],
                               n_columns=4,
                               column_widths=[20, 10, 3, 3])

        self.number_of_frames.set_text("7")
        self.frame_rate.set_text("5")
예제 #25
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])
예제 #26
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")
예제 #27
0
    def __init__(self, master):
        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)
        self.variables = AppVariables()

        widget_list = [
            "canvas_demo_image_panel",
            "pyplot_panel",
            "button_panel",
        ]
        self.init_w_basic_widget_list(widget_list, 2, [2, 1])

        # define panels widget_wrappers in master frame
        self.button_panel.set_spacing_between_buttons(0)
        self.canvas_demo_image_panel.canvas.variables.canvas_image_object = ImageCanvasPanel
        self.canvas_demo_image_panel.set_canvas_size(700, 400)
        self.canvas_demo_image_panel.canvas.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.update_rect_image.on_left_mouse_click(
            self.callback_display_canvas_rect_selection_in_pyplot_frame)
        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.button_panel.draw_line_w_drag.on_left_mouse_click(
            self.callback_draw_line_w_drag)
        self.button_panel.draw_line_w_click.on_left_mouse_click(
            self.callback_draw_line_w_click)
        self.button_panel.draw_arrow_w_drag.on_left_mouse_click(
            self.callback_draw_arrow_w_drag)
        self.button_panel.draw_arrow_w_click.on_left_mouse_click(
            self.callback_draw_arrow_w_click)

        self.button_panel.draw_rect_w_drag.on_left_mouse_click(
            self.callback_draw_rect_w_drag)
        self.button_panel.draw_rect_w_click.on_left_mouse_click(
            self.callback_draw_rect_w_click)

        self.button_panel.draw_polygon_w_click.on_left_mouse_click(
            self.callback_draw_polygon_w_click)
        self.button_panel.draw_point_w_click.on_left_mouse_click(
            self.callback_draw_point_w_click)

        self.button_panel.color_selector.on_left_mouse_click(
            self.callback_activate_color_selector)

        self.button_panel.modify_existing_shape_coords.on_left_mouse_click(
            self.callback_edit_shape_coords)
        self.button_panel.edit_existing_shape.on_left_mouse_click(
            self.callback_edit_shape)
        self.button_panel.select_existing_shape.on_selection(
            self.callback_handle_shape_selector)
        self.button_panel.save_kml.on_left_mouse_click(self.callback_save_kml)

        self.canvas_demo_image_panel.canvas.on_left_mouse_click(
            self.callback_handle_canvas_left_mouse_click)
예제 #28
0
 def __init__(self, parent):
     AbstractWidgetPanel.__init__(self, parent)
     self.init_w_horizontal_layout(
         ["zoom_in", "zoom_out", "pan", "select_aoi", "submit_aoi"])
예제 #29
0
    def __init__(self, master):
        self.app_variables = AppVariables()

        self.master = master

        master_frame = tkinter.Frame(master)
        AbstractWidgetPanel.__init__(self, master_frame)

        widgets_list = ["frequency_vs_degree_panel", "filtered_panel"]
        self.init_w_horizontal_layout(widgets_list)
        self.frequency_vs_degree_panel.pack(expand=tkinter.Y, fill=tkinter.BOTH)
        self.filtered_panel.pack()

        self.filtered_panel.canvas.set_canvas_size(900, 700)

        self.frequency_vs_degree_panel.canvas.on_left_mouse_motion(self.callback_frequency_vs_degree_left_mouse_motion)

        self.image_info_popup_panel = tkinter.Toplevel(self.master)
        self.image_info_panel = ImageInfoPanel(self.image_info_popup_panel)
        self.image_info_panel.pack()
        self.image_info_popup_panel.withdraw()

        self.image_info_panel.file_selector.select_file.on_left_mouse_click(self.callback_select_file)

        self.ph_popup_panel = tkinter.Toplevel(self.master)
        self.phase_history = PhaseHistoryPanel(self.ph_popup_panel)
        self.phase_history.pack()
        self.ph_popup_panel.withdraw()

        self.metaicon_popup_panel = tkinter.Toplevel(self.master)
        self.metaicon = MetaIcon(self.metaicon_popup_panel)
        self.metaicon.set_canvas_size(800, 600)
        self.metaicon.pack()
        # self.metaicon_popup_panel.withdraw()

        self.metaviewer_popup_panel = tkinter.Toplevel(self.master)
        self.metaviewer = Metaviewer(self.metaviewer_popup_panel)
        self.metaviewer.pack()
        self.metaviewer_popup_panel.withdraw()

        self.animation_popup_panel = tkinter.Toplevel(self.master)
        self.animation_panel = AnimationPanel(self.animation_popup_panel)
        self.animation_panel.pack()
        self.animation_popup_panel.withdraw()

        # callbacks for animation
        self.animation_panel.animation_settings.play.on_left_mouse_click(self.callback_play_animation_fast_slow)
        self.animation_panel.animation_settings.step_forward.on_left_mouse_click(self.callback_step_forward)
        self.animation_panel.animation_settings.step_back.on_left_mouse_click(self.callback_step_back)
        self.animation_panel.animation_settings.stop.on_left_mouse_click(self.callback_stop_animation)

        # self.animation_panel.mode_panel.resolution_mode.on_left_mouse_click(self.callback_select_resolution_mode)

        menubar = Menu()

        filemenu = Menu(menubar, tearoff=0)
        filemenu.add_command(label="Open", command=self.select_file)
        filemenu.add_separator()
        filemenu.add_command(label="Exit", command=self.exit)

        # create more pulldown menus
        popups_menu = Menu(menubar, tearoff=0)
        popups_menu.add_command(label="Main Controls", command=self.main_controls_popup)
        popups_menu.add_command(label="Phase History", command=self.ph_popup)
        popups_menu.add_command(label="Metaicon", command=self.metaicon_popup)
        popups_menu.add_command(label="Metaviewer", command=self.metaviewer_popup)
        popups_menu.add_command(label="Animation", command=self.animation_fast_slow_popup)

        save_menu = Menu(menubar, tearoff=0)
        save_menu.add_command(label="Save Meticon", command=self.save_metaicon)

        menubar.add_cascade(label="File", menu=filemenu)
        menubar.add_cascade(label="Popups", menu=popups_menu)
        menubar.add_cascade(label="Save", menu=save_menu)

        master.config(menu=menubar)

        master_frame.pack()
        self.pack()
예제 #30
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")