Last active
June 14, 2019 12:15
-
-
Save bogovicj/2512688b85a57a62f6260da335408d6b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#@ OpService ops | |
#@ UIService ui | |
#@ Dataset(label="Binary image") image | |
#@ Integer(label="Width of the structuring element", min=1, value=1) width | |
/* | |
* A Fiji script for applying a morphological opening using imageJ ops, | |
*/ | |
import net.imglib2.type.numeric.integer.*; | |
import net.imglib2.algorithm.neighborhood.*; | |
shape = new DiamondShape( width ) | |
result = ops.create().img( image, new UnsignedByteType()) | |
ops.morphology().open( result, image, [ shape ] ) | |
ui.show( result ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment