need help on data file

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

need help on data file

Jim Son Chou
Hi,

 

We tried to create a data file that contains the intensity, in terms of red,
green and blue, along a line draw in the picture.  

 

Preferable an Excel file so we can use some of our old macro.

 

Regards,

 

Jim Chou

 

Acheve Technology

 

 
Reply | Threaded
Open this post in threaded view
|

Re: need help on data file

Wayne Rasband
On Sep 28, 2008, at 4:37 PM, Jim Son Chou wrote:

> Hi,
>
> We tried to create a data file that contains the intensity, in  
> terms of red,
> green and blue, along a line draw in the picture.
>
> Preferable an Excel file so we can use some of our old macro.

Here is a macro that does this:

    setRGBWeights(1, 0, 0);
    red = getProfile;
    setRGBWeights(0, 1, 0);
    green = getProfile;
    setRGBWeights(0, 0, 1);
    blue = getProfile;
    f = File.open(getDirectory("home")+"profile.xls");
    for (i=0; i<red.length; i++)
        print(f, red[i]+"\t"+green[i]+"\t"+blue[i]);

-wayne