<html>
<head>
<base href="http://fiji.sc/bugzilla/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - "images to stack" does not work"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=1000#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WONTFIX - "images to stack" does not work"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=1000">bug 1000</a>
from <span class="vcard"><a class="email" href="mailto:ctrueden@wisc.edu" title="Curtis Rueden <ctrueden@wisc.edu>"> <span class="fn">Curtis Rueden</span></a>
</span></b>
<pre>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;
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>