Esempio n. 1
0
    def __init__(self, parent, naming_fields = None):
        QWidget.__init__(self, parent)
        IVIANVisualization.__init__(self, naming_fields)
        self.naming_fields['plot_name'] = "keyword_graph_plot"
        self.view = EGraphicsView(self)
        self.view.setScene(QGraphicsScene(self))
        self.view.onScaleEvent.connect(self.on_scale)
        self.view.setBackgroundBrush(QColor(30, 30, 30))

        self.setLayout(QHBoxLayout(self))
        self.layout().addWidget(self.view)
        self.node_matrix = None
        self.node_labels = None
        self.context_objects = None

        self.text_size = 8
        self.node_threshold = 10
        self.edge_threshold = 10
        self.selection_graph_depth = 2

        self.nodes = []
        self.edges = []
        self.labels = []
        self.node_weights = []

        self.node_words_model = QStandardItemModel()
        self.current_labels = []
        self.controls = None
        self.current_selection = None
Esempio n. 2
0
    def __init__(self, parent, naming_fields = None):
        QWidget.__init__(self, parent)
        IVIANVisualization.__init__(self, naming_fields)
        self.naming_fields['plot_name'] = "correlation_plot"
        self.split = QSplitter()
        self.stack = QStackedWidget()

        self.barplot = CorrelationBarplot(self)
        self.matrix = CorrelationMatrix(self)

        self.stack.addWidget(self.matrix)
        self.stack.addWidget(self.barplot)
        self.matrix.onFeatureClicked.connect(self.on_feature_selected)

        self.back_button = QPushButton("Back", self.barplot)
        self.barplot.set_heads_up_widget(self.back_button)
        self.back_button.clicked.connect(partial(self.stack.setCurrentIndex, 0))
        self.back_button.move(10, 10)
        self.back_button.resize(100, 30)

        self.setLayout(QHBoxLayout())
        self.layout().addWidget(self.split)
        self.controls = FeatureMatrixParamWidget(self)
        self.controls.onFeatureActivated.connect(self.on_filter_activated)
        self.split.addWidget(self.controls)
        self.split.addWidget(self.stack)
        self.controls.setMaximumWidth(300)
        # self.layout().addWidget(self.stack)

        self.features = []
        self.correlation_matrix = None
Esempio n. 3
0
    def __init__(self, parent, title="", naming_fields=None):
        QGraphicsView.__init__(self, parent)
        IVIANVisualization.__init__(self, naming_fields)
        self.naming_fields['plot_name'] = "dot_plot"
        self.setRenderHint(QPainter.Antialiasing)
        self.setMouseTracking(True)
        self.setStyleSheet(
            "QWidget:focus{border: rgb(30,30,30); } QWidget:{border: rgb(30,30,30);}"
        )
        self.setBackgroundBrush(QColor(30, 30, 30))
        self.setScene(QGraphicsScene(self))
        self.curr_scale = 1.0
        self.ctrl_is_pressed = False
        self.magnification = 1.0

        self.grid_color = QColor(200, 200, 200, 150)

        self.pos_scale = 1.0

        self.curr_angle = 0

        self.curr_grid = "Default"
        self.n_grid = 12
        self.font_size = 4
        self.index_uid = dict()
        self.dot_size = 20
        self.grid = []
        self.lbl_max = None
        self.grid_line_width = 1.0

        self.raw_data = []
        self.points = []
        self.compass = QGraphicsPathItem()
Esempio n. 4
0
    def __init__(self, parent, title="", naming_fields=None):
        QGraphicsView.__init__(self, parent)
        IVIANVisualization.__init__(self, naming_fields)
        self.naming_fields['plot_name'] = "keyword_timeline"

        self.setRenderHint(QPainter.Antialiasing)
        self.setMouseTracking(True)
        self.setStyleSheet(
            "QWidget:focus{border: rgb(30,30,30); } QWidget:{border: rgb(30,30,30);}"
        )
        self.setBackgroundBrush(QColor(30, 30, 30))
        self.setScene(QGraphicsScene(self))
        self.ctrl_is_pressed = False
        self.img_width = 192
        self.curr_scale = 1.0
        self.magnification = 1.0  #0.005
        self.spacing = 10
        self.x_scale = 1.0
        self.image_scale = 0.5

        self.range_x = [0, 1000]
        self.range_y = [0, 1000]
        self.x_end = 0

        self.font_family = "Consolas"
        self.text_color = QColor(255, 255, 255, 200)
        self.font_size = 50
        self.title = title

        self.font = QFont(self.font_family, self.font_size)

        self.images = []
        self.features = []
        self.all_possible_features = []
        self.segments = []
        self.segment_items = []
        self.segment_label = []
        self.feature_items = []
        self.feature_items_plain = []
        self.feature_labels = []
        self.feature_base_height = 900
        self.feature_height = 100
        self.raw_data = []

        self.segment_height = 200

        self.n_grid = 12
        self.stretch = 1.0
        self.controls_itm = None

        self.scene_width = 0

        self.create_title()

        self.fitInView(QRectF(0, 0, 80, 80), Qt.KeepAspectRatio)

        self.horizontalScrollBar().valueChanged.connect(self.on_h_scroll)
