[quote=“melvimjm”]I would also like to do one more thing. I would like to assign the identified cells to separate layers (each layer having a thickness of one cell) and make measurements from cells occupying the two innermost layers of the DG. [/quote]In this case, unfortunately, DefineGrid and IdentifyObjectsInGrid won’t be helpful. Both of these are used to handle images/objects in a plate layout, where the spacing is regular, where your is not.
I think you have two alternatives in tackling this:
[ul][li]The first centers on an image-based approach:[list]Convert the tissue into a binary image using ImageMath to invert the pixel intensities.[/li][li]Using the Morph module to do two operations on the binary image (you can do both in the same module, one after the other):[list]A “close” operation to fill in small holes and fill in gaps. An example in MATLAB is shown here: mathworks.com/help/toolbox/i … 35678.html. The closing is needed prior since holes and gaps would be erroneously counted as boundary pixels otherwise.[/li][/ul][/:m][li]Using MesasureObjectIntensity to measure the object intensity of the cell objects against the distance image. This will effectively assign a distance measure to each object, but written as if it were an intensity measure.[/li][li]Use FIlterObjects to divide the cells based on intensity, and then begin making your measurements.Since the intensity is proportional to distance (since it was measured from the distance image), you can pick the intensity measure that’s most suitable, (e.g., the per-cell MeanIntensity will be the average distance of the pixels in the cell from the nearest boundary) [/li][/list:u] [/:m][li]The second centers on an object-based approach: [ul] Identify the tissue as a single object. You can do this from the TissueMask image after using ImageMath to invert the pixel intensities.[/li][li]Use RelateObjects to relate the cells as “children” to the “parent” tissue object.In this module, you can also calculate distances from each child object to the parent object. If you chose “Minimum” as the distance method, it will calculate the distance from the child object centroid to the nearest edge of the parent object.[/li][li]Use FIlterObjects to divide the cells based on distance, and then begin making your measurements.[/li][/ul]However, with this option, there is a bug in how the distance measure is encoded in the current release, but has been fixed in our source code. A build of CellProfiler using our source code is available from here with the caveats mentioned (take note of the fact that pipelines made with the trunk buld are not backwards compatible. [/:m][/list:u]Essentially, these are two different ways of doing the same thing.
[quote=“melvimjm”]Is it be possible to overlay a heat map of the intensity measurements of the cells identified in the image, instead of the actual values as is done by DisplayDataOnImage?[/quote]Not as such. The closest approximate I can think of doing is using ClassifyObjects to bin the intensity measurement and have it displayed as part of the output; the rightmost panel shows each object color-coded by the measurement you provided. However, the objects are colored by the measurement bin number that the object falls in rather than the actual measurement value itself, so this is an indirect display of what you want.