Re: Measuring along oblique lines
Posted by
Gluender on
Apr 05, 2007; 5:46pm
URL: http://imagej.273.s1.nabble.com/Measuring-along-oblique-lines-tp3699835p3699836.html
Dear Fintan McEvoy,
please note that with ij-version 1.37 profiles received an new option
that might help:
"v1.37q, 30 August 2006:
Added the 'Interpolate Line Profiles' checkbox to the
Edit/Options/Profile Plot Options dialog box."
You may also have a look at the "Radial Profile Extended" plugin
provided by Philippe Carl.
>Hi,
>
>Can anybody help with what are probably very basic questions?
>
>My questions :
>
>If a line selection runs obliquely across the image how does "getProfile" in
>ImageJ count pixels?
>Does it count every pixel the line touches?
>Can I accurately measure distances along oblique lines in ImageJ?
>Is there any merit in measuring aling lines parallel to either the x
>or y axis?
>
>
>I know that the line is drawn from the upper left corner of each pixel I
>specify in the makeLine command.
>If the line is parallel with the side of the pixel, ImageJ will count the
>exact number of pixels between two points of interest along the line and
>since I know the pixel dimensions, I can then calculate a distance that
>interests me.
>
>The detail of what I am doing is below:
>
>
>I am using a macro that contains written to run on CT images. I want to
>measure the thickness of subcutaneous adipose tissue. The while statment
>below starts checking the value of the pixel at "i", this will be less than
>zero for air outside the patient , more than zero for skin and then again
>less than zero for adipose tissue. Thus the the junction between skin and
>adipose tissue is detected ad the variable "outer" gets the value of "i",
>the process is repated to give the inner edge. Since the lne is parallel
>with the y axis of the image , all I need to do to get the thickness of the
>tissue in pixels is subtract the value of the variable "outer" from the
>value of "i" when it is stoped at the "inner edge"
>
>In order to make measurements around the whole circumference of the patient
>I have opted to rotate the image and not the line because I am not clear
>what ImageJ, "getProfile" does with oblique lines,
>
>
>selectImage("temp6.dcm");
> w = getWidth/2;
> h = getHeight/2;
> makeLine (w,0,w,h);
> value=getProfile;
> i=0;
> while (value[i]<0) {i++;}
> //outer adipose edge
> while (value[i]>0) {i++;}
> outer=i;
> //inner adipose edge
> while (value[i]<-0) {i++;}
> //sub cutis fat thickness
> t=(outer-i)*(-1);
>
>
>
>Thanks in anticipation for any help
>
>Fintan McEvoy
Because I'm using an older ij-version, I can't judge what is actually
meant by 'Interpolate Line Profiles', but I guess the pixel values
are now assigned to an ideal (oblique) line that is defined by its
end points.
HTH
Best
--
Herbie
------------------------
<
http://www.gluender.de>