SD along line profile

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

SD along line profile

wirthvolker
Hi,
the "Plot Profile" function averages intensities over the width of the
line selection. Is there an easy way to get the standard deviation for
each data point?
My idea was to use getLine(x1, y1, x2, y2, lineWidth) and create a
rectangular selection with the same length, width and angle, and then
use a macro like Wayne suggested some time ago
(http://osdir.com/ml/java.imagej/2006-03/msg00049.html). But this will
not work on a rotated rectangle. Any ideas would be greatly
appreciated!
Best regards,
Volker

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

Re: SD along line profile

Jerome Mutterer-3
Hi,
you can use a wide line to create the rotated rectangle, straighten it,
reslice it to flip y and z axis, Z-Project  it in the SD mode, and get the
profile of that resulting line image.

run("Straighten...");
run("Reslice [/]...", "output=1.000 start=Top avoid");
run("Z Project...", "start=1 stop=50 projection=[Standard Deviation]");
makeLine(0, 0, getWidth, 0);
sd = getProfile();

Jerome

On 13 September 2012 17:35, Volker Wirth <[hidden email]> wrote:

>
> Hi,
> the "Plot Profile" function averages intensities over the width of the
> line selection. Is there an easy way to get the standard deviation for
> each data point?
> My idea was to use getLine(x1, y1, x2, y2, lineWidth) and create a
> rectangular selection with the same length, width and angle, and then
> use a macro like Wayne suggested some time ago
> (http://osdir.com/ml/java.imagej/2006-03/msg00049.html). But this will
> not work on a rotated rectangle. Any ideas would be greatly
> appreciated!
> Best regards,
> Volker
>
> --
> 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
|

Re: SD along line profile

wirthvolker
Hi Jerome,
thanks a lot, works perfectly. Extracting the pixels along the line
with "Straighten..." opens up a lot of nice possibilities.
Best regards,
Volker

2012/9/13 Jerome Mutterer <[hidden email]>:

> Hi,
> you can use a wide line to create the rotated rectangle, straighten it,
> reslice it to flip y and z axis, Z-Project  it in the SD mode, and get the
> profile of that resulting line image.
>
> run("Straighten...");
> run("Reslice [/]...", "output=1.000 start=Top avoid");
> run("Z Project...", "start=1 stop=50 projection=[Standard Deviation]");
> makeLine(0, 0, getWidth, 0);
> sd = getProfile();
>
> Jerome
>
> On 13 September 2012 17:35, Volker Wirth <[hidden email]> wrote:
>>
>> Hi,
>> the "Plot Profile" function averages intensities over the width of the
>> line selection. Is there an easy way to get the standard deviation for
>> each data point?
>> My idea was to use getLine(x1, y1, x2, y2, lineWidth) and create a
>> rectangular selection with the same length, width and angle, and then
>> use a macro like Wayne suggested some time ago
>> (http://osdir.com/ml/java.imagej/2006-03/msg00049.html). But this will
>> not work on a rotated rectangle. Any ideas would be greatly
>> appreciated!
>> Best regards,
>> Volker

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