本文整理匯總了Java中ij.plugin.FolderOpener類的典型用法代碼示例。如果您正苦於以下問題:Java FolderOpener類的具體用法?Java FolderOpener怎麽用?Java FolderOpener使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
FolderOpener類屬於ij.plugin包,在下文中一共展示了FolderOpener類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import ij.plugin.FolderOpener; //導入依賴的package包/類
public static void main( final String[] args )
{
new ImageJ();
// final ImagePlus imp = new ImagePlus( "/data/hanslovskyp/davi_toy_set/substacks/shuffle/03/data/data.tif" );
final ImagePlus imp = new FolderOpener().openFolder( "/data/hanslovskyp/forPhilipp/substacks/03/data/" );
// final ImagePlus imp = new FolderOpener().openFolder( "/data/hanslovskyp/davi_toy_set/data/seq" );
// final ImagePlus imp = new ImagePlus( "/data/hanslovskyp/strip-example-small.tif" );
imp.show();
new ZPositionCorrection().run( "" );
}
示例2: getBatchImages
import ij.plugin.FolderOpener; //導入依賴的package包/類
public static String[] getBatchImages(String directory)
{
if (directory == null)
return null;
// Get a list of files
File[] fileList = (new File(directory)).listFiles();
if (fileList == null)
return null;
// Exclude directories
String[] list = new String[fileList.length];
int c = 0;
for (int i = 0; i < list.length; i++)
if (fileList[i].isFile())
list[c++] = fileList[i].getName();
list = Arrays.copyOf(list, c);
// Now exclude non-image files as per the ImageJ FolderOpener
FolderOpener fo = new FolderOpener();
list = fo.trimFileList(list);
if (list == null)
return null;
list = fo.sortFileList(list);
// Now exclude mask images
c = 0;
for (String name : list)
{
if (name.contains("mask."))
continue;
list[c++] = name;
}
return Arrays.copyOf(list, c);
}
示例3: getFileFromOption
import ij.plugin.FolderOpener; //導入依賴的package包/類
public static ImagePlus getFileFromOption( final String path )
{
return path.equals( "" ) ? IJ.getImage() : ( new File( path ).isDirectory() ? FolderOpener.open( path ) : new ImagePlus( path ) );
}