Login  Register

Re: Recorder not always working in java

Posted by Rasband, Wayne (NIH/NIMH) [E] on Jun 27, 2016; 5:10pm
URL: http://imagej.273.s1.nabble.com/Recorder-not-always-working-in-java-tp5016723p5016741.html

> On Jun 27, 2016, at 3:24 AM, CARL Philippe (PHA) <[hidden email]> wrote:
>
> Dear Wayne,
> I thank you very much for your answer and apologize really for making you work so hard in the week-end.
> I have updated ImageJ to the Daily build version, but the stacks I want to concatenete don't have a similar size, and thus I get the following error: "Cannot create 4D image because stack sizes are not equal." when I use the code "imp = Concatenator.run(imp1, imp2);".
> I even tried to fix the problem by doing:
> Concatenator concatenator = new Concatenator();
> concatenator .setIm5D(false);
> imp = concatenator.concatenate(imp1, imp2, false);
> But this didn't make it either.
> It seems there is no access (unless I missed it) in the plugin to turn off the "Open as 4D image" option which I would need.

This bug is fixed in the latest daily build (1.51e14). Here is a JavaScript example that concatenates three unequal size stacks:

  img1 = IJ.createImage("stack1","8-bit ramp",500,500,40);
  img2 = IJ.createImage("stack2","8-bit random",500,500,50);
  img3 = IJ.createImage("stack3","8-bit black",500,500,60);
  img4 = Concatenator.run(img1,img2,img3);
  img4.show();

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html