Placenta vessel/villi measure+outline

Hello and happy spring there in Boston. We are at work on imaging placental tissue for an NIH RO1 application. We want to determine the degree to which the placenta being examined has vascular underperfusion. In order to do this, we must figure the vessel area per villus in which they are contained. Therefore we must count the number of villi and vessels per image, measure their area, relate the two areas and outline both villi and vessels. The PrimaryObjects are the vessels contained inside the villi, which are the SecondaryObjects. When I ColortoGray, the Primary(vessels) come out best in Blue image, while the Secondary(villi) come out best in Green image.

I need help on a number of issues:

  1. Perfecting the identification of primary and secondary objects. CP is getting stuck trying to do this.
  2. Relating the area of the vessels to the area of the villus they are contained in – to make sure they are properly associated and that I can perform correct calculation for percentages.
  3. Outlining so that we can view the outlines and check that CP is capturing the vessels and villi we want.

I’ve attached here a hand-marked scan of the image just for reference. I’ve circled and numbered the Secondary(villi) we want to count, and some Primary(vessels) inside each villi that we would include. I’ve also included the original image (and H+E stained slide), and the pipeline.

This is an important new aspect of our analysis, and we really appreciate your help.

Kind regards,

Lucy Minturn
Perinatal Pathology Research Assistant
Department of Pathology, Northwestern University Feinberg School of Medicine
Clinical Research Associate
Department of Pediatrics, Division of Neonatology
Ann and Robert H. Lurie Children’s Hospital
320 E. Superior St., Searle 4-490
Chicago, Illinois 60611
Phone: 312-503-1994
Placenta vesselvilli pipeline.cp (9.53 KB)
Marked up image showing villi and vessels.pdf (929 KB)

Hi Lucy,

I’m attaching a revised pipeline that should get you pointed in the right direction. It uses the UnmixColors module which attempts to split the color image up on the basis of the hue for some selected stains, then tries to identify the vessels first.

The villi are tougher since, despite the ability of our eyes to make the distinctions, there is actually very little in terms of image features to to delineate these objects. I ended up identifying the background first, and then using that to mask the image and identify the villi. The vessels are then unfied on a per-villus basis, the area measured for the unified vessels and the areas then related back to the parent villi. Some additional modules were needed to convert the individual vessel areas into a per-villus vessel area by backing out the total area from per-villus mean area produced by RelateObjects.

2015_05_17.cp (13.7 KB)

Hi Mark,

Finally getting back to this pipeline (and now it’s a rush, of course). Tried two different computers to run the pipeline you created – analyzing only the image (“placenta cd31 20x”) that I had attached to the original post. Unfortunately, I got the same MemoryError on both machines. I’ve attached a screenshot of the pipeline error dialogue box that came up. I did try to “send report,” and just fyi “copy to clipboard” button gave me an error message too.

Hope I’m not missing something totally obvious… Please let me know how to proceed.

Many thanks,
July 9 MemoryError scan.pdf (177 KB)

Hi Lucy,

I tried running the pipeline on my machine, and while it does not give me the memory error that you are getting, I am getting some funky behavior from the module display windows that are open after the run: the windows are there, but the contents don’t all show except for the last (DisplayDataOnImage), and they flicker every few seconds.

From prior experience, this tends to happen when when the memory required to show all the display contents at the same time becomes prohibitive. So I suggest closing the eyes on all the modules in the pipeline (so they don’t open a window on execution) by selecting Window > Hide all windows on run from the menu bar and re-running. If you are confident that the pipeline is working, you’ll only need to show the output anyway.


Thanks Mark! That did the trick. We are going to reduce the image size a bit as well.