Re: java versus macro recording on hyperstack transformation
Posted by
Wayne Rasband-2 on
May 03, 2019; 6:30pm
URL: http://imagej.273.s1.nabble.com/java-versus-macro-recording-on-hyperstack-transformation-tp5022153p5022154.html
> On May 3, 2019, at 3:54 AM, Philippe CARL <
[hidden email]> wrote:
>
> Dear all,
> I would like to make a stack to hyperstack transformation of RGB pictures in
> java.
> And in the case I use the macro recorder set on java, I get the following
> command line:
> StackImp2 = HyperStackConverter.toHyperStack(StackImp, 1, 2,
> 2, "Color");
> Which once run gives me then the exception message found at the line 59 of
> the ij.plugin.HyperStackConverter.java file.
This bug is fixed in the latest ImageJ daily build (1.52p16). Here is a small script that reproduces the bug:
imp = IJ.openImage("
http://wsr.imagej.net/images/flybrain.zip");
imp2 = HyperStackConverter.toHyperStack(imp, 1, 19, 3, "Color");
imp2.show();
-wayne
> Alternatively, if I use the recorder in macro mode I get the following
> command line:
> run("Stack to Hyperstack...", "order=xyczt(default) channels=1
> slices=2 frames=2 display=Color");
> that I can then successfully transform into:
> IJ.run("Stack to Hyperstack...", "order=xyczt(default) channels=1
> slices=2 frames=2 display=Color");
> But I would like to understand the code that is actually run by the "Stack
> to Hyperstack..." menu which I'm not able to figure out.
> Especially the only reference I found to "Stack to Hyperstack..." is on the
> line 338 of the IJ.java file with:
> commandTable.put("Stack to HyperStack...", "Stack to
> Hyperstack...");
> and no further connection with the code used behind.
> I thank you very much in advance for your lightings.
> My best regards,
> Philippe
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html