very promissing fiducial detection

This commit is contained in:
2022-09-15 19:19:13 +02:00
parent 7534eec921
commit 6a7b5ab91e
4 changed files with 197 additions and 58 deletions

View File

@@ -527,6 +527,17 @@ class FixTargetFrame(pg.ROI):
## Start Qt event loop unless running in interactive mode or using pyside.
if __name__=='__main__':
def set_fiducial(pic):
# fiducial test
f=np.array(((0, 0, 0, 0, 0),
(0, 1, 1, 1, 0),
(0, 1, 0, 0, 0),
(0, 1, 1, 0, 0),
(0, 1, 0, 0, 0),
(0, 0, 0, 0, 0),), pic.dtype)
pic[0:6, 0:5]=f*pic.max()
# TODO: pg.ItemGroup does not support bounding box and therefore vb.autoRange() does not work
class ItemGroup(pg.ItemGroup):
# own item group that supports bounding rect
@@ -667,7 +678,7 @@ if __name__=='__main__':
arr[:, 50]=10
arr+=np.sin(np.linspace(0, 20, 100)).reshape(1, 100)
arr+=np.random.normal(size=(100, 100))
set_fiducial(arr)
# add an arrow for asymmetry
arr[10, :50]=10
arr[9:12, 44:48]=10