Since its introduction in 2010, the 3D region-of-interest (ROI) operator has aided our users in quantification and volume estimation from their image data. The prerequisite of any quantification or volume estimation task is an accurate segmentation for the volume of interest. The 3D ROI tool’s combination of manual, semi-automated, and fully-automated segmentation routines provides a highly complete toolbox with an emphasis on accuracy and efficiency for the user.
Details about the 3D ROI tool are well documented in the VivoQuant manual/help guide
. Should you be interested in learning more about it, you can find useful descriptions, examples, and screenshots there to guide your segmentation workflows.
Otsu Thresholding is one of our more popular automated segmentation techniques for structures with distinct intensity profiles thanks to its ease of use and effectiveness for a variety of applications. In perhaps a lesser-known role, it is also a key default pre-processing feature for the Bias Field Correction tool in the filtering operator.
The technique was initially developed by Nobuyuki Otsu and published in “A Threshold Selection Method from Gray-Level Histograms” in 1979. At its core, the method uses thresholding as a binary classifier for a set of intensities. Originally meant for traditional 2D gray-level images, intensity labels are converted to empirical probabilities and used to find the threshold which minimizes the within-class variance of each label. This criterion provides a sensible threshold to bifurcate the intensity histogram without using any spatial information from the image.
One assumption made by the technique is that the intensity histogram represents a bimodal distribution. Of course, in practice, images will contain much more than two tissue contrasts; however, segmentations are often hierarchical by nature and any binary branch of the underlying hierarchy can be a strong candidate for Otsu’s method. For example, the highest sensible level binary classification is often foreground (patient) versus background. From there, any region of interest can be further subdivided into two regions using Otsu thresholding.
Coupled with other 3D ROI tool functionality, the Otsu method can be very effective for your segmentation tasks. As an example, VivoQuant can restrict Otsu to only run on an “input ROI” as specified in the dropdown. This means that only intensities within that ROI will be used. As such, chaining multiple calls to the Otsu algorithm with existing ROIs can be used to segment lungs from the whole body, differentiate gray and white matter in a whole brain ROI, and more. The algorithm is implemented efficiently in 3D, does not require any sorting, and is thus quick to try and use in semi-automated workflows. Here is an example of a typical CT scan of a mouse (visualized in VivoQuant) overlaid on its voxel histogram:
The histogram shows a clear separation between background/air and tissue voxels. Indeed, applying Otsu thresholding in VivoQuant, we get the following segmentation:
The next subdivision is less clearly defined from the histogram. In our red region, “bone voxels” show up as the tail in the distribution of Hounsfield units above. Applying Otsu thresholding again, this time with the whole body region as input, we can further divide that part of the histogram into the high-intensity bone region and the remainder tissue voxels. To see this in the histogram, we will need to zoom in this time:
Otsu’s method computed a threshold of 1034 HU in this instance, well within a typical bone window level for mice. Note that the histogram can be visualized directly in VivoQuant for the whole image (Tools -> Histogram) or for any ROI (Show Histogram button in 3D ROI tool).
Now that you have a useful segmentation routine in VQ, try using it in your VivoScript!
VQ.mainWin().setViewMode("Slice View", "3D ROI Tool"); var op = VQ.currentOp(); op.addROI("Otsu Seg", "cyan"); op.setInputROI(0); op.applyOtsu();
For more advanced usage of Otsu thresholding in VivoScript, take a look at the example scripts: 00-Example.vqs and HumaneRatSkinner.vqs in the example VivoScript folders of your VivoQuant installation.