enhance context menu, draw object center, recenter if image out of view
This commit is contained in:
@@ -461,6 +461,15 @@ class FixTargetFrame(pg.ROI):
|
||||
lh=QLineF(x-rx, y, x+rx, y)
|
||||
lv=QLineF(x, y-ry, x, y+ry)
|
||||
p.drawLines(lh, lv)
|
||||
|
||||
#plot center of all feducials
|
||||
ctr=np.array(f['pos']).mean(axis=0)
|
||||
x, y=ctr # ;print(x,y)
|
||||
lh=QLineF(x-rx, y, x+rx, y)
|
||||
lv=QLineF(x, y-ry, x, y+ry)
|
||||
p.drawLines(lh, lv)
|
||||
p.drawEllipse(x-rx/2, y-ry/2, rx, ry)
|
||||
|
||||
else:
|
||||
assert('unknown feducial type')
|
||||
|
||||
@@ -741,6 +750,8 @@ if __name__=='__main__':
|
||||
#viRoi.addTranslateHandle([.7, .5], axes=None, item=None, name=None, index=None) #quadrat
|
||||
vb.addItem(viRoi)
|
||||
|
||||
#autorange not working, as all rois are in ItemGroup
|
||||
vb.setRange(QtCore.QRectF(-300, -400, 900+300, 500+400))
|
||||
|
||||
childTree(vb)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user