comparison landmark_registration.py @ 1:b0503eec7bd6 draft

planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/landmark_registration/ commit 67c2b8416f6b142988304328bd67503bdfdcb802
author imgteam
date Fri, 22 Feb 2019 19:04:47 -0500
parents a71239f3543a
children 4e089a0983b1
comparison
equal deleted inserted replaced
0:a71239f3543a 1:b0503eec7bd6
12 dst = np.concatenate([np.array(points2['x']).reshape([-1,1]), np.array(points2['y']).reshape([-1,1])], axis=-1) 12 dst = np.concatenate([np.array(points2['x']).reshape([-1,1]), np.array(points2['y']).reshape([-1,1])], axis=-1)
13 13
14 model = AffineTransform() 14 model = AffineTransform()
15 model_robust, inliers = ransac((src, dst), AffineTransform, min_samples=3, 15 model_robust, inliers = ransac((src, dst), AffineTransform, min_samples=3,
16 residual_threshold=residual_threshold, max_trials=max_trials) 16 residual_threshold=residual_threshold, max_trials=max_trials)
17 pd.DataFrame(model_robust.params).to_csv(out_file, header = None, index = False) 17 pd.DataFrame(model_robust.params).to_csv(out_file, header=None, index=False, sep="\t")
18 18
19 if __name__ == "__main__": 19 if __name__ == "__main__":
20 parser = argparse.ArgumentParser(description="Estimate transformation from points") 20 parser = argparse.ArgumentParser(description="Estimate transformation from points")
21 parser.add_argument("points_file1", help="Paste path to src points") 21 parser.add_argument("points_file1", help="Paste path to src points")
22 parser.add_argument("points_file2", help="Paste path to dst points") 22 parser.add_argument("points_file2", help="Paste path to dst points")