public class ShenCastan extends Object implements ExtendedPlugInFilter, DialogListener
2014.06-2015.07, Tiago Ferreira
- Extended API
- Works with 16-bit and 32-bit images and stacks (multithreaded)
- If present, only area ROI is processed
- Added "preview" mode and undo support
- Licensed under GPL (see ../../../../../LICENSE.txt)
2004.07, Maxime Pinchon
- Algorithm implementation[1]. This initial version no longer works with IJ
[1] http://imagej.nih.gov/ij/plugins/inserm514/Documentation/Shen_Castan_514/Shen_Castan_514.html
KEEP_PREVIEW
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, KEEP_THRESHOLD, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
Constructor and Description |
---|
ShenCastan() |
Modifier and Type | Method and Description |
---|---|
boolean |
dialogItemChanged(GenericDialog gd,
AWTEvent e)
Reads dialog parameters (during preview and upon dismissal of dialog
prompt).
|
void |
findEdges(ImageProcessor ip,
double f)
Method implementing Shen-Castan edge detection.
|
double[] |
getX()
Returns the horizontal component of the computed gradient.
|
double[] |
getY()
Returns the vertical component of the computed gradient.
|
static void |
main(String[] args)
Calls
fiji.Debug.runFilter() so that the plugin can be debugged from an IDE |
void |
run(ImageProcessor ip) |
void |
setNPasses(int nPasses) |
int |
setup(String arg,
ImagePlus imp)
Returns the flags declaring the type of supported images.
|
int |
showDialog(ImagePlus imp,
String command,
PlugInFilterRunner pfr)
Displays the dialog prompt.
|
public static void main(String[] args)
fiji.Debug.runFilter()
so that the plugin can be debugged from an IDEpublic int setup(String arg, ImagePlus imp)
setup
in interface PlugInFilter
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
showDialog
in interface ExtendedPlugInFilter
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e)
dialogItemChanged
in interface DialogListener
true
, if user specified valid input valuespublic void setNPasses(int nPasses)
setNPasses
in interface ExtendedPlugInFilter
public void run(ImageProcessor ip)
run
in interface PlugInFilter
public void findEdges(ImageProcessor ip, double f)
ip
- the ImageProcessor to be filtered (8/16/32-bit grayscale
image)f
- the smoothing factor alpha, i.e., the Shen-Castan
coefficient. Can vary between 0d
(high smoothing,
suitable for noisy images) and 1d
(no smoothing,
suitable for non-noisy images). Note that no validation is
performed to assess if 0d > alpha < 1d .public double[] getX()
findEdges(ImageProcessor, double)
.public double[] getY()
findEdges(ImageProcessor, double)
.Copyright © 2014–2017 Fiji. All rights reserved.