本文整理汇总了Java中fiji.util.gui.GenericDialogPlus.addFileField方法的典型用法代码示例。如果您正苦于以下问题:Java GenericDialogPlus.addFileField方法的具体用法?Java GenericDialogPlus.addFileField怎么用?Java GenericDialogPlus.addFileField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fiji.util.gui.GenericDialogPlus
的用法示例。
在下文中一共展示了GenericDialogPlus.addFileField方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: queryCZIFile
import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
protected File queryCZIFile()
{
GenericDialogPlus gd = new GenericDialogPlus( "Define Lightsheet Z.1 Dataset" );
gd.addFileField( "First_CZI file of the dataset", defaultFirstFile, 50 );
gd.showDialog();
if ( gd.wasCanceled() )
return null;
final File firstFile = new File( defaultFirstFile = gd.getNextString() );
if ( !firstFile.exists() )
{
IOFunctions.println( "File '" + firstFile.getAbsolutePath() + "' does not exist. Stopping" );
return null;
}
else
{
IOFunctions.println( "Investigating file '" + firstFile.getAbsolutePath() + "'." );
return firstFile;
}
}
示例2: querySLDFile
import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
protected File querySLDFile() {
GenericDialogPlus gd = new GenericDialogPlus("Define SlideBook6 diSPIM Dataset");
gd.addFileField("SlideBook6 SLD file", defaultFilePath, 50);
gd.showDialog();
if (gd.wasCanceled())
return null;
final File firstFile = new File(defaultFilePath = gd.getNextString());
if (!firstFile.exists()) {
IOFunctions.println("File '" + firstFile.getAbsolutePath() + "' does not exist. Stopping");
return null;
} else {
IOFunctions.println("Investigating file '" + firstFile.getAbsolutePath() + "'.");
return firstFile;
}
}
示例3: queryMMFile
import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
protected File queryMMFile()
{
GenericDialogPlus gd = new GenericDialogPlus( "Define MicroMananger diSPIM Dataset" );
gd.addFileField( "MicroManager OME TIFF file", defaultFirstFile, 50 );
gd.showDialog();
if ( gd.wasCanceled() )
return null;
final File firstFile = new File( defaultFirstFile = gd.getNextString() );
if ( !firstFile.exists() )
{
IOFunctions.println( "File '" + firstFile.getAbsolutePath() + "' does not exist. Stopping" );
return null;
}
else
{
IOFunctions.println( "Investigating file '" + firstFile.getAbsolutePath() + "'." );
return firstFile;
}
}
示例4: 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);
}
示例5: 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();
}
示例6: getInteractiveDoGParameters
import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
/**
* Can be called with values[ 3 ], i.e. [initialsigma, sigma2, threshold] or
* values[ 2 ], i.e. [initialsigma, threshold]
*
* The results are stored in the same array.
* If called with values[ 2 ], sigma2 changing will be disabled
*
* @param text - the text which is shown when asking for the file
* @param values - the intial values and also contains the result
*/
public static void getInteractiveDoGParameters( final String text, final double values[] )
{
final GenericDialogPlus gd = new GenericDialogPlus( text );
gd.addFileField( "", spimDataDirectory, 50 );
gd.showDialog();
if ( gd.wasCanceled() )
return;
final String file = gd.getNextString();
IOFunctions.println( "Loading " + file );
final Image<FloatType> img = LOCI.openLOCIFloatType( file, new ArrayContainerFactory() );
if ( img == null )
{
IOFunctions.println( "File not found: " + file );
return;
}
img.getDisplay().setMinMax();
final ImagePlus imp = ImageJFunctions.copyToImagePlus( img );
img.close();
imp.show();
imp.setSlice( imp.getStackSize() / 2 );
imp.setRoi( 0, 0, imp.getWidth()/3, imp.getHeight()/3 );
final InteractiveDoG idog = new InteractiveDoG();
if ( values.length == 2 )
{
idog.setSigma2isAdjustable( false );
idog.setInitialSigma( (float)values[ 0 ] );
idog.setThreshold( (float)values[ 1 ] );
}
else
{
idog.setInitialSigma( (float)values[ 0 ] );
idog.setThreshold( (float)values[ 2 ] );
}
idog.run( null );
while ( !idog.isFinished() )
SimpleMultiThreading.threadWait( 100 );
imp.close();
if ( values.length == 2)
{
values[ 0 ] = idog.getInitialSigma();
values[ 1 ] = idog.getThreshold();
}
else
{
values[ 0 ] = idog.getInitialSigma();
values[ 1 ] = idog.getSigma2();
values[ 2 ] = idog.getThreshold();
}
}
示例7: getInteractiveIntegralParameters
import fiji.util.gui.GenericDialogPlus; //导入方法依赖的package包/类
/**
* Can be called with values[ 3 ], i.e. [r1, r2, threshold] (r2 is only written as result)
*
* The results are stored in the same array.
*
* @param text - the text which is shown when asking for the file
* @param values - the intial values and also contains the result
*/
public static void getInteractiveIntegralParameters( final String text, final double values[] )
{
final GenericDialogPlus gd = new GenericDialogPlus( text );
gd.addFileField( "", spimDataDirectory, 50 );
gd.showDialog();
if ( gd.wasCanceled() )
return;
final String file = gd.getNextString();
IOFunctions.println( "Loading " + file );
final Image<FloatType> img = LOCI.openLOCIFloatType( file, new ArrayContainerFactory() );
if ( img == null )
{
IOFunctions.println( "File not found: " + file );
return;
}
img.getDisplay().setMinMax();
final ImagePlus imp = ImageJFunctions.copyToImagePlus( img );
img.close();
imp.show();
imp.setSlice( imp.getStackSize() / 2 );
final InteractiveIntegral ii = new InteractiveIntegral();
ii.setInitialRadius( Math.round( (float)values[ 0 ] ) );
ii.setThreshold( (float)values[ 2 ] );
ii.run( null );
while ( !ii.isFinished() )
SimpleMultiThreading.threadWait( 100 );
imp.close();
values[ 0 ] = ii.getRadius1();
values[ 1 ] = ii.getRadius2();
values[ 2 ] = ii.getThreshold();
}