Mercurial > repos > imgteam > anisotropic_diffusion
comparison anisotropic_diffusion.py @ 1:8ef57910245b draft default tip
planemo upload for repository https://github.com/BMCV/galaxy-image-analysis/tools/anisotropic-diffusion/ commit b2acc1845a25828181597fe5b6982fe116a7796d
| author | imgteam |
|---|---|
| date | Mon, 22 Jul 2019 04:55:10 -0400 |
| parents | f2d41197a87f |
| children |
comparison
equal
deleted
inserted
replaced
| 0:f2d41197a87f | 1:8ef57910245b |
|---|---|
| 12 parser.add_argument('niter', type=int, help='Number of iterations', default=1) | 12 parser.add_argument('niter', type=int, help='Number of iterations', default=1) |
| 13 parser.add_argument('kappa', type=int, help='Conduction coefficient', default=50) | 13 parser.add_argument('kappa', type=int, help='Conduction coefficient', default=50) |
| 14 parser.add_argument('gamma', type=float, help='Speed of diffusion', default=0.1) | 14 parser.add_argument('gamma', type=float, help='Speed of diffusion', default=0.1) |
| 15 parser.add_argument('eqoption', type=int, choices=[1,2], help='Perona Malik diffusion equation', default=1) | 15 parser.add_argument('eqoption', type=int, choices=[1,2], help='Perona Malik diffusion equation', default=1) |
| 16 args = parser.parse_args() | 16 args = parser.parse_args() |
| 17 | 17 |
| 18 with warnings.catch_warnings(): | 18 with warnings.catch_warnings(): |
| 19 warnings.simplefilter("ignore") #to ignore FutureWarning as well | 19 warnings.simplefilter("ignore") #to ignore FutureWarning as well |
| 20 | 20 |
| 21 img_in = skimage.io.imread(args.input_file.name, plugin='tifffile') | 21 img_in = skimage.io.imread(args.input_file.name, plugin='tifffile') |
| 22 res = anisotropic_diffusion(img_in, niter=args.niter, kappa=args.kappa, gamma=args.gamma, option=args.eqoption) | 22 res = anisotropic_diffusion(img_in, niter=args.niter, kappa=args.kappa, gamma=args.gamma, option=args.eqoption) |
