Create an image composed of the profile plot???

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

Create an image composed of the profile plot???

Liisa Palomaa
Hi again...

I got the help I neede to create a new image and set the pixelvalues :) Thanks

Now I have a new question- when creating a new image.
Is it possible to generate an image composed of the pixelvalues of a
profile plot( plot values)? So that in the new image all the points
(radius) that are at say distance 10 from the center has a pixelvalue
200.

Thanks in advance
//Liisa
Reply | Threaded
Open this post in threaded view
|

Re: Create an image composed of the profile plot???

Justin McGrath
Liisa,
Several people have already explained how to achieve what you would
like, and their method is probably better than what you're trying.
Median filtering the image and subtracting the result from the
original is essentially identical to median filtering pixel values
across the radius, creating a radial image, and subtracting that.

If you think about it, it makes sense.  The grayscale pixels and the
plot represent the same thing.  In the image, intensity is represented
as a gray value. In the plot, intensity is distance along the y axis.
They're both just numbers though.  Median filtering either one
produces the same result, represented in different ways.

However, since your images don't seem to be symmetrically lighted,
subtracting a symmetrical light map, such as the one you suggest,
would produce a bad result, whereas by filtering the image you have an
accurate local measure of the light intensity at that spot.

Median filtering would also probably produce bad results.

--------
Smooth the image until detail is gone.
Process~Image Calculator
     Image 1: Original
     Operation: Subtract
     Image 2: Smoothed Image

Check '32-bit result' to reduce the problem of excessively dark images.
Check 'new window' if you want.
You can adjust the brightness/contrast of the result if you still feel
it's too dark.
--------

This does exactly what you propose aside from the median filter, but
it is much simpler to execute.  I tried it with one of the images you
provided and was actually amazed at how well it worked.  If you still
want to median filter, just replace the smoothing step with median
filtering.

Justin


On 10/30/06, Liisa Palomaa <[hidden email]> wrote:

> Hi again...
>
> I got the help I neede to create a new image and set the pixelvalues :) Thanks
>
> Now I have a new question- when creating a new image.
> Is it possible to generate an image composed of the pixelvalues of a
> profile plot( plot values)? So that in the new image all the points
> (radius) that are at say distance 10 from the center has a pixelvalue
> 200.
>
> Thanks in advance
> //Liisa
>
Reply | Threaded
Open this post in threaded view
|

Re: Create an image composed of the profile plot???

Harry Parker
In reply to this post by Liisa Palomaa
I suggest looking at the source for the plugin, "Random Ovals" under the Graphics heading on the Plugin page. It shows how to draw circles ( = ovals with the same width and height).
 
--  
Harry Parker  
Senior Systems Engineer  
Dialog Imaging Systems, Inc.

----- Original Message ----
From: Liisa Palomaa <[hidden email]>
To: [hidden email]
Sent: Monday, October 30, 2006 8:57:22 PM
Subject: Create an image composed of the profile plot???

Hi again...

I got the help I neede to create a new image and set the pixelvalues :) Thanks

Now I have a new question- when creating a new image.
Is it possible to generate an image composed of the pixelvalues of a
profile plot( plot values)? So that in the new image all the points
(radius) that are at say distance 10 from the center has a pixelvalue
200.

Thanks in advance
//Liisa







Reply | Threaded
Open this post in threaded view
|

Re: Create an image composed of the profile plot???

Harry Parker
In reply to this post by Liisa Palomaa
I suggest looking at the source for the plugin, "Random Ovals" under the Graphics heading on the Plugin page. It shows how to draw circles ( = ovals with the same width and height).
 
--  
Harry Parker  
Senior Systems Engineer  
Dialog Imaging Systems, Inc.

----- Original Message ----
From: Liisa Palomaa <[hidden email]>
To: [hidden email]
Sent: Monday, October 30, 2006 8:57:22 PM
Subject: Create an image composed of the profile plot???

Hi again...

I got the help I neede to create a new image and set the pixelvalues :) Thanks

