Esempio n. 1
0
    def gfxUpdate(self):
        from Priithon.all import Y
        if self.rubberWhat == 'box':
            self.gfxIdx = \
                Y.vgAddRect(self.id, [self.yx0 ,self.yx1], enclose=True, color=self.color,
                            width=1, name="ROI-%s"%(self.roiName,), idx=self.gfxIdx,
                            enable=True, refreshNow=True)
        elif self.rubberWhat == 'line':
            self.gfxIdx = \
                Y.vgAddLines(self.id, [self.yx0 ,self.yx1], color=self.color,
                            width=1, name="ROI-%s"%(self.roiName,), idx=self.gfxIdx,
                            enable=True, refreshNow=True)

        elif self.rubberWhat == 'circle':
            y0, x0 = self.yx0
            y1, x1 = self.yx1
            dx = x1 - x0
            dy = y1 - y0
            x = x0 + .5 * dx
            y = y0 + .5 * dy
            rx = abs(x1 - x)
            ry = abs(y1 - y)
            self.gfxIdx = \
                Y.vgAddEllipses(self.id, [(y,x,ry,rx)], color=self.color,
                            width=1, name="ROI-%s"%(self.roiName,), idx=self.gfxIdx,
                            enable=True, refreshNow=True)
    def gfxUpdate(self):
        from Priithon.all import Y
        if self.rubberWhat == 'box':
            self.gfxIdx = \
                Y.vgAddRect(self.id, [self.yx0 ,self.yx1], enclose=True, color=self.color, 
                            width=1, name="ROI-%s"%(self.roiName,), idx=self.gfxIdx, 
                            enable=True, refreshNow=True)
        elif self.rubberWhat == 'line':
            self.gfxIdx = \
                Y.vgAddLines(self.id, [self.yx0 ,self.yx1], color=self.color, 
                            width=1, name="ROI-%s"%(self.roiName,), idx=self.gfxIdx, 
                            enable=True, refreshNow=True)

        elif self.rubberWhat == 'circle':
            y0,x0 = self.yx0
            y1,x1 = self.yx1
            dx = x1-x0
            dy = y1-y0
            x = x0 + .5*dx
            y = y0 + .5*dy
            rx = abs(x1-x)
            ry = abs(y1-y)
            self.gfxIdx = \
                Y.vgAddEllipses(self.id, [(y,x,ry,rx)], color=self.color, 
                            width=1, name="ROI-%s"%(self.roiName,), idx=self.gfxIdx, 
                            enable=True, refreshNow=True)
Esempio n. 3
0
def showInViewer(vid, slc):
    from Priithon.all import Y
    Y.vgAddRect(vid, ((slc[2],slc[4]),(slc[3],slc[5])))
Esempio n. 4
0
def showInViewer(vid, slc):
    from Priithon.all import Y
    Y.vgAddRect(vid, ((slc[2], slc[4]), (slc[3], slc[5])))