Login  Register

Merge Two Videos

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

Merge Two Videos

kegulian
2 posts
Hello all, I have an nd2 file that I created by tracking two channels at once and taking a picture twice per second over an amount of time. I'd like to make one channel show up in red and one in green, and I'd like to merge them--I know how to do this with stills--so that each red picture stacks on top of each green one of the corresponding time point, creating a new merged stack (two-color video).

No matter what I try, the video turns into just one picture, merged, losing the animation. Please help.

Thank you.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Merge Two Videos

ctrueden
1670 posts
Hi Natalie,

> I have an nd2 file that I created by tracking two channels at once and
taking
> a picture twice per second over an amount of time. I'd like to make one
> channel show up in red and one in green, and I'd like to merge them

If your two channels are interleaved in the time dimension, you can split
them out by running Image > Properties (Ctrl+Shift+P) to edit the
dimensional lengths. Once you have a C slider that represents your two
channels, you can use Image > Color > Make Composite to generate a
red/green version (or other two-color combination; red/green is not good
for color-blind folks), as you describe.

The Bio-Formats Importer plugin's "Swap dimensions" option may also be
useful to you, depend on the way your image planes are ordered.

If you need further assistance, please feel free to upload a sample dataset
privately using Fiji's "Help > Upload Sample Image" command, and I can
determine the exact sequence of commands you would need to perform.

Note that ImageJ2 has new features to make this sort of thing easier: in
particular, an "Edit Axes" command that lets you reassign which axes are
which.

Regards,
Curtis


On Thu, Jan 31, 2013 at 8:30 PM, kegulian <[hidden email]> wrote:

> Hello all, I have an nd2 file that I created by tracking two channels at
> once
> and taking a picture twice per second over an amount of time. I'd like to
> make one channel show up in red and one in green, and I'd like to merge
> them--I know how to do this with stills--so that each red picture stacks on
> top of each green one of the corresponding time point, creating a new
> merged
> stack (two-color video).
>
> No matter what I try, the video turns into just one picture, merged, losing
> the animation. Please help.
>
> Thank you.
>
>
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/Merge-Two-Videos-tp5001631.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Merge Two Videos

kegulian
2 posts
Hi Curtis,

Thanks for your reply. I already have the nd2 file as a stack in one window with a C-slider for channels and a Z-slider for time points. Then, I do Image > Color > Make Composite. But it just superposes one still from channel 0 over one still from channel 1. It doesn't do the same for all the images in the stack, only whichever image I'm on. Then, when I slide the Z-slider in the new window or press play, it just plays the one image, no animation.

There is no "Upload Sample Image" on my ImageJ Help menu. What is Fiji?

Regards,

Natalie

SAMPLES FROM MESSAGE BEING REPLIED TO

Curtis Rueden wrote
Hi Natalie,

If your two channels are interleaved in the time dimension, you can split
them out by running Image > Properties (Ctrl+Shift+P) to edit the
dimensional lengths. Once you have a C slider that represents your two
channels, you can use Image > Color > Make Composite to generate a
red/green version (or other two-color combination; red/green is not good
for color-blind folks), as you describe.

* * *

If you need further assistance, please feel free to upload a sample dataset
privately using Fiji's "Help > Upload Sample Image" command, and I can
determine the exact sequence of commands you would need to perform.

* * *

On Thu, Jan 31, 2013 at 8:30 PM, kegulian <[hidden email]> wrote:

> Hello all, I have an nd2 file that I created by tracking two channels at
> once
> and taking a picture twice per second over an amount of time. I'd like to
> make one channel show up in red and one in green, and I'd like to merge
> them--I know how to do this with stills--so that each red picture stacks on
> top of each green one of the corresponding time point, creating a new
> merged
> stack (two-color video).
>
> No matter what I try, the video turns into just one picture, merged, losing
> the animation. Please help.
>
> Thank you.
>
>
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/Merge-Two-Videos-tp5001631.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Merge Two Videos

ctrueden
1670 posts
Hi Natalie,

> But it just superposes one still from channel 0 over one still from
> channel 1. It doesn't do the same for all the images in the stack,
> only whichever image I'm on.

How can you know that, until you move the Z or T slider to check?

> Then, when I slide the Z-slider in the new window or press play, it
> just plays the one image, no animation.

A "play" button (the little arrow) next to one of your sliders implies you
have more than one time point. In that case, ImageJ will animate over time,
not Z. It only animates over Z for single-time-point datasets.

Please run Image > Properties and ensure the dimensions are what you think
they should be. You should have 2 Channels, 1 Slice, and some number of
Frames greater than 1. The product of those three values should equal the
total number of planes in your dataset. If the numbers are wrong, you can
try typing in the correct values and see if that fixes your issues.

> What is Fiji?

Fiji is just ImageJ: http://fiji.sc/

It just comes with a bunch of extra plugins, and keeps them up to date for
you automatically. (This includes Bio-Formats, which you presumably must
have installed in order to get ImageJ to read your ND2 datasets.)

> There is no "Upload Sample Image" on my ImageJ Help menu.

If you install Fiji you will have the "Upload Sample Image" command in your
Help menu.

I am concerned that we may not actually understand what it is you want to
do. Sending a sample dataset may help to illustrate it more clearly.

Regards,
Curtis


On Fri, Feb 1, 2013 at 3:17 PM, kegulian <[hidden email]> wrote:

