예제 #1
0
    def _antialiastingChanged(self, val):
        val = bool(val)
        #make change session independent: 
#         self.gui.app.session.opts['pview']['antialias'] = val
        
        pg.setConfigOption('antialias', val)
        for ws in self.gui.workspaces():
            ws.reload()
예제 #2
0
 def setColorTheme(self, theme):
     if theme == 'dark':
         pyqtgraph_karl.setConfigOption('foreground', 'w')
         pyqtgraph_karl.setConfigOption('background', 'k')
         
     elif theme == "bright":
         pyqtgraph_karl.setConfigOption('foreground', 'k')
         pyqtgraph_karl.setConfigOption('background', 'w')
     else:
         raise AttributeError('theme %s unknown' %theme)
     
     for ws in self.gui.workspaces():
         ws.reload()
예제 #3
0
    def setColorTheme(self, theme):
        if theme == 'dark':
            pyqtgraph_karl.setConfigOption('foreground', 'w')
            pyqtgraph_karl.setConfigOption('background', 'k')

        elif theme == "bright":
            pyqtgraph_karl.setConfigOption('foreground', 'k')
            pyqtgraph_karl.setConfigOption('background', 'w')
        else:
            raise AttributeError('theme %s unknown' % theme)

        for ws in self.gui.workspaces():
            ws.reload()
예제 #4
0
    def _colorThemeChanged(self, _index):
        theme = self.combo_colorTheme.currentText()
        if theme == 'dark':
            pg.setConfigOption('foreground', 'w')
            pg.setConfigOption('background', 'k')

        elif theme == "bright":
            pg.setConfigOption('foreground', 'k')
            pg.setConfigOption('background', 'w')
        else:
            raise AttributeError('theme %s unknown' % theme)

        for ws in self.gui.workspaces():
            ws.reload()
예제 #5
0
    def _colorThemeChanged(self, index):
        theme = self.combo_colorTheme.currentText()
        #make change session independent: 
#         self.gui.app.session.opts['pview']['colorTheme'] = index
        
        if theme == 'dark':
            pg.setConfigOption('foreground', 'w')
            pg.setConfigOption('background', 'k')

        elif theme == "bright":
            pg.setConfigOption('foreground', 'k')
            pg.setConfigOption('background', 'w')
        else:
            raise AttributeError('theme %s unknown' % theme)

        for ws in self.gui.workspaces():
            ws.reload()
예제 #6
0
import numpy as np

from PyQt5 import QtWidgets, QtCore, QtGui

import pyqtgraph_karl as pg
from pyqtgraph_karl.imageview.ImageView import ImageView

from imgProcessor.imgIO import imread

from dataArtist.items.PerspectiveGridROI import PerspectiveGridROI as PGROI

pg.setConfigOption('foreground', 'k')
pg.setConfigOption('background', 'w')
pg.setConfigOptions(imageAxisOrder='row-major')


class PerspectiveGridROI(PGROI):
    def __init__(self, pen={'color': 'g', 'width': 3}, **kwargs):
        PGROI.__init__(self, pen=pen, **kwargs)
        h = self.handles[0]['item']
        # change color
        h.pen.setColor(QtGui.QColor("red"))
        h.pen.setWidth(2)
        self.removable = False  # hide context menu


class ImageView2(ImageView):
    def __init__(self):

        ImageView.__init__(self, view=pg.PlotItem())
        # hide buttons
예제 #7
0
 def _setAntialiasting(self, val):
     pyqtgraph_karl.setConfigOption('antialias', bool(val))
     for ws in self.gui.workspaces():
         ws.reload()
예제 #8
0
 def _setAntialiasting(self, val):
     pyqtgraph_karl.setConfigOption('antialias', bool(val))
     for ws in self.gui.workspaces():
         ws.reload()
예제 #9
0
 def _antialiastingChanged(self, val):
     pg.setConfigOption('antialias', bool(val))
     for ws in self.gui.workspaces():
         ws.reload()