Login  Register

Re: using ij.plugin.HyperStackConverter("stacktohs")

Posted by Rasband, Wayne (NIH/NIMH) [E] on Jul 31, 2013; 2:27pm
URL: http://imagej.273.s1.nabble.com/using-ij-plugin-HyperStackConverter-stacktohs-tp5004199p5004235.html

On Jul 29, 2013, at 7:08 AM, Eric Barnhill wrote:

> I'm a little confused as to how I implement the HyperStackConverter object. I see in the API that the method
>
> public void run(java.lang.String arg)
>
> is passed an arg from IJ_Props.txt and I see that the arg I want is
>
> hyperstacks02="Stack to Hyperstack...", ij.plugin.HyperStackConverter("stacktohs")
>
> But I don't understand:
>
> -- how do I pass the other parameters I need, such as ZTC order, slices, frames?
>
> -- how to access the created hyperstack when the method is void?

The ImageJ 1.48b daily build adds a recordable HyperStackConverter.toHyperStack() method you can use. Here is a JavaScript example created by using the Image>Hyperstacks>Stack to Hyperstack command with the recorder running:

  imp = IJ.createImage("Untitled", "8-bit black", 500, 500, 60);
  imp2 = HyperStackConverter.toHyperStack(imp, 3, 4, 5, "default", "Composite");
  imp2.show();

-wayne

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