MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / openAllVirtual

Method openAllVirtual

ij/src/main/java/ij/plugin/Raw.java:46–65  ·  view source on GitHub ↗

Opens all the images in the specified directory as a virtual stack, using the format specified by 'fi'.

(String directory, FileInfo fi)

Source from the content-addressed store, hash-verified

44 /** Opens all the images in the specified directory as a virtual stack,
45 using the format specified by 'fi'. */
46 public static ImagePlus openAllVirtual(String directory, FileInfo fi) {
47 String[] list = new File(directory).list();
48 if (list==null)
49 return null;
50 FolderOpener fo = new FolderOpener();
51 list = fo.trimFileList(list);
52 list = fo.sortFileList(list);
53 if (list==null)
54 return null;
55 directory = IJ.addSeparator(directory);
56 FileInfo[] info = new FileInfo[list.length];
57 for (int i=0; i<list.length; i++) {
58 info[i] = (FileInfo)fi.clone();
59 info[i].directory = directory;
60 info[i].fileName = list[i];
61 }
62 VirtualStack stack = new FileInfoVirtualStack(info);
63 ImagePlus imp = new ImagePlus(directory, stack);
64 return imp;
65 }
66
67}

Callers 2

openAllMethod · 0.95
openImageMethod · 0.95

Calls 5

trimFileListMethod · 0.95
sortFileListMethod · 0.95
addSeparatorMethod · 0.95
cloneMethod · 0.65
listMethod · 0.45

Tested by

no test coverage detected