(no subject)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Lhuissier, Franck
Dear Group,
I've been following this group with great interest for a long time but never actually contributed to it in any way.
Recently though, I ran into a problem that I cannot seem to solve with my favorite image analysis program Object Image and I was wondering if there was an easy way to do that in ImageJ. I'm no Java programmer (that's why I used Object Image, I still have some remnants of my college Pascal), therefore be gentle, this is all new to me.
Thanks in advance for any advice and here is my problem:
I have images of GFP and RFP fluorescing seeds. Some seeds fluoresce green, some red and some both.
I've taken black and white images of the same field of view for the two wavelengths. I have now several red images and several green images labeled as follow
GFP-001
GFP-002
GFP-003
etc...
RFP-001
RFP-002
RFP-003
etc...
GFP-001 matching of course RFP-001.
What I would like to do is to check into a given directory (selected by the user) the presence of the fluorescent pictures, open the matching pairs, do couple of arithmetic operations to check which seeds are red, green or both, do a particle analysis on the images to end up with a result table containing the number of green, red and red/green seeds among the total amount of seeds in the image, and repeat this for all images in the directory.
I hope I was clear enough.
Again thank you in advance for any help
Regards
Franck
 
Dr. F. Lhuissier
Wageningen University/Keygene
The Netherland
Reply | Threaded
Open this post in threaded view
|

(no subject)

ctrueden
Hi,

You could most likely accomplish this in ImageJ using its macro language. An
overview can be found at:
    http://rsb.info.nih.gov/ij/developer/macro/macros.html

The Macro Recorder tool (Plugins->Macros->Record) is convenient for
discovering how to do things (you just pop up the record, perform your
action manually, and the corresponding macro command to do it appears in the
window). The list of built-in functions is also very useful:
    http://rsb.info.nih.gov/ij/developer/macro/functions.html

Here is a basic skeleton to get you started:

dir = getDirectory("Choose a directory");
list = getFileList(dir);
for (i=0; i<list.length; i++) {
  gfp = list[i];
  ndx = indexOf(gfp, "GFP-");
  if (ndx == 0) {
    num = substring(gfp, 4, lengthOf(gfp));
    rfp = "RFP-" + num;
    if (File.exists(dir + "/" + rfp)) {
      print("Found both " + gfp + " and " + rfp);
      open(dir + "/" + gfp);
      open(dir + "/" + rfp);
      // do some processing on the open images
      close();
      close();
    }
  }
}

You'll want to add the proper calls where I've commented "do some
processing." Essentially, if you can do it manually, chances are you can use
the Macro Recorder to automate the procedure for all images in a folder. If
you want things to run more quickly without images flashing on the screen,
you can start your macro with setBatchMode(true).

If you have a specific question about any step of your procedure, the list
is here for you.

-Curtis

On 9/6/06, Lhuissier, Franck <[hidden email]> wrote:

>
> Dear Group,
> I've been following this group with great interest for a long time but
> never actually contributed to it in any way.
> Recently though, I ran into a problem that I cannot seem to solve with my
> favorite image analysis program Object Image and I was wondering if there
> was an easy way to do that in ImageJ. I'm no Java programmer (that's why I
> used Object Image, I still have some remnants of my college Pascal),
> therefore be gentle, this is all new to me.
> Thanks in advance for any advice and here is my problem:
> I have images of GFP and RFP fluorescing seeds. Some seeds fluoresce
> green, some red and some both.
> I've taken black and white images of the same field of view for the two
> wavelengths. I have now several red images and several green images labeled
> as follow
> GFP-001
> GFP-002
> GFP-003
> etc...
> RFP-001
> RFP-002
> RFP-003
> etc...
> GFP-001 matching of course RFP-001.
> What I would like to do is to check into a given directory (selected by
> the user) the presence of the fluorescent pictures, open the matching pairs,
> do couple of arithmetic operations to check which seeds are red, green or
> both, do a particle analysis on the images to end up with a result table
> containing the number of green, red and red/green seeds among the total
> amount of seeds in the image, and repeat this for all images in the
> directory.
> I hope I was clear enough.
> Again thank you in advance for any help
> Regards
> Franck
>
> Dr. F. Lhuissier
> Wageningen University/Keygene
> The Netherland
>