Login  Register

Re: Segmentation Problem

Posted by ctrueden on Oct 07, 2013; 3:18pm
URL: http://imagej.273.s1.nabble.com/Segmentation-Problem-tp5005009p5005070.html

Hi Pascal,

> Unfortunately I could not find mentioned attachments. I would be
> curious to see your results. Would you mind sending them directly
> again?

Looks like the ImageJ list-serve strips many attachments. So I posted them
at:

http://curtis.imagej.net/2013-10-07/trainable-weka.jpg
http://curtis.imagej.net/2013-10-07/results.jpg

> I tried to follow the process and it seems to be really a good
> approach. If I understood it correctly I will end up with the centre
> of the cells.

Right.

> This is for sure enough to count them but I am not able to exclude
> cells that don't fit the circularity criteria. Do you see a
> possibility for that as well?

Off the top of my head, I do not know the best way to reconcile the cell
centers with the imperfect binary mask segmentation. To exclude based on
circularity you would need to use Analyze Particles with a less messy
binary mask. There may be a way to use the center points as the starting
point for an operation that cleans up the mask, but I do not know what it
is. Maybe someone else on this list has an idea.

> Or is this already taken into account in the "ulitmate points"
> function? I did not really understand what this function exactly does.

The function is described here:
http://imagej.net/docs/guide/146-29.html#sub:Ultimate-Points

Sorry I cannot be of more assistance but I don't currently have the time to
play with this analysis further right now.

Regards,
Curtis


On Mon, Oct 7, 2013 at 5:00 AM, Pascal Lorentz <[hidden email]>wrote:

> Hi Curtis
>
> Thanks you very much for your advice and even the macro code.
> Unfortunately I could not find mentioned attachments. I would be curious
> to see your results. Would you mind sending them directly again?
> I tried to follow the process and it seems to be really a good approach.
> If I understood it correctly I will end up with the centre of the cells.
> This is for sure enough to count them but I am not able to exclude cells
> that don't fit the circularity criteria. Do you see a possibility for that
> as well? Or is this already taken into account in the "ulitmate points"
> function? I did not really understand what this function exactly does.
>
> Best regards
>
> Pascal
>
>
> Am 03.10.2013 19:07, schrieb Curtis Rueden:
>
>  Hi Michael & Pascal,
>>
>> Here is a potential approach that might work with some fine tuning:
>>
>> 1) Use Trainable Weka Segmentation to separate white cells from red cells
>> from background.
>>
>> 2) From the white cells mask, clean up the mask as best as possible using
>> morphological operations (e.g., Process > Binary > Open).
>>
>> 3) Since cells are blob-shaped (i.e., not too long and skinny), use
>> Ultimate Points to compute cell centers from the Euclidean distance map.
>>
>> Here is a macro for steps 2 & 3:
>>
>> call("trainableSegmentation.**Weka_Segmentation.getResult");
>> selectWindow("Classified image");
>> setAutoThreshold("Default dark");
>> setThreshold(0, 60); // threshold to white cells only
>> run("Create Mask"); // create a mask of the white cells
>> run("Open"); // clean up the mask a little
>> run("Ultimate Points"); // compute segmentation centers from EDM
>> setAutoThreshold("Default dark");
>> setThreshold(30, 255); // threshold to only centers of radius 30+
>> run("Create Selection");
>> selectWindow("Classified image");
>> close();
>> selectWindow("mask");
>> close();
>> selectWindow("2151833.png"); // switch back to the original image
>>   run("Restore Selection"); // show cell centers overlaid on original data
>>
>> It assumes you have opened the data (2151833.png), then run Trainable Weka
>> Segmentation to perform the initial segmentation (see attached
>> trainable-weka.jpg).
>>
>> My initial results are not perfect (see attached results.jpg) but not bad.
>> Further fiddling of the TWS classifier might improve matters. And once you
>> have a really good classifier, you can fully automate the process for
>> additional images; for details see:
>> http://fiji.sc/Trainable_Weka_**Segmentation#Macro_language_**
>> compatibility<http://fiji.sc/Trainable_Weka_Segmentation#Macro_language_compatibility>
>>
>> Regards,
>> Curtis
>>
>>
>> On Thu, Oct 3, 2013 at 11:08 AM, Cammer, Michael <
>> [hidden email]
>>
>>> wrote:
>>> I tried converting to HSV, media filtering, and segmenting each with
>>> simple threshold or find edges / variance  and use logical AND to narrow
>>> to
>>> the white cells. Isolating the white cells from everything else is simple
>>> but I couldn't get the cells to separate from each other.  If anybody
>>> else
>>> has a method, I'd be very interested to hear it too.
>>>
>>> But if she has fewer than 1000 or so cells, I'd just trace them.
>>>
>>> Regards,
>>>
>>> Michael
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
>>> Pascal Lorentz
>>> Sent: Wednesday, October 02, 2013 7:54 AM
>>> To: [hidden email]
>>> Subject: Segmentation Problem
>>>
>>> Dear List
>>>
>>> I got this Image of muscle fiber (Fiber-I white and Fiber-II red) from a
>>> user:
>>>
>>> http://www.picfront.org/d/91MZ
>>>
>>> She wants to compare white versus red cells. She needs the percentage of
>>> cells (white vs red) but only cells that have a circularity between 0.6
>>> and
>>> 0.8 should be considered. Truncated cells should be excludes as well.  I
>>> am
>>> able to seperate white and red cells but just area wise. I would be glad
>>> if
>>> anybody as a good procedure to segment the single cells (if possible at
>>> all).
>>>
>>> Thanks a lot for your help
>>>
>>> Pascal
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.**html<http://imagej.nih.gov/ij/list.html>
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.**html<http://imagej.nih.gov/ij/list.html>
>>>
>>>  --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.**html<http://imagej.nih.gov/ij/list.html>
>>
>
>

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