Пример #1
0
    def parse_command(self):
        cmd = self.input_line.text()
        try:

            if cmd == "list_containers":
                self.main_window.project.print_object_list()

            elif cmd == "list_threads":
                log_info(threading.enumerate())

            elif cmd == "help":
                log_info(
                    "list_containers -- Listing all Container Objects of the Project"
                )

            else:
                # cmd = cmd.replace("print", "self.main_window.print_message")
                cmd = cmd.replace("project", "self.main_window.project")

                eval(cmd)

        except Exception as e:
            log_debug(e)

        self.input_line.clear()
Пример #2
0
    def update_state(self):
        data = self.requirements
        log_debug("Requirements:", data)
        if data is None:
            return
        self.missing_analyses = dict()

        res = dict()
        if self.main_window.project is not None:
            missing = self.main_window.project.get_missing_analyses(self.requirements)

            u = [
                ("ScreenshotAnalyses", "screenshot_analyses", "progress_screenshots"),
                ("SegmentAnalyses", "segment_analyses", "progress_segmentation")
            ]

            # Apply the result to the three progress bars
            for (bar_name, item_name, var) in u:
                n_analyses = missing[item_name][1]
                n_analyses_done = missing[item_name][2]
                # t = missing[item_name]
                if bar_name not in self.items:
                    bar = ProgressItem(bar_name)
                    self.list_widget.layout().addWidget(bar)
                    self.items[bar_name] = bar
                else:
                    bar = self.items[bar_name]

                bar.progress_bar.setValue(n_analyses_done / np.clip(n_analyses, 1, None) * 100)
                res[var] = n_analyses_done / np.clip(n_analyses, 1, None)
                bar.progress_bar.setValue(n_analyses_done / np.clip(n_analyses, 1, None) * 100)

            if res["progress_screenshots"] >= ERCFilmColorsVIANPipeline.finished_threshold and \
                res["progress_segmentation"] >= ERCFilmColorsVIANPipeline.finished_threshold:
                self.onThresholdReached.emit()
                self.lbl_Instructions.setVisible(False)
            else:
                self.lbl_Instructions.setVisible(True)
        else:
            QMessageBox.information(self, "No Project loaded.", "You first have to load a project to analyse it.")
Пример #3
0
 def get_visualization(self, analysis, result_path, data_path, project, main_window):
     """
     This function is called by VIAN if the User wants to display the complete Visualization of the Data. 
     While you may essentially use any type Type of Visualization, you should either: 
     
     1. subclass QMainWindow and implement your visualization into it.
     2. if you use a WebBased visualization use 
         
         save your visualitations into the results/ directory of the project
         during the IAnalysisJob.modify_project() or IAnalysisJob.process()
         
         and in this function:
         import webbrowser
         webbrowser.open(url/to/your/result.html)
     
     When using a QMainWindow, don't forget to call QMainWindow.show() at the end of your __init__()
     
     :param analysis: The IAnalysisJobAnalysis Object created in IAnalysisJob.process()
     :param result_path: The Path to the results directory of the project
     :param data_path: The Path to the data directory of the project
     :return: A QWidget which will be added to the Visualizations Tab
     """
     log_debug("get_name not implemented by", self)
Пример #4
0
 def get_source_width(self):
     log_debug(
         NotImplementedError("Method <get_source_width> not implemented"))
Пример #5
0
 def get_source_height(self):
     log_debug(
         NotImplementedError("Method <get_source_height> not implemented"))
Пример #6
0
 def set_initial_values(self):
     log_debug(
         NotImplementedError("Method <set_initial_values> not implemented"))
Пример #7
0
 def play(self):
     log_debug(NotImplementedError("Method <play> not implemented"))
Пример #8
0
 def set_stop_time(self, time):
     log_debug(
         NotImplementedError("Method <set_stop_time> not implemented"))
Пример #9
0
 def set_aspect_ratio(self, ratio):
     log_debug(
         NotImplementedError("Method <set_aspect_ratio> not implemented"))
Пример #10
0
 def is_frame_rate_auto_detected(self):
     log_debug(
         NotImplementedError(
             "Method <is_frame_rate_auto_detected> not implemented"))
Пример #11
0
    def set_offset(self):
        """

        :return: Long
        """
        log_debug(NotImplementedError("Method <set_offset> not implemented"))
Пример #12
0
 def next_frame(self):
     log_debug(NotImplementedError("Method <next_frame> not implemented"))
Пример #13
0
 def previous_frame(self):
     log_debug(
         NotImplementedError("Method <previous_frame> not implemented"))
Пример #14
0
 def is_playing(self):
     """
     :return: bool
     """
     log_debug(NotImplementedError("Method <is_playing> not implemented"))
Пример #15
0
 def stop(self):
     log_debug(NotImplementedError("Method <stop> not implemented"))
Пример #16
0
 def pause(self):
     log_debug(NotImplementedError("Method <pause> not implemented"))
Пример #17
0
 def get_aspect_ratio(self):
     log_debug(
         NotImplementedError("Method <get_aspect_ratio> not implemented"))
Пример #18
0
 def get_media_duration(self):
     log_debug(
         NotImplementedError("Method <get_media_duration> not implemented"))
Пример #19
0
 def play_interval(self, start_ms, stop_ms):
     log_debug(
         NotImplementedError("Method <play_interval> not implemented"))
Пример #20
0
 def set_sub_volume(self, volume):
     log_debug(
         NotImplementedError("Method <set_sub_volume> not implemented"))
Пример #21
0
 def get_offset(self):
     log_debug(NotImplementedError("Method <get_offset> not implemented"))
Пример #22
0
 def get_sub_volume(self):
     log_debug(
         NotImplementedError("Method <get_sub_colume> not implemented"))
Пример #23
0
 def set_frame_steps_to_frame_begin(self, bool):
     log_debug(
         NotImplementedError(
             "Method <set_frame_steps_to_frame_begin> not implemented"))
Пример #24
0
 def run_concurrent(self, args, sign_progress):
     log_debug("run_concurrent not implemented by", self)
Пример #25
0
 def set_miliseconds_per_sample(self, ms):
     log_debug(
         NotImplementedError(
             "Method <set_miliseconds_per_sample> not implemented"))
Пример #26
0
 def init_ui(self):
     log_debug(NotImplementedError("Method <init_ui> not implemented"))
Пример #27
0
 def set_mute(self, mute):
     log_debug(NotImplementedError("Method <set_mute> not implemented"))
Пример #28
0
 def open_movie(self, path):
     log_debug(NotImplementedError("Method <open_movie> not implemented"))
Пример #29
0
 def on_timestep_update(self, time):
     log_debug("ITimeStepDepending: Not Implemented by", self)
Пример #30
0
 def get_mute(self):
     log_debug(NotImplementedError("Method <get_mute> not implemented"))