本文整理汇总了Java中ij.plugin.filter.PlugInFilterRunner类的典型用法代码示例。如果您正苦于以下问题:Java PlugInFilterRunner类的具体用法?Java PlugInFilterRunner怎么用?Java PlugInFilterRunner使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlugInFilterRunner类属于ij.plugin.filter包,在下文中一共展示了PlugInFilterRunner类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
@Override
public int showDialog(final ImagePlus imp, final String command, final PlugInFilterRunner pfr) {
loadFromIJPref();
final GenericDialog dialog = new GenericDialog(TITLE);
dialog.addNumericField("Filter size (n x n)", filterSize, 0, 3, "pixels");
dialog.addPreviewCheckbox(pfr);
dialog.addDialogListener(this);
dialog.showDialog();
if (dialog.wasCanceled()) {
return DONE;
}
saveToIJPref();
return IJ.setupDialog(imp, FLAGS);
}
开发者ID:ij-plugins,项目名称:ijp-toolkit,代码行数:19,代码来源:FastMedianPlugin.java
示例2: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) {
GenericDialog gd = new GenericDialog("Recursive filtering");
gd.addChoice("filter", filter, "Median");
gd.addNumericField("radius", 1, 0, 10, "max.: 3");
gd.addNumericField("max_iterations", 200, 0, 10, "max.: 500");
gd.addPreviewCheckbox(pfr); // passing pfr makes the filter ready for preview
gd.addDialogListener(this); // the DialogItemChanged method will be called on user input
gd.showDialog(); // display the dialog; preview runs in the background now
if (gd.wasCanceled()) {
imp.setTitle(originalImageTitle);
return DONE;
}
IJ.register(this.getClass()); // protect static class variables (filter parameters) from garbage collection
//radius = (int) gd.getNextNumber();
this.pfr = pfr;
return IJ.setupDialog(imp, flags);
}
开发者ID:biovoxxel,项目名称:BioVoxxel_Toolbox,代码行数:19,代码来源:Basic_Recursive_Filters.java
示例3: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) {
if(!imp.getProcessor().isBinary()) {
IJ.error("works only on 8-bit binary images");
return DONE;
}
GenericDialog gd = new GenericDialog("Watershed Irregular Features");
gd.addNumericField("erosion cycle number:", 1, 0, 5, "");
gd.addNumericField("convexity_threshold", 0, 2, 5, "");
gd.addStringField("separator_size", "0-Infinity");
gd.addCheckbox("exclude", false);
gd.addPreviewCheckbox(pfr, label); // passing pfr makes the filter ready for preview
gd.addDialogListener(this); // the DialogItemChanged method will be called on user input
gd.addHelp("http://fiji.sc/BioVoxxel_Toolbox#Watershed_Irregular_Features");
gd.showDialog(); // display the dialog; preview runs in the background now
if (gd.wasCanceled()) {
return DONE;
}
IJ.register(this.getClass()); // protect static class variables (filter parameters) from garbage collection
this.pfr = pfr;
return IJ.setupDialog(imp, flags); // ask whether to process all slices of stack (if a stack)
}
开发者ID:biovoxxel,项目名称:BioVoxxel_Toolbox,代码行数:24,代码来源:Watershed_Irregular_Features.java
示例4: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
@Override
public int showDialog(ImagePlus imp, String arg, PlugInFilterRunner pfr) {
GenericDialog dialog = new GenericDialog("Peak Finder");
dialog.addCheckbox("Use_Discoidal_Averaging_Filter", useDiscoidalAveraging);
dialog.addNumericField("Inner_radius", innerRadius, 0);
dialog.addNumericField("Outer_radius", outerRadius, 0);
dialog.addNumericField("Threshold (mean + n times standard deviation)", threshold, 2);
dialog.addNumericField("Threshold_value (0 = ignore)", thresholdValue, 2);
dialog.addNumericField("Selection_radius (in pixels)", selectionRadius, 0);
dialog.addNumericField("Minimum_distance between peaks (in pixels)", minimumDistance, 0);
dialog.addDialogListener(this);
dialog.addPreviewCheckbox(pfr);
dialog.showDialog();
if (dialog.wasCanceled())
return DONE;
isPreview = false;
return IJ.setupDialog(imp, flags);
}
开发者ID:SingleMolecule,项目名称:smb-plugins,代码行数:27,代码来源:PeakFinder.java
示例5: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
{
// Note: We cannot use a NonBlockinnericDialog as scrolling through the image
// throws away the snap shot. The pixel data for the previous slice is then fixed
// with the preview. So we can only support a single slice.
GenericDialog gd = new GenericDialog(TITLE);
gd.addHelp(About.HELP_URL);
gd.addMessage("Smooth image:");
gd.addChoice("Spot_filter", filterNames, filterNames[filter1]);
gd.addSlider("Smoothing", 0, 4.5, smooth1);
gd.addCheckbox("Difference_filter", differenceFilter);
gd.addChoice("Spot_filter2", filterNames, filterNames[filter2]);
gd.addSlider("Smoothing2", 1.5, 6, smooth2);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
gd.showDialog();
if (gd.wasCanceled() || !dialogItemChanged(gd, null))
return DONE;
return IJ.setupDialog(imp, flags);
}
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:26,代码来源:SmoothImage.java
示例6: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
@Override
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
{
// Create the configuration dialog
GenericDialog gd = new GenericDialog("Area Opening");
gd.addNumericField("Pixel Number", 100, 0, 10, "pixels");
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
previewing = true;
gd.showDialog();
previewing = false;
if (gd.wasCanceled())
return DONE;
parseDialogParameters(gd);
// clean up an return
gd.dispose();
return flags;
}
开发者ID:ijpb,项目名称:MorphoLibJ,代码行数:24,代码来源:GrayscaleAreaOpeningPlugin.java
示例7: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
@Override
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
{
// Create the configuration dialog
GenericDialog gd = new GenericDialog("Box Diagonal Opening");
gd.addNumericField("Diagonal Min.", 100, 0, 10, "pixels");
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
previewing = true;
gd.showDialog();
previewing = false;
if (gd.wasCanceled())
return DONE;
parseDialogParameters(gd);
// clean up an return
gd.dispose();
return flags;
}
开发者ID:ijpb,项目名称:MorphoLibJ,代码行数:24,代码来源:GrayscaleBoxDiameterOpeningPlugin.java
示例8: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
{
GenericDialog gd = new GenericDialog(TITLE);
// Set-up the HSB images
ColorProcessor cp = (ColorProcessor) imp.getProcessor().duplicate();
getHSB((int[]) cp.getPixels());
gd.addSlider("Hue", 0.01, 1, hue);
gd.addSlider("Hue_width", 0.01, 1, hueWidth);
gd.addSlider("Saturation", 0.01, 1, saturation);
gd.addSlider("Saturation_width", 0.01, 1, saturationWidth);
gd.addSlider("Brightness", 0.01, 1, brightness);
gd.addSlider("Brightness_width", 0.01, 1, brightnessWidth);
gd.addHelp(gdsc.help.URL.UTILITY);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
gd.showDialog();
if (gd.wasCanceled() || !dialogItemChanged(gd, null))
return DONE;
return flags;
}
开发者ID:aherbert,项目名称:GDSC,代码行数:27,代码来源:HSB_Filter.java
示例9: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
{
GenericDialog gd = new GenericDialog(TITLE);
gd.addHelp(URL.UTILITY);
gd.addMessage("Find the closest pairs of marked ROI points");
gd.addSlider("Radius", 5, 50, radius);
gd.addCheckbox("Add_overlay", addOverlay);
gd.addCheckbox("Kill_ROI", killRoi);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
gd.showDialog();
if (gd.wasCanceled() || !dialogItemChanged(gd, null))
{
// Remove any overlay we added
if (addedOverlay)
imp.setOverlay(null);
return DONE;
}
return DOES_ALL | FINAL_PROCESSING;
}
开发者ID:aherbert,项目名称:GDSC,代码行数:25,代码来源:SpotPairs.java
示例10: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
@Override
public int showDialog(final ImagePlus imp, final String command,
final PlugInFilterRunner pfr)
{
initialImp = imp;
calibration = imp.getCalibration();
/*
* command is an empty String if the plugin is called from within the main method of this class (testing). In
* this case we add the name of this class as title.
*/
final String title = (command != "" ? command : "Test " + EFTEMj
.getNameWithoutPackage(this));
if (showParameterDialog(title) == CANCEL) {
canceled();
return NO_CHANGES | DONE;
}
if (createNew == true) {
return FLAGS | NO_CHANGES;
}
return FLAGS;
}
开发者ID:EFTEMj,项目名称:EFTEMj,代码行数:22,代码来源:StackShifterPlugin.java
示例11: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
@Override
public int showDialog(final ImagePlus imp, final String command,
final PlugInFilterRunner pfr)
{
if (imp.getStackSize() != 2 & imp.getStackSize() != 3) {
IJ.error("Wrong Image", "The stack has not a size of 2 or 3.\n" +
"Image 1: The detected borders.\n" +
"(Image 2: The unprocessed borders.)\n" +
"Image 2(3): The original SR-EELS data.");
return DONE;
}
input = imp;
calibration = imp.getCalibration();
if (showParameterDialog(command) == OK) {
if (rotate) {
final ImagePlus temp = input;
input = new Duplicator().run(input, 1, input.getStackSize(), 1, 1, 1,
1);
temp.unlock();
IJ.run(input, "Rotate 90 Degrees Right", "");
}
return FLAGS;
}
return DONE;
}
开发者ID:EFTEMj,项目名称:EFTEMj,代码行数:26,代码来源:SR_EELS_CorrectionOnlyPlugin.java
示例12: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
/** Displays the dialog prompt. */
@Override
public int showDialog(final ImagePlus imp, final String command, final PlugInFilterRunner pfr) {
this.pfr = pfr;
final String msg = "<html><div WIDTH=350>"
+ "<a href='https://github.com/tferr/Scripts/blob/master/Segmentation/README.md#shen-castan-edge-detector'>"
+ "Shen-Castan</a> filtering is an edge detection technique. It is an alternative "
+ "to other popular approaches such as "
+ "<a href='http://en.wikipedia.org/wiki/Canny_edge_detector'>Canny</a>-"
+ "<a href='http://en.wikipedia.org/wiki/Deriche_edge_detector'>Deriche</a> filtering.</p>"
+ "<p>The Shen-Castan coefficient corresponds to a smooting factor <i>alpha</i>. "
+ "<i>Alpha</i> can vary between 0 (high smoothing, suitable for noisy images) "
+ "and 1 (no smoothing, suitable for non-noisy images).</p></div></html>";
final GenericDialog gd = new GenericDialog(command);
gd.addSlider("Coefficient:", 0.0001d, 1.0001d, f);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
gd.addHelp(msg);
gd.showDialog();
if (gd.wasCanceled() || !dialogItemChanged(gd, null)) // read parameters
return DONE;
return IJ.setupDialog(imp, flags);
}
开发者ID:tferr,项目名称:Scripts,代码行数:26,代码来源:ShenCastan.java
示例13: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog (ImagePlus imp, String command, PlugInFilterRunner pfr) {
gd = new GenericDialog("Naive Background Correction");
gd.addNumericField("Radius:", 3.00, 2);
gd.addSlider("Iteration",1,30,15);
gd.addCheckbox("Subtract background",true);
gd.addCheckbox("Divide background",false);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
gd.showDialog();
if (gd.wasCanceled()) return DONE;
IJ.register(this.getClass()); // protect static class variables (parameters) from garbage collection
return IJ.setupDialog(imp, FLAGS);
}
开发者ID:keithoffer,项目名称:ImageJ-Naive-Background-Correction,代码行数:14,代码来源:Naive_Background_Correction.java
示例14: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog (ImagePlus imp, String command, PlugInFilterRunner pfr) {
if (doOptions) {
this.imp = imp;
this.pfr = pfr;
GenericDialog gd = new GenericDialog("Binary Options");
gd.addNumericField("Iterations (1-"+MAX_ITERATIONS+"):", iterations, 0, 3, "");
gd.addNumericField("Count (1-8):", count, 0, 3, "");
gd.addCheckbox("Black background", Prefs.blackBackground);
gd.addCheckbox("Pad edges when eroding", Prefs.padEdges);
gd.addChoice("EDM output:", outputTypes, outputTypes[EDM.getOutputType()]);
if (imp != null) {
gd.addChoice("Do:", operations, operation);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
previewing = true;
}
gd.addHelp(IJ.URL+"/docs/menus/process.html#options");
gd.showDialog();
previewing = false;
if (gd.wasCanceled()) return DONE;
if (imp==null) { //options dialog only, no do/preview
dialogItemChanged(gd, null); //read dialog result
return DONE;
}
return operation.equals(NO_OPERATION) ? DONE : IJ.setupDialog(imp, flags);
} else { //no dialog, 'arg' is operation type
if (!imp.getProcessor().isBinary()) {
IJ.error("8-bit binary (black and white only) image required.");
return DONE;
}
return IJ.setupDialog(imp, flags);
}
}
开发者ID:mstritt,项目名称:orbit-image-analysis,代码行数:34,代码来源:BinaryOrbit.java
示例15: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) {
gd = new GenericDialog("Convolver...", IJ.getInstance());
gd.addTextAreas(kernelText, null, 10, 30);
gd.addPanel(makeButtonPanel(gd));
gd.addCheckbox("Normalize Kernel", normalizeFlag);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
gd.showDialog();
if (gd.wasCanceled()) return DONE;
this.pfr = pfr;
return IJ.setupDialog(imp, flags);
}
开发者ID:biocompibens,项目名称:SME,代码行数:13,代码来源:SME_ENS_Convolver.java
示例16: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
/** Called by the PlugInFilterRunner after setup.
* Asks the user in case of a stack and prepares a separate ouptut stack if required
*/
public int showDialog (ImagePlus imp, String command, PlugInFilterRunner pfr) {
this.pfr = pfr;
int width = imp.getWidth();
int height= imp.getHeight();
//ask whether to process all slices of stack & prepare stack
//(if required) for writing into it in parallel threads
flags = IJ.setupDialog(imp, flags);
if ((flags&DOES_STACKS)!=0 && outImageType!=BYTE_OVERWRITE) {
outStack = new ImageStack(width, height, imp.getStackSize());
maxFinder.setNPasses(imp.getStackSize());
}
return flags;
}
开发者ID:zitmen,项目名称:thunderstorm,代码行数:18,代码来源:ImageJ_EDM.java
示例17: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
@Override
public int showDialog(ImagePlus imp, String arg, PlugInFilterRunner pfr) {
GenericDialog dialog = new GenericDialog("Peak Fitter");
dialog.addCheckbox("Use_Discoidal_Averaging_Filter", useDiscoidalAveraging);
dialog.addNumericField("Inner_radius", innerRadius, 0);
dialog.addNumericField("Outer_radius", outerRadius, 0);
dialog.addNumericField("Threshold (mean + n times standard deviation)", threshold, 2);
dialog.addNumericField("Threshold_value (0 = ignore)", thresholdValue, 2);
dialog.addNumericField("Minimum_distance between peaks (in pixels)", minimumDistance, 0);
dialog.addNumericField("Fit_radius", fitRadius, 0);
dialog.addNumericField("Max_error_baseline", maxError[0], 2);
dialog.addNumericField("Max_error_height", maxError[1], 2);
dialog.addNumericField("Max_error_x", maxError[2], 2);
dialog.addNumericField("Max_error_y", maxError[3], 2);
dialog.addNumericField("Max_error_sigma_x", maxError[4], 2);
dialog.addNumericField("Max_error_sigma_y", maxError[5], 2);
dialog.addCheckbox("Fit_peaks_inside_rois", isRoiFit);
dialog.addDialogListener(this);
dialog.addPreviewCheckbox(pfr);
dialog.showDialog();
if (dialog.wasCanceled())
return DONE;
isPreview = false;
return IJ.setupDialog(imp, flags);
}
开发者ID:SingleMolecule,项目名称:smb-plugins,代码行数:36,代码来源:PeakFitter.java
示例18: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
@Override
public int showDialog(ImagePlus imp, String arg, PlugInFilterRunner pfr) {
GenericDialog dialog = new GenericDialog("Discoidal Averaging Filter");
dialog.addNumericField("inner_radius", innerRadius, 0);
dialog.addNumericField("outer_radius", outerRadius, 0);
dialog.addPreviewCheckbox(pfr);
dialog.addDialogListener(this);
dialog.showDialog();
if (dialog.wasCanceled())
return DONE;
return IJ.setupDialog(imp, flags);
}
开发者ID:SingleMolecule,项目名称:smb-plugins,代码行数:16,代码来源:DiscoidalAveragingFilter.java
示例19: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
{
this.pfr = pfr;
preview = true;
GenericDialog gd = new GenericDialog(TITLE);
gd.addHelp(About.HELP_URL);
gd.addMessage("Replace pixels with mean if they are N StdDevs from the mean");
gd.addSlider("Radius", 1, 5, radius);
gd.addSlider("Error (SD units)", 2.5, 7, error);
gd.addPreviewCheckbox(pfr);
gd.addDialogListener(this);
gd.addMessage("");
label = (Label) gd.getMessage();
gd.showDialog();
if (gd.wasCanceled() || !dialogItemChanged(gd, null))
return DONE;
preview = false;
cachedS = cachedSS = null;
label = null;
return IJ.setupDialog(imp, FLAGS);
}
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:30,代码来源:PixelFilter.java
示例20: showDialog
import ij.plugin.filter.PlugInFilterRunner; //导入依赖的package包/类
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr)
{
// Get available kernels
String[] names = Utils.getImageList(Utils.GREY_SCALE | Utils.SINGLE);
if (names.length == 0)
{
IJ.error(TITLE, "No suitable kernel images");
return DONE;
}
this.dataImp=imp;
ExtendedGenericDialog gd = new ExtendedGenericDialog(TITLE);
gd.addHelp(About.HELP_URL);
gd.addMessage("Convolve an image using another image as the convolution kernel");
gd.addChoice("Kernel_image", names, title);
gd.addChoice("Method", METHODS, method);
gd.addChoice("Filter", FILTERS, filter);
gd.addSlider("Border", 0, 10, border);
gd.addCheckbox("Zero_outside_image", zero);
gd.addDialogListener(this);
gd.addPreviewCheckbox(pfr);
gd.showDialog();
if (gd.wasCanceled() || !dialogItemChanged(gd, null))
return DONE;
return IJ.setupDialog(imp, FLAGS);
}
开发者ID:aherbert,项目名称:GDSC-SMLM,代码行数:34,代码来源:ImageKernelFilter.java
注:本文中的ij.plugin.filter.PlugInFilterRunner类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论