Ejemplo n.º 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()
Ejemplo n.º 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.")
Ejemplo n.º 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)
Ejemplo n.º 4
0
 def get_source_width(self):
     log_debug(
         NotImplementedError("Method <get_source_width> not implemented"))
Ejemplo n.º 5
0
 def get_source_height(self):
     log_debug(
         NotImplementedError("Method <get_source_height> not implemented"))
Ejemplo n.º 6
0
 def set_initial_values(self):
     log_debug(
         NotImplementedError("Method <set_initial_values> not implemented"))
Ejemplo n.º 7
0
 def play(self):
     log_debug(NotImplementedError("Method <play> not implemented"))
Ejemplo n.º 8
0
 def set_stop_time(self, time):
     log_debug(
         NotImplementedError("Method <set_stop_time> not implemented"))
Ejemplo n.º 9
0
 def set_aspect_ratio(self, ratio):
     log_debug(
         NotImplementedError("Method <set_aspect_ratio> not implemented"))
Ejemplo n.º 10
0
 def is_frame_rate_auto_detected(self):
     log_debug(
         NotImplementedError(
             "Method <is_frame_rate_auto_detected> not implemented"))
Ejemplo n.º 11
0
    def set_offset(self):
        """

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