当前位置: 首页>>代码示例>>Java>>正文


Java GenericDialogPlus.getNextChoice方法代码示例

本文整理汇总了Java中fiji.util.gui.GenericDialogPlus.getNextChoice方法的典型用法代码示例。如果您正苦于以下问题:Java GenericDialogPlus.getNextChoice方法的具体用法?Java GenericDialogPlus.getNextChoice怎么用?Java GenericDialogPlus.getNextChoice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fiji.util.gui.GenericDialogPlus的用法示例。


在下文中一共展示了GenericDialogPlus.getNextChoice方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
@Override
public void run(String arg0)
{
	GenericDialogPlus gd = new GenericDialogPlus("Stitch Image Collection");
	
	//gd.addStringField("Layout file", fileNameStatic, 50);
	gd.addFileField("Layout file", fileNameStatic, 50);		
	gd.addCheckbox("compute_overlap (otherwise use the coordinates given in the layout file)", computeOverlapStatic );
	gd.addChoice("Channels_for_Registration", colorList, handleRGBStatic);
	gd.addChoice("rgb_order", rgbTypes, rgbOrderStatic);
	gd.addChoice("Fusion_Method", methodListCollection, methodListCollection[LIN_BLEND]);
	gd.addNumericField("Fusion alpha", alphaStatic, 2);
	gd.addNumericField("Regression Threshold", thresholdRStatic, 2);
	gd.addNumericField("Max/Avg Displacement Threshold", thresholdDisplacementRelativeStatic, 2);		
	gd.addNumericField("Absolute Avg Displacement Threshold", thresholdDisplacementAbsoluteStatic, 2);		
	gd.addCheckbox("Create_only_Preview", previewOnlyStatic);
	gd.addMessage("");
	gd.addMessage("This Plugin is developed by Stephan Preibisch\n" + myURL);

	MultiLineLabel text = (MultiLineLabel) gd.getMessage();
	addHyperLinkListener(text, myURL);

	gd.showDialog();
	if (gd.wasCanceled()) return;

	String fileName = gd.getNextString();
	fileNameStatic = fileName;

	boolean computeOverlap = gd.getNextBoolean();
	computeOverlapStatic = computeOverlap;

	String handleRGB = gd.getNextChoice();
	handleRGBStatic = handleRGB;
	
	this.rgbOrder = gd.getNextChoice();
	rgbOrderStatic = rgbOrder;
	
	String fusionMethod = gd.getNextChoice();
	fusionMethodStatic = fusionMethod;
	
	this.alpha = gd.getNextNumber();
	alphaStatic = alpha;
	
	this.thresholdR = gd.getNextNumber();
	thresholdRStatic = thresholdR;
	
	this.thresholdDisplacementRelative = gd.getNextNumber();
	thresholdDisplacementRelativeStatic = thresholdDisplacementRelative;
	
	this.thresholdDisplacementAbsolute = gd.getNextNumber();
	thresholdDisplacementAbsoluteStatic = thresholdDisplacementAbsolute;
	
	boolean previewOnly = gd.getNextBoolean();
	previewOnlyStatic = previewOnly;
	
	work(fileName, previewOnly, computeOverlap, fusionMethod, handleRGB, true);		
}
 
开发者ID:fiji,项目名称:Stitching,代码行数:58,代码来源:Stitch_Image_Collection.java

示例2: stitchCollection

import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
/**
 * Manages the dialog for stitching a collection of images defined by a Tileconfiguration file
 */
