The Segment Head process uses histogram analysis to threshold automatically data from background noise in MR images. The WiT igraph for the process is shown in Figure 7.2. A brief description of each igraph operator is listed in Table 7.1.
Figure 7.2: WiT igraph implementing the Segment Head process.
Table 7.1: A brief description of the operators used in the Segment Head igraph.
The PD-weighted MR image volume is read by rdObj and sent to mriHistVolume which produces a voxel intensity histogram. mriHistVolume also outputs the minimum, maximum, and mean voxel intensities in the volume, along with a measure of the standard deviation. The maximum voxel intensity defines the length of the histogram.
The first bin in the histogram is set to zero by mriSetElem. This bin corresponds to zero-valued voxels in the image which can be ignored since they correspond to ``no signal'' in the MR scan. The histogram is then smoothed by mriBlurVector for input into mriBackgroundThres.
mriBackgroundThres uses the method suggested by Brummer et al. to determine the ``best'' threshold level for removing background noise in PD-weighted MR images . Section 2.5 of this manuscript shows that the background noise in PD-weighted MR scans has a Rayleigh distribution. The method fits a Rayleigh curve to the low intensity bins in the histogram using a Levenberg-Marquardt minimization algorithm . The threshold is then chosen using error minimization.
The subtraction of the best fit Rayleigh curve function, , from the volume histogram, , produces a bimodal distribution:
A minimum error threshold, , can be determined from by minimizing an error term, :
mriBackgroundThres outputs the value, , and the best fit Rayleigh curve for verification. Figure 7.3 shows the Rayleigh curve superimposed on the histogram of Data Set 1.
Figure 7.3: The best fit Rayleigh curve superimposed on the histogram of Data Set 1. In this case, .
volumeThres thresholds the grey-valued MR volume at , producing a binary image volume. The result of this threshold is shown in Figure 7.4 for slice 1 of Data Set 1. Notice that the binary image contains ``speckle'' outside the head region and that there are misclassified regions within the head. This ``noise'' is removed using morphological operations.
Figure 7.4: An initial head mask produced using an automatic threshold. (a) Original image. (b) Initial head mask.
The sequence of operators following volumeThres in the Segment Head igraph create a head mask from the thresholded binary image by removing the background ``speckle'' and filling in misclassified regions in the area of the head. Figure 7.5 shows the image at each stage of noise removal. Complete results are presented in Chapter 8.
Figure 7.5: Refining the head mask. (a) ``Noisy'' mask. (b) After mriFillBlobs. (c) After berode. (d) After mriGetLargestBlob. (e) Final head mask.
mriFillBlobs fills holes in each independent white ``blob'' of pixels in the thresholded image. It does so by finding the outermost boundary of each blob then setting all pixels inside the boundary to white. This process fills in misclassified regions in the area of the head.
berode performs a binary erosion operation on the filled image to separate weakly connected blobs (and remove small blobs). mriGetLargestBlob then selects the largest blob, which corresponds to the head, from the result. bdilate enlarges the head blob to its original size, creating the head mask.