> Hi Curtis,
>
> Thanks for your reply. I already have the nd2 file as a stack in one window
> with a C-slider for channels and a Z-slider for time points. Then, I do
> Image > Color > Make Composite. But it just superposes one still from
> channel 0 over one still from channel 1. It doesn't do the same for all the
> images in the stack, only whichever image I'm on. Then, when I slide the
> Z-slider in the new window or press play, it just plays the one image, no
> animation.
>
> There is no "Upload Sample Image" on my ImageJ Help menu. What is Fiji?
>
> Regards,
>
> Natalie
>
> SAMPLES FROM MESSAGE BEING REPLIED TO
>
>
> Curtis Rueden wrote
> > Hi Natalie,
> >
> > If your two channels are interleaved in the time dimension, you can split
> > them out by running Image > Properties (Ctrl+Shift+P) to edit the
> > dimensional lengths. Once you have a C slider that represents your two
> > channels, you can use Image > Color > Make Composite to generate a
> > red/green version (or other two-color combination; red/green is not good
> > for color-blind folks), as you describe.
> >
> > * * *
> >
> > If you need further assistance, please feel free to upload a sample
> > dataset
> > privately using Fiji's "Help > Upload Sample Image" command, and I can
> > determine the exact sequence of commands you would need to perform.
> >
> > * * *
> >
> > On Thu, Jan 31, 2013 at 8:30 PM, kegulian &lt;
>
> > NatalieCKegulian@
>
> > &gt; wrote:
> >
> >> Hello all, I have an nd2 file that I created by tracking two channels at
> >> once
> >> and taking a picture twice per second over an amount of time. I'd like
> to
> >> make one channel show up in red and one in green, and I'd like to merge
> >> them--I know how to do this with stills--so that each red picture stacks
> >> on
> >> top of each green one of the corresponding time point, creating a new
> >> merged
> >> stack (two-color video).
> >>
> >> No matter what I try, the video turns into just one picture, merged,
> >> losing
> >> the animation. Please help.
> >>
> >> Thank you.
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://imagej.1557.n6.nabble.com/Merge-Two-Videos-tp5001631.html
> >> Sent from the ImageJ mailing list archive at Nabble.com.
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
>
>
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/Merge-Two-Videos-tp5001631p5001639.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Merge Two Videos

Joel Sheffield
221 posts
In reply to this post by kegulian
Hi Natalie,

This depends on what your current arrangement, and the version of ImageJ
that you are using.  Use the latest version of ImageJ.  Depending on how
old your system is, you might want to reinstall the whole thing.  However,
it seems as it you now have a "hyperstack" composed of the two sets of
images.  If you go to Image>Hyperstacks>Hyperstack to Stack, you will now
have a single stack with alternating images.  You can now go to
Image>Stack>Tools> Substack, and take a look at the instructions that pop
up.  You should be able to make a substack containing just the one series.
If you click on "remove slices", the remaining stack will have the other of
the pair.  Now, assuming that each stack is 8-bit, go to Image>Color>merge
colors, and select which stack you want as each color.  The resultant
should be one stack with both images superimposed.  (If these are different
from each other, you can look at them with red/green glasses, and see a 3D
image)  If you are looking for colocalization, and want to convince people
like me, who are color blind, I suggest that you use a different pair.
Green/magenta works pretty well.  Overlap appears white.

Joel


On Fri, Feb 1, 2013 at 4:17 PM, kegulian <[hidden email]> wrote:

> Hi Curtis,
>
> Thanks for your reply. I already have the nd2 file as a stack in one window
> with a C-slider for channels and a Z-slider for time points. Then, I do
> Image > Color > Make Composite. But it just superposes one still from
> channel 0 over one still from channel 1. It doesn't do the same for all the
> images in the stack, only whichever image I'm on. Then, when I slide the
> Z-slider in the new window or press play, it just plays the one image, no
> animation.
>
> There is no "Upload Sample Image" on my ImageJ Help menu. What is Fiji?
>
> Regards,
>
> Natalie
>
> SAMPLES FROM MESSAGE BEING REPLIED TO
>
>
> Curtis Rueden wrote
> > Hi Natalie,
> >
> > If your two channels are interleaved in the time dimension, you can split
> > them out by running Image > Properties (Ctrl+Shift+P) to edit the
> > dimensional lengths. Once you have a C slider that represents your two
> > channels, you can use Image > Color > Make Composite to generate a
> > red/green version (or other two-color combination; red/green is not good
> > for color-blind folks), as you describe.
> >
> > * * *
> >
> > If you need further assistance, please feel free to upload a sample
> > dataset
> > privately using Fiji's "Help > Upload Sample Image" command, and I can
> > determine the exact sequence of commands you would need to perform.
> >
> > * * *
> >
> > On Thu, Jan 31, 2013 at 8:30 PM, kegulian &lt;
>
> > NatalieCKegulian@
>
> > &gt; wrote:
> >
> >> Hello all, I have an nd2 file that I created by tracking two channels at
> >> once
> >> and taking a picture twice per second over an amount of time. I'd like
> to
> >> make one channel show up in red and one in green, and I'd like to merge
> >> them--I know how to do this with stills--so that each red picture stacks
> >> on
> >> top of each green one of the corresponding time point, creating a new
> >> merged
> >> stack (two-color video).
> >>
> >> No matter what I try, the video turns into just one picture, merged,
> >> losing
> >> the animation. Please help.
> >>
> >> Thank you.
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://imagej.1557.n6.nabble.com/Merge-Two-Videos-tp5001631.html
> >> Sent from the ImageJ mailing list archive at Nabble.com.
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
>
>
>
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/Merge-Two-Videos-tp5001631p5001639.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--


Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: 215 204 8839
e-mail: [hidden email]
URL:  http://astro.temple.edu/~jbs

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