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


Java GenericDialogPlus.addMessage方法代码示例

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


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

示例1: getParameters

import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
public static Parameters getParameters()
{
	final GenericDialogPlus gd = new GenericDialogPlus( "Resave dataset as TIFF" );

	if ( defaultPath == null )
		defaultPath = LoadParseQueryXML.defaultXMLfilename;

	PluginHelper.addSaveAsFileField( gd, "Select new XML", defaultPath, 80 );
	
	gd.addChoice( "ImgLib2_data_container", StackList.imglib2Container, StackList.imglib2Container[ defaultContainer ] );
	gd.addCheckbox( "Lossless compression of TIFF files (ZIP)", defaultCompress );
	gd.addMessage( "Use ArrayImg if -ALL- input views are smaller than ~2048x2048x500 px (2^31 px), or if the\n" +
				   "program throws an OutOfMemory exception while processing.  CellImg is slower, but more\n" +
			       "memory efficient and supports much larger file sizes only limited by the RAM of the machine.", 
			       new Font( Font.SANS_SERIF, Font.ITALIC, 11 ) );

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

	final Parameters params = new Parameters();
	
	params.xmlFile = gd.getNextString();
	
	if ( !params.xmlFile.endsWith( ".xml" ) )
		params.xmlFile += ".xml";

	params.compress = defaultCompress = gd.getNextBoolean();

	defaultPath = LoadParseQueryXML.defaultXMLfilename = params.xmlFile;

	if ( ( defaultContainer = gd.getNextChoiceIndex() ) == 0 )
		params.imgFactory = new ArrayImgFactory< FloatType >();
	else
		params.imgFactory = new CellImgFactory< FloatType >();

	return params;
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:40,代码来源:Resave_TIFF.java

示例2: queryDirectoryAndRatio

import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
protected DHMMetaData queryDirectoryAndRatio()
{
	GenericDialogPlus gd = new GenericDialogPlus( "Specify Holographic Acquistion Directory" );

	gd.addDirectoryField( "Holographic_Acquisition main directory", defaultDir, 50 );

	gd.addMessage( "" );
	gd.addMessage( "Camera pixel size (e.g. 3.45um) / Magnification (e.g. 20):" );
	gd.addNumericField( "Pixel_distance_x", defaulCalX, 5 );
	gd.addNumericField( "Pixel_distance_y", defaulCalY, 5 );
	gd.addMessage( "Depth between planes (e.g. 0.5mm) / Magnification^2 (e.g. 20^2) * 1000 (mm to um):" );
	gd.addNumericField( "Pixel_distance_z", defaulCalZ, 5 );
	gd.addStringField( "Pixel_unit", defaulCalUnit );
	gd.addMessage( "" );
	gd.addCheckbox( "Open_all planes to ensure they have the same dimensions (takes time!)", defaultOpenAll );
	gd.showDialog();

	if ( gd.wasCanceled() )
		return null;

	return new DHMMetaData(
			new File( defaultDir = gd.getNextString() ),
			defaulCalX = gd.getNextNumber(),
			defaulCalY = gd.getNextNumber(),
			defaulCalZ = gd.getNextNumber(),
			defaulCalUnit = gd.getNextString(),
			defaultOpenAll = gd.getNextBoolean() );
}
 
开发者ID:fiji,项目名称:SPIM_Registration,代码行数:29,代码来源:DHM.java

示例3: 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

示例4: 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

示例5: getParameters

import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
protected Parameters getParameters( final String sourcePathStr )
{
	while ( true )
	{
		final GenericDialogPlus gd = new GenericDialogPlus( "CellVoyager Import" );

		gd.addStringField( "Subsampling factors", lastSubsampling, 25 );
		gd.addStringField( "Hdf5 chunk sizes", lastChunkSizes, 25 );
		gd.addMessage( "" );

		if ( null == sourcePathStr )
		{
			if ( null == sourceFolderStr )
			{
				final File folder = new File( System.getProperty( "user.dir" ) ).getParentFile().getParentFile();
				sourceFolderStr = folder.getAbsolutePath();
			}
		}
		else
		{
			sourceFolderStr = sourcePathStr;
		}
		addBrowseToCellVoyagerFolder( gd, "Measurement folder", sourceFolderStr, 25 );

		if ( null == lastExportPath )
		{
			final File sourceFile = new File( sourceFolderStr );
			final String parentFolder = sourceFile.getParent();
			lastExportPath = new File( parentFolder, "export.xml" ).getAbsolutePath();
		}
		PluginHelper.addSaveAsFileField( gd, "Export to", lastExportPath, 25 );

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

		lastSubsampling = gd.getNextString();
		lastChunkSizes = gd.getNextString();
		sourceFolderStr = gd.getNextString();
		lastExportPath = gd.getNextString();

		// parse mipmap resolutions and cell sizes
		final int[][] resolutions = PluginHelper.parseResolutionsString( lastSubsampling );
		final int[][] subdivisions = PluginHelper.parseResolutionsString( lastChunkSizes );
		if ( resolutions.length == 0 )
		{
			IJ.showMessage( "Cannot parse subsampling factors: " + lastSubsampling );
			continue;
		}
		if ( subdivisions.length == 0 )
		{
			IJ.showMessage( "Cannot parse hdf5 chunk sizes: " + lastChunkSizes );
			continue;
		}
		else if ( resolutions.length != subdivisions.length )
		{
			IJ.showMessage( "Subsampling factors and hdf5 chunk sizes must have the same number of elements." );
			continue;
		}

		final File sourceFolder = new File( sourceFolderStr );

		String seqFilename = lastExportPath;
		if ( !seqFilename.endsWith( ".xml" ) )
			seqFilename += ".xml";
		final File seqFile = new File( seqFilename );
		final File parent = seqFile.getParentFile();
		if ( parent == null || !parent.exists() || !parent.isDirectory() )
		{
			IJ.showMessage( "Invalid export filename " + seqFilename );
			continue;
		}
		final String hdf5Filename = seqFilename.substring( 0, seqFilename.length() - 4 ) + ".h5";
		final File hdf5File = new File( hdf5Filename );

		return new Parameters( resolutions, subdivisions, sourceFolder, seqFile, hdf5File );
	}
}
 
开发者ID:bigdataviewer,项目名称:bigdataviewer_fiji,代码行数:79,代码来源:ExportCellVoyagerPlugIn.java


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