Login  Register

Re: Macros and Image5D

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Macros and Image5D

ctrueden
Hi Ferdinand,

My apologies for the delay in reply.

> In order to do batch analysis, I would like to create macros (with
> the "record" mode, I don't know how to write code) containing some
> Image5D processes, but I have quite a hard time with it...

From your description, all of those things can be done with built-in ImageJ
hyperstacks. Open your data, then use Image > Color > Channels Tool to
control the color of each composite channel. You can also use the Image >
Lookup Tables menu to assign a custom LUT to each channel.

> - When I click overlay, or when I change the colors, nothing happens
> in the code window.

It may be that this feature is not scriptable in a macro. If you find that
you cannot do what you need using regular ImageJ hyperstacks, but only with
Image5D, then let me know and I will investigate further how to address
that.

> - When I do "Stack to Image 5D", it gives a precise number (like 19)
> for the number of slices, which is a problem because all my images
> don't have the same number of slices...

You will want to browse the ImageJ macro functions documentation,
accessible from the menu via Help > Macro Functions, to see how to
determine things like "how many slices in the current image"? For that
situation specifically, the functions you need are nSlices and
getDimensions(width, height, channels, slices, frames).

You can then replace the hardcoded number (19) with a variable (preceded by
an '&' sign). E.g.:

  getDimensions(width, height, channels, slices, frames);
  run("Stack to Image5D", "3rd=ch 4th=z 3rd_dimension_size=&channels
4th_dimension_size=&slices assign");

Lastly, I would encourage you to upgrade your ImageJ if possible. Many bugs
have been fixed since 1.44o, and the built-in hyperstack features have been
greatly improved since then too.

Regards,
Curtis


On Tue, Jan 22, 2013 at 12:10 PM, Ferdinand Roesch <
[hidden email]> wrote:

> Dear MM Walter and Rueden,
>
> I am beginning to work with your plugin Image5D, and it works really great
> ! In order to do batch analysis, I would like to create macros (with the
> "record" mode, I don't know how to write code) containing some Image5D
> processes, but I have quite a hard time with it...
>
> For instance, I would like to enter in the macro the operations "Stack to
> Image 5D", then activate the overlay mode, change the colors of each
> channel, and finally make a Z project and save it to my folder.
>
> I thought it would be easy, but I am facing two problems :
>
> - When I click overlay, or when I change the colors, nothing happens in
> the code window.
> - When I do "Stack to Image 5D", it gives a precise number (like 19) for
> the number of slices, which is a problem because all my images don't have
> the same number of slices...
>
> I am using ImageJ version 1.44o and Image5D version 1.2.5, on Mac OS X
> version 10.7.5.
>
> I am sorry for these very basic questions, I tried to look for an answer
> for several hours on the Internet without success...
> Thanks for your help !
>
> Sincerely,
>
> -----------
>
> Ferdinand Roesch
> PhD Student
> Unité Virus et Immunité, Institut Pasteur
> 28 rue du Docteur Roux 75015 Paris
>
>
>
>

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