Created
July 3, 2015 10:08
-
-
Save kevin-keraudren/120239e19007932223de to your computer and use it in GitHub Desktop.
ImageJ Jython script: CLAHE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env jython | |
from ij import IJ | |
import sys | |
from mpicbg.ij.clahe import Flat | |
# http://fiji.sc/wiki/index.php/Enhance_Local_Contrast_(CLAHE) | |
# http://fiji.sc/cgi-bin/gitweb.cgi?p=mpicbg.git;a=blob;f=mpicbg/ij/clahe/PlugIn.java;h=663153764493547de560c08ee11f2e6b1e7e1a32;hb=HEAD | |
blocksize = 50 | |
histogram_bins = 128 | |
maximum_slope = 3 | |
mask = "*None*" | |
fast = False | |
process_as_composite = False | |
composite = False | |
mask = None | |
input_filename = sys.argv[1] | |
output_filename = sys.argv[2] | |
img = IJ.openImage( input_filename ) | |
Flat.getInstance().run( img, | |
blocksize, | |
histogram_bins, | |
maximum_slope, | |
mask, | |
composite ) | |
IJ.save( img, output_filename ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment