Re: question about straighten ROI
Posted by
Aryeh Weiss on
Nov 16, 2010; 3:06pm
URL: http://imagej.273.s1.nabble.com/question-about-straighten-ROI-tp3686416p3686418.html
On 11/15/10 11:57 PM, Rasband, Wayne (NIH/NIMH) [E] wrote:
> On Nov 14, 2010, at 2:20 AM, Aryeh Weiss wrote:
>
>> If I create a segmented line ROI (splined or not) ,and then use
>> edit>selection>straighten to obtain a mapping to a straight line,
>> how can I map the coordinates of the resulting straight line to
>> the segmented ROI from which it was created?
>>
>> I know that I can get the points that comprise the ROI, and
>> calculate the distances, but I was wondering if there is something
>> built in already that does this.
>
> You can call
>
> run("Fit Spline", "straighten");
>
> to convert the line to one that has points spaced one pixel apart.
> These points map to the columns in the image generated by the
> Edit>Selection>Straighten command.
>
> -wayne
>
Thank you for your reply.
Does this mean that if I use
getSelectionCoordinates(xCoordinates, yCoordinates)
on the splined line, then the index of each point in those arrays will
correspond to the columns in the image generated by the
Edit>Selection>Straighten command?
If that is the case, then it is exactly what I wanted.
--aryeh
--
Aryeh Weiss
School of Engineering
Bar Ilan University
Ramat Gan 52900 Israel
Ph: 972-3-5317638
FAX: 972-3-7384051