Extract intensities along polyline ROI?

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

Extract intensities along polyline ROI?

Kenneth Sloan-2
I want to specify a polyline and then extract image intensities along that
polyline, preferably with an adjustable step size.  Looks easy, but I
thought I would check to see if there is a standard tool that will do the
job.

Eventually, this will be a java plugin - I'll probably need to add a few
complications (for example, searching a small region NEAR the points along
the polyline for maximum intensity pixels.  But, for now, I'm interested in
quick and dirty, if it exists.

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

Re: Extract intensities along polyline ROI?

vischer
Hi Kenneth,

you can use the command Edit>Selection>Interpolate.
For example this  macro uses an interval of 8, and for checking
maxima in zz use Array.findMaxima().



newImage("Untitled", "8-bit ramp", 200, 200, 1);
makeLine(40,60,140,70,95,135);
run("Interpolate", "interval=8 adjust");
getSelectionCoordinates(xx, yy);
len = xx.length;
zz = newArray(len);
for(jj = 0; jj < len; jj++)
        zz[jj] = getPixel(xx[jj], yy[jj]);



Norbert



On 20. Jul 2017, at 12:54, Kenneth R Sloan <[hidden email]> wrote:

>
> I want to specify a polyline and then extract image intensities along that
> polyline, preferably with an adjustable step size.  Looks easy, but I
> thought I would check to see if there is a standard tool that will do the
> job.
>
> Eventually, this will be a java plugin - I'll probably need to add a few
> complications (for example, searching a small region NEAR the points along
> the polyline for maximum intensity pixels.  But, for now, I'm interested in
> quick and dirty, if it exists.
>
> --

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

Re: Extract intensities along polyline ROI?

Kenneth Sloan-2
Thanks.

A few novice questions:

a) Interpolate will work with the current ROI, which can be a poly line?
b) getSelectionCoordinates fetches the results of Interpolate?
c) is this easy to convert to a Java plugin (not a macro)?


Going off to read the APIā€¦

--
Kenneth Sloan
[hidden email] <mailto:[hidden email]>
Vision is the art of seeing what is invisible to others.




> On Jul 20, 2017, at 17:03 , Norbert Vischer <[hidden email]> wrote:
>
> Hi Kenneth,
>
> you can use the command Edit>Selection>Interpolate.
> For example this  macro uses an interval of 8, and for checking
> maxima in zz use Array.findMaxima().
>
>
>
> newImage("Untitled", "8-bit ramp", 200, 200, 1);
> makeLine(40,60,140,70,95,135);
> run("Interpolate", "interval=8 adjust");
> getSelectionCoordinates(xx, yy);
> len = xx.length;
> zz = newArray(len);
> for(jj = 0; jj < len; jj++)
> zz[jj] = getPixel(xx[jj], yy[jj]);
>
>
>
> Norbert
>
>
>
> On 20. Jul 2017, at 12:54, Kenneth R Sloan <[hidden email]> wrote:
>>
>> I want to specify a polyline and then extract image intensities along that
>> polyline, preferably with an adjustable step size.  Looks easy, but I
>> thought I would check to see if there is a standard tool that will do the
>> job.
>>
>> Eventually, this will be a java plugin - I'll probably need to add a few
>> complications (for example, searching a small region NEAR the points along
>> the polyline for maximum intensity pixels.  But, for now, I'm interested in
>> quick and dirty, if it exists.
>>
>> --
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html


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