Center point of an irregular ROI

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

Center point of an irregular ROI

AJBell
Dear List,

I have a series of ROI that I want to find the center point of. The majority are of a regular cylindrical shape, and finding the midpoint can be done using the center of mass (CoM) or centroid function under the measurements tab. A large minority however, are not stright, and so the centroid and CoM are do not give the correct point. Does anyone know how this can be addressed? I have attached an example ROI mask.

Andrew

Prop lo 0.20798.jpg (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Center point of an irregular ROI

Michael P Ellis
Dear Andrew,

Can you be more specific about what you mean by the centre point?

By the look of the little image attached to your message, it looks like it might be the outline of a chromosome? Is this correct?

If so, then it may be the chromosome centromere that you are after. Depending on the chromosome morphology, the centromere position may or may not be easy to determine. If you know the which chromosome you are dealing with then you can have a guess at the position of the centromere based upon it's expected position (published data) (assumes that the chromosome is a normal chromosome).

If you are looking for karyotyping functionality, then we supply a full featured karyotyper  SmartType which you can try out out for free.

We can also transfer karyotype information out of karyotype into ImageJ for subsequent analysis. Let me know if any of this is of interest.

(Of course if the little outline was not a chromosome, none of this will be of any interest at all!)

-- Michael Ellis



On 6 Feb 2012, at 09:19, Andrew Bell wrote:

> Dear List,
>
> I have a series of ROI that I want to find the center point of. The majority are of a regular cylindrical shape, and finding the midpoint can be done using the center of mass (CoM) or centroid function under the measurements tab. A large minority however, are not stright, and so the centroid and CoM are do not give the correct point. Does anyone know how this can be addressed? I have attached an example ROI mask.
>
> Andrew
> <Prop lo 0.20798.jpg>
Reply | Threaded
Open this post in threaded view
|

Re: Center point of an irregular ROI

Xiaowei Li
In reply to this post by AJBell
Hi Andew,

I guess you want to calculate the intensity center. If that is case, I
guess you can write a program in Matlab based on equation:

Center=Sum(x(i)*I(i))/Sum(I(i), where x(i)  is the position of each
pixel (voxel if 3D), I(i) is the intensity of this pixel(voxel if 3D.

Hope it helps.

Xiaowei




On Mon, Feb 6, 2012 at 5:19 PM, Andrew Bell <[hidden email]> wrote:
> Dear List,
>
> I have a series of ROI that I want to find the center point of. The majority are of a regular cylindrical shape, and finding the midpoint can be done using the center of mass (CoM) or centroid function under the measurements tab. A large minority however, are not stright, and so the centroid and CoM are do not give the correct point. Does anyone know how this can be addressed? I have attached an example ROI mask.
>
> Andrew
Reply | Threaded
Open this post in threaded view
|

Re: Center point of an irregular ROI

AJBell
In reply to this post by AJBell
My applogies for not being clear.

I want to find the point that lies between the apical ends of the ROI, along the center line. I have attached a further image that I hope is a little clearer.

To respond to the first question, no it is not a mitochondria, but a bacterium.

Andrew

Prop lo 0.20798.tif (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Center point of an irregular ROI

Leon Espinosa-3
Well, I a have just fixed the same problem with bacteria last month... In my case I used :

1 - find skeleton
2 - remove branches (with "binary connectivity from G. Landini morphology collection or "analyze skeleton" with fiji) to obtain a single line corresponding to the "median axis"
3 - build an array with the pixels of the "median axis" and the center will be located at length(array)/2

Of course... it takes hundreds of lines in my plugin... but I'm not a good programmer... well in a python script it is something like :
(I have removed lot of tests and changes of coordinates system, etc.)

IJ.run(skmp3, "Skeletonize", "")
IJ.run(skmp3, "BinaryConnectivity ", "white")
ip3.setThreshold(3,4, ImageProcessor.BLACK_AND_WHITE_LUT)
IJ.run(skmp3, "Convert to Mask", "")
...
rawPoints=[(x,y) for x in range(w) for y in range(h) if ip3.getPixel(x,y)==255]
...
c= length(rawPoints//2)
xcenter = rawPoints[c][0]
ycenter =  rawPoints[c][1]

I hope the idea helps...

All the best Leon Espinosa




Plateforme de Biophotonique Appliquée à la Microbiologie

LCB CNRS UPR9043
31, Chemin Joseph AIGUIER
13009 MARSEILLE

Le 6 févr. 2012 à 11:26, Andrew James Bell a écrit :

> My applogies for not being clear.
>
> I want to find the point that lies between the apical ends of the ROI, along the center line. I have attached a further image that I hope is a little clearer.
>
> To respond to the first question, no it is not a mitochondria, but a bacterium.
>
> Andrew
> <Prop lo 0.20798.tif>
Reply | Threaded
Open this post in threaded view
|

Re: Center point of an irregular ROI

AJBell
In reply to this post by AJBell
Thank you for everyone's help - I found a crude work around using the perimeter. In essence, I calculate the pixel co-ordinates that are 1/4 of the perimetet length from my starting point, on either side of the ROI, and draw a line between them. The mid point (in theory) is halfway along this line.

Andrew
Reply | Threaded
Open this post in threaded view
|

Re: Center point of an irregular ROI

trgen
In reply to this post by AJBell
Dear Andrew,
I have the same problem. I need to find the center point of irregular shape in 3D. Did you find how can be done with image j? With the min and max coordinates, you can find the mid points but that doesnt give you the intensity center. Is there any way to do it with image j? I am not a programmer, it would be great if there is any pluggins for it.
Thank you in advance.
Taliha