This commit is contained in:
43
script/test/TstImgSim.py
Normal file
43
script/test/TstImgSim.py
Normal file
@@ -0,0 +1,43 @@
|
||||
run ("imaging/sim")
|
||||
|
||||
stack = load_test_stack(show=True)
|
||||
ipr, ipi = complex_edge_filtering(stack, complex=True, g_sigma = 3.0, show=False)
|
||||
|
||||
|
||||
#complex_edge_filter = get_context().getClassByName("Align_ComplexEdgeFiltering").newInstance()
|
||||
#translation_filter = get_context().getClassByName("Align_TranslationFilter2").newInstance()
|
||||
#compute_shifts_filter = get_context().getClassByName("Align_ComputeShifts2").newInstance()
|
||||
|
||||
"""
|
||||
ip_list = []
|
||||
for index in range(40,49):
|
||||
ip_list.append(open_image(expand_path("{images}/TestObjAligner/i210517_0" + str(index) + "#001.tif")))
|
||||
stack = create_stack(ip_list, title = "Test")
|
||||
stack.show()
|
||||
|
||||
complex_edge_filter.setup("2,True,False", stack) #Gaussian blur radius, Complex (True) or Real (False), show dialog = False
|
||||
complex_edge_filter.r"un(stack.getProcessor())
|
||||
imp_r, imp_i = complex_edge_filter.output
|
||||
|
||||
#imp_r.show()
|
||||
#imp_i.show()
|
||||
roi=Roi(258,0,256,256)
|
||||
compute_shifts_filter.setup(10, False, ipr, ipi, 1, roi)
|
||||
compute_shifts_filter.run(None)
|
||||
shifts = compute_shifts_filter.shifts
|
||||
|
||||
translation_filter.shifts = shifts
|
||||
translation_filter.setup("",stack)
|
||||
translation_filter.run(stack.getProcessor())
|
||||
|
||||
translation_filter.registred.show();
|
||||
translation_filter.registred.updateAndDraw();
|
||||
|
||||
"""
|
||||
|
||||
roi=Roi(258,0,256,256)
|
||||
shifts = calculate_shifts(ipr, ipi, roi, 2)
|
||||
r=translate(stack, shifts, True)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user