[ImageJ-bugs] [Bug 1000] "images to stack" does not work
bugzilla at fiji.sc
bugzilla at fiji.sc
Thu Feb 5 12:40:23 CST 2015
http://fiji.sc/bugzilla/show_bug.cgi?id=1000
--- Comment #8 from Curtis Rueden <ctrueden at wisc.edu> ---
Thanks Wayne!
Here is a patch that tells the user this when such a circumstance occurs:
diff --git a/src/main/java/ij/plugin/ImagesToStack.java
b/src/main/java/ij/plugin/ImagesToStack.java
index e84d924..d72dc30 100644
--- a/src/main/java/ij/plugin/ImagesToStack.java
+++ b/src/main/java/ij/plugin/ImagesToStack.java
@@ -38,15 +38,22 @@ public class ImagesToStack implements PlugIn {
return;
}
- int count = 0;
+ int count = 0, stackCount = 0;
image = new ImagePlus[wList.length];
for (int i=0; i<wList.length; i++) {
ImagePlus imp = WindowManager.getImage(wList[i]);
if (imp.getStackSize()==1)
image[count++] = imp;
+ else
+ stackCount++;
}
if (count<2) {
- IJ.error("Images to Stack", "There must be at least two
open images.");
+ if (stackCount >= 2) {
+ IJ.error("Images to Stack", "The \"Images to
Stack\" command " +
+ "does not work with stacks as
input.\nInstead, use the " +
+ "Image>Stacks>Tools>Concatenate
command.");
+ }
+ else IJ.error("Images to Stack", "There must be at
least two open images.");
return;
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20150205/556ef03a/attachment-0001.html>
More information about the Imagej-bugs
mailing list