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

Method addSlice

ij/src/main/java/ij/VirtualStack.java:89–101  ·  view source on GitHub ↗

Adds an image to the end of a virtual stack created using the VirtualStack(w,h,cm,path) constructor. The argument can be a full file path (e.g., "C:/Users/wayne/dir1/image.tif") if the 'path' argument in the constructor is "". File names that start with '.' are ignored.

(String fileName)

Source from the content-addressed store, hash-verified

87 * that start with '.' are ignored.
88 */
89 public void addSlice(String fileName) {
90 if (fileName==null)
91 throw new IllegalArgumentException("'fileName' is null!");
92 if (fileName.startsWith("."))
93 return;
94 if (names==null)
95 throw new IllegalArgumentException("This Virtual Stack cannot be modified [VirtualStack(w,h,cm,path) constructor not used]");
96 if (isTranslatingIndices())
97 throw new IllegalArgumentException("Virtual hyperstack with non-czt order cannot be modified");
98 nSlices++;
99 expandArrays(nSlices);
100 names[nSlices-1] = fileName;
101 }
102
103 /** Expands the 'names' and 'labels' arrays if existing and smaller than minSize.
104 * This should be called each time the stack is enlarged */

Callers 1

runMethod · 0.95

Calls 3

isTranslatingIndicesMethod · 0.95
expandArraysMethod · 0.95
startsWithMethod · 0.80

Tested by

no test coverage detected