Esempio n. 5
0
 def __init__(self, parent, naming_fields=None):
     EGraphicsView.__init__(self, parent)
     IVIANVisualization.__init__(self, naming_fields)
     self.naming_fields['plot_name'] = "palette_barcode_plot"
     self.times = None
     self.palette = None
     self.depth = 0
     self.image = None
     self.show_grid = False
     self.sorting = "Cluster"
     self.setAttribute(Qt.WA_OpaquePaintEvent)
     self.resolution = 1
Esempio n. 6
0
 def __init__(self, parent, naming_fields=None):
     QWidget.__init__(self, parent)
     IVIANVisualization.__init__(self, naming_fields)
     self.naming_fields['plot_name'] = "palette_plot"
     self.palette_layer = None
     self.hilbert_lookup = get_hilbert_lookup()
     self.mode = "Layer"
     self.depth = 0
     self.image = None
     self.show_grid = False
     self.sorting = "Cluster"
     self.setAttribute(Qt.WA_OpaquePaintEvent)
Esempio n. 7
0
 def __init__(self, parent, naming_fields=None):
     QWidget.__init__(self, parent)
     IVIANVisualization.__init__(self, naming_fields)
     self.naming_fields['plot_name'] = "palette_ab_plot"
     self.dot_plot = DotPlot(self, naming_fields=naming_fields)
     self.dot_plot.dot_size = 15
     self.dot_plot.naming_fields['plot_name'] = "palette_ab_plot"
     self.setLayout(QVBoxLayout())
     self.layout().addWidget(self.dot_plot)
     self.palette_tree = None
     self.slider = None
     self.spbox_depth = None
     self.depth = 10
Esempio n. 8
0
 def __init__(self, parent, naming_fields=None):
     QWidget.__init__(self, parent)
     IVIANVisualization.__init__(self, naming_fields)
     self.naming_fields['plot_name'] = "palette_ab_plot"
     self.palette_layer = None
     self.view = parent
     self.depth = 0
     self.image = None
     self.dot_size = 10
     self.scale = 8
     self.show_grid = True
     self.background = "Light-Gray"
     self.jitter = 10
     self.setAttribute(Qt.WA_OpaquePaintEvent)
Esempio n. 9
0
 def __init__(self, parent, title="", naming_fields=None):
     QGraphicsView.__init__(self, parent)
     IVIANVisualization.__init__(self, naming_fields)
     self.naming_fields['plot_name'] = "bar_plot"
     self.setRenderHint(QPainter.Antialiasing)
     self.setMouseTracking(True)
     self.setStyleSheet(
         "QWidget:focus{border: rgb(30,30,30); } QWidget:{border: rgb(30,30,30);}"
     )
     self.setBackgroundBrush(QColor(30, 30, 30))
     self.setScene(QGraphicsScene(self))
     self.curr_scale = 1.0
     self.bar_height = 20
     self.max_width = 1000
     self.raw_data = []
     self.points = []
     self.ctrl_is_pressed = False
Esempio n. 10
0
    def __init__(self,
                 parent,
                 project: VIANProject,
                 title="",
                 naming_fields=None):
        QGraphicsView.__init__(self, parent)
        IVIANVisualization.__init__(self, naming_fields)
        self.naming_fields['plot_name'] = "keyword_timeline"
        self.setRenderHint(QPainter.Antialiasing)

        self.setStyleSheet(
            "QWidget:focus{border: rgb(30,30,30); } QWidget:{border: rgb(30,30,30);}"
        )
        self.project = project
        self.setBackgroundBrush(QColor(30, 30, 30))
        self.setScene(QGraphicsScene(self))
        self.ctrl_is_pressed = False
        self.img_width = 192
        self.curr_scale = 1.0
        self.magnification = 0.001

        self.range_x = [0, 1000]
        self.range_y = [0, 1000]
        self.x_end = 0
        self.font_size = 4
        self.title = title

        self.images = []
        self.features = []
        self.segments = []
        self.segment_pos = []
        self.segment_lines = []
        self.feature_base_height = 900
        self.feature_height = 100

        self.n_grid = 12
        self.controls_itm = None

        self.scene_width = 0

        self.add_grid()
        self.create_timeline()
        self.create_title()

        self.fitInView(QRectF(0, 0, 80, 80), Qt.KeepAspectRatio)