public void stitchCollection()
{
	final GenericDialogPlus gd = new GenericDialogPlus("Stitch Image Collection");
	
	//gd.addStringField("Layout file", fileNameStatic, 50);
	gd.addFileField( "Layout file", fileNameStatic, 50 );		
	gd.addCheckbox( "compute_overlap (otherwise use the coordinates given in the layout file)", computeOverlapStatic );
	gd.addChoice( "Channels_for_Registration", colorList, handleRGBStatic );
	gd.addChoice( "rgb_order", rgbTypes, rgbOrderStatic );
	gd.addChoice( "Fusion_Method", methodListCollection, methodListCollection[LIN_BLEND] );
	gd.addNumericField( "Fusion alpha", alphaStatic, 2 );
	gd.addNumericField( "Regression Threshold", thresholdRStatic, 2 );
	gd.addNumericField( "Max/Avg Displacement Threshold", thresholdDisplacementRelativeStatic, 2 );		
	gd.addNumericField( "Absolute Avg Displacement Threshold", thresholdDisplacementAbsoluteStatic, 2 );		
	gd.addCheckbox( "Create_only_Preview", previewOnlyStatic );
	gd.addMessage( "");
	gd.addMessage( "This Plugin is developed by Stephan Preibisch\n" + myURL );

	MultiLineLabel text = (MultiLineLabel) gd.getMessage();
	addHyperLinkListener(text, myURL);

	gd.showDialog();
	if (gd.wasCanceled()) return;

	String fileName = gd.getNextString();
	fileNameStatic = fileName;

	boolean computeOverlap = gd.getNextBoolean();
	computeOverlapStatic = computeOverlap;

	String handleRGB = gd.getNextChoice();
	handleRGBStatic = handleRGB;
	
	String rgbOrder = gd.getNextChoice();
	rgbOrderStatic = rgbOrder;
	
	String fusionMethod = gd.getNextChoice();
	fusionMethodStatic = fusionMethod;
	
	double alpha = gd.getNextNumber();
	alphaStatic = alpha;
	
	double thresholdR = gd.getNextNumber();
	thresholdRStatic = thresholdR;
	
	double thresholdDisplacementRelative = gd.getNextNumber();
	thresholdDisplacementRelativeStatic = thresholdDisplacementRelative;
	
	double thresholdDisplacementAbsolute = gd.getNextNumber();
	thresholdDisplacementAbsoluteStatic = thresholdDisplacementAbsolute;
	
	boolean previewOnly = gd.getNextBoolean();
	previewOnlyStatic = previewOnly;	
	
	runStitching();
}
 
开发者ID:fiji,项目名称:Stitching,代码行数:60,代码来源:Stitch_Many_Images.java

示例3: getInput

import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
/**
 * Displays a dialog to harvest user input, allowing scaling from a
 * specified image width and height.
 * 
 * @param imgWidth Base image width
 * @param imgHeight Base image height
 */
public void getInput(int imgWidth, int imgHeight) {
	originalWidth = imgWidth;
	originalHeight = imgHeight;
	final GenericDialogPlus gdDownSample = new GenericDialogPlus("Downsample");
	String[] methods = ImageProcessor.getInterpolationMethods();

	gdDownSample.addNumericField("x scale", 1, 1);
	gdDownSample.addNumericField("y scale", 1, 1);
	gdDownSample.addNumericField("width (pixels)", imgWidth, 0);
	gdDownSample.addNumericField("height (pixels)", imgHeight, 0);
	gdDownSample.addChoice("Interpolation:", methods,
		methods[methods.length - 1]);
	gdDownSample.addCheckbox("Average when downsizing", true);
	Vector<?> fields = gdDownSample.getNumericFields();
	xField = (TextComponent) fields.get(0);
	yField = (TextComponent) fields.get(1);
	widthField = (TextComponent) fields.get(2);
	heightField = (TextComponent) fields.get(3);

	xField.addTextListener(textListener);
	xField.addFocusListener(focusListener);
	yField.addTextListener(textListener);
	yField.addFocusListener(focusListener);
	widthField.addTextListener(textListener);
	widthField.addFocusListener(focusListener);
	heightField.addTextListener(textListener);
	heightField.addFocusListener(focusListener);
	gdDownSample.showDialog();

	if (gdDownSample.wasOKed()) {
		xScale = gdDownSample.getNextNumber();
		yScale = gdDownSample.getNextNumber();
		double width = gdDownSample.getNextNumber();
		double height = gdDownSample.getNextNumber();
		String method = gdDownSample.getNextChoice();
		String average = gdDownSample.getNextBoolean() ? " average" : "";
		params =
			"width=" + width + " height=" +
				height + average + " interpolation=" + method;
	}
}
 
开发者ID:fiji,项目名称:Stitching,代码行数:49,代码来源:Downsampler.java


注:本文中的fiji.util.gui.GenericDialogPlus.getNextChoice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。