I'm looking to perform some image processing operations in Igor on X-ray scattering data. Specifically Radial profiles (i.e. line profile extraction reading z-values around the circumference of a circle or an arc) and sector integration. The code for the radial profile operation in ImageJ can be found here http://rsbweb.nih.gov/ij/plugins/download/Radial_Profile.java would it be possible to adapt this code for Igor? Or has anybody managed to write original code for Iogr for these analyses?
Update: I have found a way to plot an arc of 180 deg using the circle equation x^2 + y^2 = r2 with x values running from 0-r to r. Taking the line profile of this wave when plotted onto the image using the ImageLineProfile operation works. However, this will only work for arcs of angle 180. Is there a good formula for plotting arcs defining the following variables:
x and y origin, radius, start and end angles.
Update: I have found a way to plot an arc of 180 deg using the circle equation x^2 + y^2 = r2 with x values running from 0-r to r. Taking the line profile of this wave when plotted onto the image using the ImageLineProfile operation works. However, this will only work for arcs of angle 180. Is there a good formula for plotting arcs defining the following variables:
x and y origin, radius, start and end angles.
A simple extension of the circle equation to arbitrary origin (x0,y0) would be:
(x-x0)^2+(y-y0)^2=r^2
but this is not how you would create a pair of waves that are used in ImageLine Profile. Assuming that you measure the angle (CCW) in degrees between the radius and the positive x axis then:
Note that in the case of a closed contour you need to add one more point at the end of each wave that is equal to the first point. Note also that you can use the width parameter of ImageLineProfile to obtain averaged intensity over finite sampled paths including, for example, annular domains.
x and y origin, radius, start and end angles.
September 14, 2011 at 08:16 am - Permalink
http://www.ncnr.nist.gov/programs/sans/data/red_anal.html
and
http://usaxs.xor.aps.anl.gov/staff/ilavsky/nika.html
These packages will have what you need. If you are doing SAXS reduction look at NIKA, it might be possible to adjust for your scattering files.
A.
September 14, 2011 at 09:56 am - Permalink
A simple extension of the circle equation to arbitrary origin (x0,y0) would be:
(x-x0)^2+(y-y0)^2=r^2
but this is not how you would create a pair of waves that are used in ImageLine Profile. Assuming that you measure the angle (CCW) in degrees between the radius and the positive x axis then:
Variable dAInDegrees=(endAngle-startAngle)/numPoints
xWave=x0+rad*cos((startAngle+p*dAInDegrees)*pi/180)
yWave=y0+rad*sin((startAngle+p*dAInDegrees)*pi/180)
Note that in the case of a closed contour you need to add one more point at the end of each wave that is equal to the first point. Note also that you can use the width parameter of ImageLineProfile to obtain averaged intensity over finite sampled paths including, for example, annular domains.
I hope this helps,
A.G.
WaveMetrics, Inc.
September 14, 2011 at 10:37 am - Permalink
October 4, 2011 at 05:30 am - Permalink