very promissing fiducial detection
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user