Now I have a new question- when creating a new image.
Is it possible to generate an image composed of the pixelvalues of a
profile plot( plot values)? So that in the new image all the points
(radius) that are at say distance 10 from the center has a pixelvalue
200.

Thanks in advance
//Liisa
Reply | Threaded
Open this post in threaded view
|

Particle Plotting Stack

Herbert M. Geller
Folks,

I have a data file (n, x, y, t), where "n" is a particle number
identifier for a particle tracked in at least three frames of a time
series at position (x, y) at time t.  I would like to create a stack of
plots where each slice contains a plot of all the loci of particle n at
all times.  I could then overlay this with the original image stack to
determine how well the program is tracking.

I have no clue if this can be done in ImageJ or if it's already been
done in another language (my original data was generated by export to an
Excel file by IDL.

Thanks for your help.

Herbert M. Geller, Ph.D.
Developmental Neurobiology Section
National Heart Lung and Blood Institute, NIH
10 Center Drive MSC 1754
Bldg 10, Room 6D18
Bethesda, MD  20892-1754
Tel: 301-451-9440; Fax: 301-594-8133
e-mail: [hidden email]
Web: http://dir.nhlbi.nih.gov/labs/ldn/index.asp
---------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Particle Plotting Stack

Tony Shepherd
Just off the top of my head...
If you know how to populate a stack layer with an image processor (ip)
object, (probably one of the constructors) then you just need to get your
data (loci) into ip objects.  This can be done as follows. It's a bit long
winded but as far as I know you have to turn 2D arrays into a 1D vectr and
back again (somebody correct me if I'm wrong)...

Say you start with a 2D array called 'my2dArray', which has 255 at the
location of a particle and zeros everywhere else.  In a tracking framework
this may be one 'slice' of a 3D array, and the code below would be used in
a loop to populate stack layers one by one...


int X= 200 ; // for example (width of image)
int Y= 300 ; // for example (width of image)

byte[] pixels_1D = getAsByteVector(my2dArray);
ByteProcessor pixels_2D = new ByteProcessor(X,Y, pixels, null);

ImagePlus imp = new ImagePlus("optional title", pixels_2D);
ImageProcessor ip = imp.getProcessor();


     public byte[] getAsByteVector(my2dArray)
     {
         int nx = my2dArray[0].length;
         int ny = my2dArray.length;
         byte[] pixels = new byte[nx*ny];        
         int n=0;                                  
         for (int j=0; j<nx; j++){                
           for (int i=0; i<ny; i++){
             pixels[n]=(byte)my2dArray[i][j];      
             n++;                                    
           }
         }

         return pixels;
     }
Reply | Threaded
Open this post in threaded view
|

Re: Particle Plotting Stack

Tony Shepherd
In reply to this post by Herbert M. Geller
Just off the top of my head...
If you know how to populate a stack layer with an image processor (ip)
object, (probably one of the constructors) then you just need to get your
data (loci) into ip objects.  This can be done as follows. It's a bit long
winded but as far as I know you have to turn 2D arrays into a 1D vectr and
back again (somebody correct me if I'm wrong)...

Say you start with a 2D array called 'my2dArray', which has 255 at the
location of a particle and zeros everywhere else.  In a tracking framework
this may be one 'slice' of a 3D array, and the code below would be used in
a loop to populate stack layers one by one...


int X= 200 ; // for example (width of image)
int Y= 300 ; // for example (width of image)

byte[] pixels_1D = getAsByteVector(my2dArray);
ByteProcessor pixels_2D = new ByteProcessor(X,Y, pixels, null);

ImagePlus imp = new ImagePlus("optional title", pixels_2D);
ImageProcessor ip = imp.getProcessor();


     public byte[] getAsByteVector(my2dArray)
     {
         int nx = my2dArray[0].length;
         int ny = my2dArray.length;
         byte[] pixels = new byte[nx*ny];        
         int n=0;                                  
         for (int j=0; j<nx; j++){                
           for (int i=0; i<ny; i++){
             pixels[n]=(byte)my2dArray[i][j];      
             n++;                                    
           }
         }

         return pixels;
     }