This article explores some of the ways a manually drawn region can be used in a pipeline.
This article explores some of the ways a manually drawn region can be used in a pipeline.
We can use both the Object Mask and Import document objects operations in a pipeline to make use of existing objects in a new pipeline.
The most common reason we use manually drawn object regions in a pipeline is to limit the analysis to a specific portion of the image. To some extent we can do this using the Input ROI operation which is always first in the pipeline. However, the Input ROI is always a cuboid and we may be interested in measuring objects only within an irregular region of the image. For example, we may want to count cells in only this region of the image:
In the Input ROI operation we can limit what the pipeline has access to to match the bounds of the region we selected:
And we can do this for the planes as well if this is a 3D region. However, as mentioned above, this region will be a cuboid corresponding to the bounding box, not the irregular shape of the region. So in this case if we counted all the cells within the box we would not know specifically how many of those are within the drawn region.
Furthermore, the objects relationship to the region and the region's relationship to the objects might both need to be quantified. We may wish to know the distance of individual cells to the border of the region, or we may want to measure the numerical density (cells / unit volume). We might also want to use several regions simultaneously to compare statistics between the two. In this case having the object in the pipeline allows us to use the Compartments operation to measure such things.
First, note that while we are talking about manually drawn regions, this process also applies to any objects that have been previously stored in the documents. We can use the same process if these objects were created in another pipeline or imported from some other segmentation tools.
One way to use objects in the pipeline is to use the Object Mask operation.
The Object Mask will black out any pixel outside of the region while preserving the intensities inside:
This can be used to limit the analysis to only within the region since we can easily ignore any pixel with a value of 0, but such image processing can get in the way of several other operations we might want to use in a pipeline because of the artificially hard edge that is created.