Re: Creating an engulfing Ellipse Roi
Posted by Greg on Aug 26, 2015; 1:26pm
URL: http://imagej.273.s1.nabble.com/Creating-an-engulfing-Ellipse-Roi-tp5014149p5014154.html
Allright, invoking some basic trigonometry and after finally noting the inverted y-axis the transformation from the EllipseFitter (EF) output variables to the EllipseRoi Constructor input variables with jython goes as follows:
angle = radians(EF.angle)
y1 = EF.yCenter + sin(angle)*0.5*EF.major
y2 = EF.yCenter - sin(angle)*0.5*EF.major
x1 = EF.xCenter - cos(angle)*0.5*EF.major
x2 = EF.xCenter + cos(angle)*0.5*EF.major
ratio = EF.minor/EF.major
The first line transforms the angle from degrees to radians with the math.radians function from python.
So my original Question is now solved, I will upscale the major and minor axis with some factor 1 < alpha < 2 and subtract the original nuclear Roi from this EllipseRoi to measure stuff in the cytoplasm :)
Cheers,
Greg