################################################################################################### 
# Example of using ImageJ functionalities through ijutils.
################################################################################################### 

from ijutils import *
import java.awt.Color as Color

#Image Loading
ip = load_image("images/img.png", title="Image")

aux = grayscale(ip, in_place = False)
bin = ip.duplicate()
ip_bin = auto_threshold(aux, in_place=False)
create_stack([ ip_bin, 
               #binary_fill_holes(ip_bin, in_place=False),
               #binary_outline(ip_bin, in_place=False),
               #binary_outline(binary_fill_holes(ip_bin, in_place=False)),
               binary_dilate(ip_bin, in_place=False),
               binary_erode(ip_bin, in_place=False),
               binary_open(ip_bin, in_place=False),
               binary_close(ip_bin, in_place=False),
               binary_skeletonize(ip_bin, in_place=False)], title = "Binarization").show()            

