Abstract:
Segmenting the prostate boundary is essential in determining the dose plan needed for a successful bracytherapy procedure—an effective and commonly used treatment for prostate cancer. However, manual segmentation is time consuming and can introduce inter and intra-operator variability. This present invention describes an algorithm for segmenting the prostate from two dimensional ultrasound (2D US) images, which can be full-automatic, with some assumptions of image acquisition. Segmentation begins with the user assuming the center of the prostate to be at the center of the image for the fully-automatic version. The image is then filtered to identify prostate edge candidates. The next step removes most of the false edges and keeps as many true edges as possible. Then, domain knowledge is used to remove any prostate boundary candidates that are probably false edge pixels. The image is then scanned along radial lines and only the first-detected boundary candidates are kept the final step includes the removal of some remaining false edge pixels by fitting a polynomial to the image points and removing the point with the maximum distance from the fit. The resulting candidate edges form an initial model that is then deformed using the Discrete Dynamic Contour (DDC) model to obtain a closed contour of the prostate boundary.

Description:
CLAIM OF PRIORITY 
       [0001]    The present application claims priority to the provisional application 60/939,443 filed to the United States Patent and Trademark Office on May 22, 2007, the content of which is hereby incorporated by reference into the present application. 
     
    
     FIELD OF THE INVENTION 
       [0002]    The present invention relates in general to medical imaging systems, and more specifically, to a method for generating an automatic segmentation of the prostate boundary from 2D and 3D images. 
       BACKGROUND OF THE INVENTION 
       [0003]    The prostate gland is an essential part of the male reproductive system. Located in the pelvis behind the pubic bone and right in front of the rectum and below the neck of the bladder, the prostate completely surrounds the urethra, which is the passageway that carries urine from the bladder through the penis and out of the body. In a healthy adult male, the prostate is approximately the size and shape of a walnut, weighing about 20 grams and measuring about 3 cm in width and 2.8 cm in length. Partly fibromuscular and partly glandular, the prostate gland is divided into the following four regions: Anterior fibromuscular zone, peripheral zone, central zone, and transition zone (McNeal 1988). One of the functions of the prostate is to produce a thin and milky seminal fluid that mixes with the fluid produced by the seminal vesicles, a pair of glands attached to it, to make the semen. The sperm, carried from the testicles to the prostate through the vas deferens tube, mixes with the semen. The resulting fluid is then ejaculated during orgasm first by the ejaculatory ducts to the urethra and then through the urethra out of the body. 
         [0004]    Prostate cancer occurs when cells of the prostate begin to grow and to multiply out of control. These cells may spread out of the prostate to the nearby lymph nodes, bones or other parts of the body. This spread is called metastasis. Prostate cancer is the most commonly diagnosed malignancy in men, and is found at autopsy in 30% of men at the age of 50, 40% at age 60, and almost 90% at age 90 (Garfinkel et al. 1994). Worldwide, it is the second leading cause of death due to cancer in men. At its early stages, the disease might not have any symptoms. Some men, however, might experience symptoms that could indicate the presence of prostate cancer. Some of these symptoms include frequent and burning urination, difficulty starting a urinary stream, difficulty in having an erection, and painful ejaculation. Since these symptoms could also indicate other diseases, these men would undergo screening for prostate cancer. 
         [0005]    When diagnosed at an early stage, prostate cancer is curable. The purpose of screening is to detect prostate cancer at its early stages before the development of any symptoms. It can be performed using two tests: the prostate-specific antigen (PSA) blood test, and the digital rectal exam (DRE). 
         [0006]    If the DRE finds an abnormality in the prostate, or the blood test reveals a high level of PSA, then a biopsy of the prostate is recommended. A biopsy is a surgical procedure that involves removing samples of prostate tissues for microscopic examination to determine if they contain cancer cells. In the transrectal biopsy, which is the most commonly used method, a hand-held biopsy gun with a spring-loaded slender needle is guided through the wall of the rectum into the prostate gland then quickly removed. This is done under transrectal ultrasound (TRUS) guidance—a procedure that uses ultrasound generated from a probe that is inserted into the rectum to create an image of the prostate gland. The biopsy needle will contain a cylinder of a prostate tissue sample used for histological examination. This is repeated several times; each biopsy resulting in a sample from a different area of the prostate. Despite the fact that many samples (around 12) are obtained, cancer can still be missed if none of the biopsy needles pass through the cancerous growth. Although this procedure is low-risk, complication may occur. Some possible treatable complications could include prolonged bleeding into the urethra, and infection of the prostate gland or urinary tract. 
         [0007]    An appropriate treatment choice of the prostate cancer is based primarily on its stage, PSA level, and other factors like the man&#39;s age and his general health. Treatment options change considerably if the cancer has already spread beyond the prostate. The results of this project will be used in procedures to treat localized prostate cancer, which has four treatment options, (Bangma et al. 2001), of which include brachytherapy. 
         [0008]    Brachytherapy is radiation therapy that is minimally invasive and that involves inserting seeds containing radioactive material directly into the prostate. LDR, or low-dose-rate brachytherapy, consists of inserting low-dose or low-energy seeds permanently into the prostate. HDR, or high-dose-rate brachytherapy, on the other hand, involves placing high-dose or high-energy seeds temporarily into the prostate, and then removing them once the desired radiation dose has been delivered. HDR provides better dose control, whereas LDR is simpler and with lower risk of infection since it doesn&#39;t involve a removal procedure (Nag S. 1997). Appropriate candidates for brachytherapy are men with cancer confined to the prostate gland. 
         [0009]    Implantation techniques for prostate brachytherapy had started as early as 1913 by inserting radium through a silver tube that was introduced into the urethra. Brachytherapy evolved in the 1970&#39;s with Whitmore who invented an open implant technique that involved interstitial implantation using an open retropubic surgery. In 1980, Charyulu described a transperineal interstitial implant technique. Then, in 1983, Holm, an urologist from Denmark, invented the TRUS-guided technique for implanting permanent radioactive seeds transperineally into the prostate (Nag et al. 1997). This technique became very popular for many reasons including the fact that it is a minimally invasive, outpatient and one-time procedure (Nag et al. 1997). 
         [0010]    Transperineal prostate brachytherapy employs TRUS as the primary imaging modality. Under TRUS guidance, a needle carrying the radioactive seeds is inserted through the perinium and into the prostate via a template. 
         [0011]    A successful brachytherapy procedure requires several steps, including preoperative volume study using TRUS, computerized dosimetry, pubic arch interference determination since the pubic arch is a potential barrier to the passage of the needles, and postoperative dosimetric evaluation (Pathak et al. 2000). Image processing and specifically outlining the prostate boundary accurately plays a key role in all four steps (Grimm et al. 1994). In the volume study, the TRUS probe is inserted into the rectum to acquire a series of cross-sectional 2D images at a fixed interval from the base to the apex (Nag et al. 1997). Then, the prostate boundary is outlined on these cross-sectional 2D image slices using a segmentation algorithm. 
         [0012]    Traditional segmentation algorithms involved a skilled technician to manually outline the prostate boundary. Although this provides an acceptable result (Tong et al. 1996), it is time consuming and is prone to user variability. Therefore, several semi-automatic and fully automatic algorithms, which can be classified into edge-based, texture-based and model-based, have been proposed for segmenting the prostate boundary from 2D TRUS images. 
         [0000]    Edge-Based Prostate Boundary Detection Methods from 2D TRUS Images: 
         [0013]    These algorithms first find image edges by locating the local peaks in the intensity gradient of the image, and then they outline the prostate boundary by performing edge selection followed by edge linking (Shao et al. 2003). Aamink et al. presented an edge-based algorithm for determining the prostate boundary using the gradient of the image in combination with a Laplace filter. They located possible edges at the zero crossings of the second derivative of the image and determined the edge strength by the value of the gradient of the image at that location. Then they used knowledge-based features and ultrasonic appearance of the prostate to choose the correct edges. Finally, they used adaptive interpolation techniques to link the edges that actually present a boundary (Aamink et al. 1994). This method gave good results but it could generate erroneous edges due to artifacts in the image (Shao et al. 2003). 
         [0014]    Pathak et al. also used an edge-based method for outlining the prostate boundary from transrectal ultrasound images. First, they enhanced the contrast and reduced image speckle using the sticks algorithm (Pathak et al. 2000). Then, they further smoothed the resulting image using an anisotropic diffusion filter, and used prior knowledge of the prostate and its shape and echo pattern in ultrasonic images to detect the most probable edges. Finally, they overlaid the detected edges on the top of the image and presented them as a visual guide to the observers to manually delineate the prostate boundary (Pathak et al. 2000). 
         [0015]    Liu et al. also used an edge-based technique called the radial “bas-relief” (RBR) method for prostate segmentation where they obtained a “bas-relief” image, which they superimpose on the original TRUS image to obtain the edge map (Liu et al. 1997). Its insensitivity to edges parallel to the radial direction from the centre of the prostate was the weakness of this method (Chiu et al. 2004). In addition, this method failed if the image centre and the prostate boundary centroid were far from each other. 
         [0000]    Texture-Based Prostate Boundary Detection Methods from 2D TRUS Images 
         [0016]    These techniques characterize regions of an image based on the texture measures. They can determine regions of the image with different textures, and create borders between them to produce an edge map. In their work, Richard and Keen presented an automatic texture-based segmentation method, which was based on a pixel classifier using four texture energy measures associated with each pixel in the image to determine the cluster it belongs to (Richard &amp; Keen 1996). One of the drawbacks of this method was that the resulting prostate may be represented by a set of disconnected regions (Chiu et al. 2004). 
         [0000]    Model-Based Prostate Boundary Detection Methods from 2D TRUS Images 
         [0017]    These techniques use prior knowledge of 2D TRUS images of the prostate to delineate the prostate boundary efficiently. Some model-based methods are based on deformable contour models, in which a closed curve deforms under the influence of internal and external forces until a curve energy metric is minimized (Ladak et al. 2000). Other methods are based on statistical models, in which the variation of the parameters describing the detected object are estimated from the available segmented images and are used for segmentation of new images. The statistical models are obtained from a training set in an observed population (Shao et al. 2003). 
         [0018]    Prater et al. presented a statistical model-based method for segmenting TRUS images of the prostate using feed-forward neural networks. They presented three neural network architectures, which they trained using a small portion of a training image segmented by an expert sonographer (Prater et al. 1992). Their method had the disadvantage of needing extensive training data. 
         [0019]    Pathak et al. presented a method based on snakes to detect the prostate boundary from TRUS images. They first used the sticks algorithm to selectively enhance the contrast along the edges, and then integrated it with a snakes model (Pathak et al. 1998). This algorithm required the user to input an initial curve for each ultrasound image to initiate the boundary detection process. This algorithm is very sensitive to the initial curve and only works well when this initial curve is reasonably close to the prostate boundary (Shao et al. 2003). 
         [0020]    Ladak et al. presented a model-based algorithm for 2D semi-automatic segmentation of the prostate using a discrete dynamic contour (DDC) approach. It involved using cubic spline interpolation and shape information to generate an initial model using only four user-defined points to initialize the prostate boundary. This initial model was then deformed with the DDC model (Ladak et al 2000). 
         [0021]    Ladak&#39;s segmentation algorithm gave good results, demonstrating an accuracy of 90.1% and a sensitivity of 94.5%. In this approach, manual initialization required about 1 min, but the prostate segmentation procedure required about 2 seconds. (Ladak et al. 2000). However, this method requires careful manual initialization of the contour and further user interaction to edit the detected boundary, which introduces complexity and user variability. 
         [0022]    Reducing or removing user interaction, and as a result the variability among observers, would produce a faster, more accurate and reproducible segmentation algorithm. In addition, it may remove the need for the user to initialize the segmentation procedure, a critical criteria for an intraoperative prostate brachytherapy procedure. 
         [0023]    The present invention provides an automatic prostate boundary segmentation method that minimizes and/or eliminates user initialization for segmenting the prostate in 2D or 3D images; thereby reducing both the time required for the procedure and the inter/intra-operator variability ultimately improving the effectiveness and utility of medical in the diagnosis and treatment of prostate cancer. 
       SUMMARY OF THE INVENTION 
       [0024]    The present invention relates generally to a method and approach for generating automatic prostate boundary segmentation for 2D and 3D images. A fully-automated algorithm to select the prostate boundary is provided. 
         [0025]    The method is composed of:
       prostate initialization by making an assumption about the center of the prostate,   edge detection using a filter to remove detail and noise,   length thresholding to remove false edges and keep true edges on the prostate boundary,   use of prior knowledge to aid in determining the prostate boundary by removing any prostate boundary candidates that are false edge pixels,   scanning along radial lines to keep first boundary candidates.   polynomial fitting to remove remaining false edge pixels and to identify unconnected edge pixels that are on the prostate boundary, and   the use of pixels as initial points to a DDC model to obtain a closed contour of the prostate boundary.       
 
         [0033]    Shown in this present invention is that the fully-automatic version of the algorithm performs well. Thus this method for automatic prostate boundary segmentation eliminates user initialization for segmenting the prostate from 2D TRUS images, minimizes the time required for complete prostate segmentation, reduces inter and intra-operator variability and improves the effectiveness and utility of TRUS in diagnosis and treatment of prostate cancer. Although shown here is the use of this method in prostate boundary segmentation, this method is also applicable to segmentation of any object including, tumors, kidneys, and other organs. Also shown in this present invention is the use of 2D TRUS images for initialization, however, it is also applicable to other 2D or 3D US, CT and MRI images. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0034]    The present invention will be further understood and supported using the following drawings and their associated descriptions. These descriptions and drawings are not meant to limit the invention by any circumstance and are to be interpreted as possible embodiments of the invention disclosed herein. The methods utilized in the generation of the data represented by these drawings are commonly known within the art and may be reproduced identically by employing the methods described herein. 
           [0035]      FIG. 1  shows a flow chart of our proposed prostate segmentation algorithm. The following sections describe the steps used to generate the initial prostate boundary that is used as an input into Ladak&#39;s DDC segmentation algorithm. 
           [0036]      FIG. 2  shows prostate initialization. Approximate prostate center is chosen manually or automatically. 
           [0037]      FIG. 3  shows a mask used to implement the digital Gaussian filter with σ=1. 
           [0038]      FIG. 4  shows masks used to implement the digital 3×3 Laplacian filter. 
           [0039]      FIG. 5  shows 5×5 digital approximation to the LoG filter. 
           [0040]      FIG. 6  shows the LOG filter result of the prostate image in  FIG. 2.2  for T=0 and σ=7. 
           [0041]      FIG. 7  shows results after removing short-length connected components. (a) After removing connected components less than 120 pixels from the image in  FIG. 6 . (b) After removing connected components shorter than 425 pixels with a minimum distance to the centre less than 50 pixels. One connected component inside the prostate gland was removed. 
           [0042]      FIG. 8  shows an image in which matrices I in  and I out  represents two 5×5 regions at the pixel P on the inside and the outside of the prostate respectively. X out  is the mean of I out , X in  the mean of I in , σ out  the standard deviation of I out  and σ in  the standard deviation of I in . 
           [0043]      FIG. 9  shows t-values with their corresponding P-values. 
           [0044]      FIG. 10  shows contrast-test membership function. 
           [0045]      FIG. 11  shows distance test membership function. 
           [0046]      FIG. 12  shows pixels&#39; membership values. (a) is an image showing the membership value at each pixel based on the contrast test, (b) is an image showing the membership value at each pixel based on the distance test, (c) is an image showing the membership value at each pixel based on the product of the contrast test and the distance test, and (d) is an image showing the pixels left after keeping the pixels detected first along radial lines and removing the ones detected later. 
           [0047]      FIG. 13  shows different F-values with their corresponding P-values. 
           [0048]      FIG. 14  shows F-test membership function. 
           [0049]      FIG. 15  shows remaining pixels based on the M membership function. 
           [0050]      FIG. 16  shows remaining pixels based on the M final  membership function. 
           [0051]      FIG. 17  shows polynomial fit. Gray: Candidate prostate boundary pixels; Black: fit. 
           [0052]      FIG. 18  shows final polynomial fit showing that the maximum distance from the fit is less than 4 mm. Gray: Candidate prostate boundary pixels; Black: fit 
           [0053]      FIG. 19  shows the final pixels on the prostate boundary. 
           [0054]      FIG. 20  shows the final results. (a) and (c) show the final pixels generated by our initialization algorithm before applying the DDC segmentation for two different prostate images, and (b) and (d) show the final result after deformation using DDC segmentation. 
           [0055]      FIG. 21  shows the LoG filter output for one prostate image. (a) σ=5, (b) σ=7, (c) σ=9, and (d) σ=11. 
       
    
    
       [0056]    Table 1 shows t statistic&#39;s significance level optimization. Mean number of clusters on prostate boundary, mean of their maximum gap, and mean number of clusters off the boundary for the four prostate images used for different significant level values. 
         [0057]    Table 2 shows F statistic&#39;s significance level optimization. Mean number of clusters on prostate boundary for the four prostate images used, mean of their maximum gap, and mean number of clusters off the boundary for each significant level value α F . 
         [0058]    Table 3 shows evaluation metrics MD, MAXD, PC, AO, and AD for the semi-automatic version of our segmentation algorithm for the entire set of 51 prostate images. The first six entries are for the images shown in  FIG. 4 . 
         [0059]    Table 4 shows evaluation metrics MD, MAXD, PC, AO, and AD for the fully-automatic version of our prostate segmentation algorithm for the entire set of 51 prostate images, and the mean and the standard deviation for the entire set. 
       DETAILED DESCRIPTION OF THE INVENTION 
       [0060]    In accordance with one aspect of the present invention, as an input, the algorithm requires the approximate prostate centre. For prostate brachytherapy, the prostate gland is typically centred at the approximate centre of the image. In this case, the user does not need to select the prostate centre; as a result, the algorithm of the present invention would be fully-automatic. In cases when the prostate is not centred at the centre of the image, the user must select the approximate centre; as a result, our algorithm would be semi-automatic.  FIG. 2  shows a 2D prostate TRUS image with the location of the user-selected centre shown by a dot and the centre of the image shown as a cross. 
         [0061]    The Gaussian filter is used to blur the image and remove some detail and noise by convolving it with the 2D Gaussian distribution h(x, y): 
         [0000]    
       
         
           
             
               
                 
                   
                     h 
                      
                     
                       ( 
                       
                         x 
                         , 
                         y 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       1 
                       
                         2 
                          
                         π 
                          
                         
                             
                         
                          
                         
                           σ 
                           2 
                         
                       
                     
                      
                     
                        
                       
                         - 
                         
                           
                             
                               x 
                               2 
                             
                             + 
                             
                               
                                 y 
                                  
                                 
                                     
                                 
                               
                               2 
                             
                           
                           
                             2 
                              
                             
                               σ 
                               2 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where σ is the standard deviation that determines the degree of smoothing. A digital approximation to the Gaussian function with σ=1 can be implemented using a 5×5 mask shown in  FIG. 3 . A larger σ would require a larger mask. 
         [0062]    Used for edge detection, the Laplacian of a function (image), f(x, y) , is a 2D second-order derivative defined as (Gonzalez and Woods 2002): 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       ∇ 
                       2 
                     
                      
                     f 
                   
                   = 
                   
                     
                       
                         
                           ∂ 
                           2 
                         
                          
                         f 
                       
                       
                         ∂ 
                         
                           x 
                           2 
                         
                       
                     
                     + 
                     
                       
                         
                           ∂ 
                           2 
                         
                          
                         f 
                       
                       
                         ∂ 
                         
                           y 
                           2 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0063]    The Laplacian highlights regions of rapid intensity change.  FIG. 4  shows two most commonly used digital approximations to the Laplacian filter for a 3×3 region. 
         [0064]    The Laplacian filter is very sensitive to noise since it is a second-order derivative, is unable to detect an edge direction and its magnitude produces double edges (Gonzalez and Woods 2002). 
         [0065]    Since the Laplacian filter is very sensitive to noise, the image can first be smoothed by convolving it with a Gaussian filter; the result is then convolved with a Laplacian filter. Since the convolution operator is associative, the same result can be obtained by convolving the Gaussian filter with the Laplacian filter first to obtain the Laplacian of Gaussian (LoG) filter, which is then convolved with the image as shown in equation 3. 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           Output 
                            
                           
                               
                           
                            
                           Image 
                         
                         = 
                           
                          
                         
                           
                             ( 
                             
                               
                                 
                                   
                                     Input 
                                      
                                     
                                         
                                     
                                      
                                     Image 
                                     * 
                                   
                                 
                               
                               
                                 
                                   
                                     Gaussian 
                                      
                                     
                                         
                                     
                                      
                                     filter 
                                   
                                 
                               
                             
                             ) 
                           
                           * 
                           Laplacian 
                            
                           
                               
                           
                            
                           filter 
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             ( 
                             
                               Input 
                                
                               
                                   
                               
                                
                               Image 
                             
                             ) 
                           
                           * 
                           
                             ( 
                             
                               
                                 
                                   
                                     Gaussian 
                                      
                                     
                                         
                                     
                                      
                                     filter 
                                     * 
                                   
                                 
                               
                               
                                 
                                   
                                     Laplacian 
                                      
                                     
                                         
                                     
                                      
                                     filter 
                                   
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   
                     
                       
                         = 
                           
                          
                         
                           
                             ( 
                             
                               Input 
                                
                               
                                   
                               
                                
                               Image 
                             
                             ) 
                           
                           * 
                           
                             ( 
                             
                               Laplacian 
                                
                               
                                   
                               
                                
                               of 
                                
                               
                                   
                               
                                
                               Gaussian 
                                
                               
                                   
                               
                                
                               filter 
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
     
         [0000]    The 2-D LoG operator with Gaussian standard deviation σ is given by: 
         [0000]    
       
         
           
             
               
                 
                   
                     LoG 
                      
                     
                       ( 
                       
                         x 
                         , 
                         y 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       - 
                       
                         
                           1 
                           
                             π 
                              
                             
                                 
                             
                              
                             
                               σ 
                               4 
                             
                           
                         
                         [ 
                         
                           
                             
                               
                                 x 
                                 2 
                               
                               + 
                               
                                 y 
                                 2 
                               
                             
                             
                               2 
                                
                               
                                   
                               
                                
                               
                                 σ 
                                 2 
                               
                             
                           
                           - 
                           1 
                         
                         ] 
                       
                     
                      
                     
                        
                       
                         - 
                         
                           
                             
                               x 
                               2 
                             
                             + 
                             
                               y 
                               2 
                             
                           
                           
                             2 
                              
                             
                                 
                             
                              
                             
                               σ 
                               2 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
         [0066]    The LoG filter consists of convolving the image with LoG(x, y) operator, which yields an image with double edges. Then, finding edge location consists of finding zero crossings between the double edges. 
         [0067]    The LOG filter inputs two parameters: the standard deviation, σ, and a sensitivity threshold in the range [0,1] used to ignore edge points with 2D first-order derivative (gradient magnitude at that location) not greater than T. Setting T to 0 produces edges that are closed contours. We used the built-in Matlab command, edge, specifying the two parameters σ and T of the LoG filter. The size of the filter is n×n, where n=ceil (σ×3)×2+1, and ceil rounds (σ×3) to the nearest integer greater than or equal to (σ×3). The output of the edge command is a logical array with 1&#39;s where edge points were detected, and 0&#39;s elsewhere as shown in  FIG. 6  (Gonzalez et al. 2004). 
         [0068]    Visual comparison of  FIGS. 2 and 6  shows that some of the edges in  FIG. 6  are “true” edges on the prostate boundary, and others are “false” edges that represent noise, calcifications and other structures. The aim of the next steps is to remove most of the false edges and keep as many correct edges as possible. 
         [0069]    Groups of edge pixels in  FIG. 6  are linked together to form the image&#39;s connected components, some are short lengths consisting of few pixels and others are long lengths consisting of many pixels. For most prostate images, connected components less than 120 pixels, or 24 mm, are not part of the prostate boundary; therefore such connected components are removed.  FIG. 7  ( a ) shows the results of applying this step to the image in  FIG. 6 . In addition, connected components are removed with lengths less than 425 pixels, or 85 mm, and with a distance to the prostate centre that is less than 50 pixels, or 10 mm, as they would lie inside the gland since an average prostate gland measures more than 25 mm in width and height. The result of applying this step to the image in  FIG. 6  is shown in  FIG. 7  ( b ). 
         [0070]    To identify the boundary of an object in an image, experts use a prior knowledge of the particular image class (Nanayakkara et al. 2006, Karmakar et al. 2002). To remove more of the “false” edges from the image shown in  FIG. 7  ( b ), a prior knowledge of a typical prostate image was also used to help with determining the boundary. Some observations about 2D TRUS images of the prostate include:
       The inside of the prostate gland is typically darker than the outside.   The inside of the prostate gland is typically smoother than the outside.   An average prostate in patients undergoing a brachytherapy procedure is approximately 3 cm in width and 2.8 cm in height.
 
Using these criteria, three tests were performed on each edge pixel, where each is assigned a probability of being part of the prostate boundary.
       
 
         [0074]    In this test, the following observation was used: inside of the prostate is typically darker than the outside. Matrices I out  and I in  represent two 5×5 regions at a border candidate pixel, P, with mean grey levels X out  and X in  respectively as shown in  FIG. 8 . To prevent any overlap between these 2 matrices, their centres were chosen to be 10 pixels, or 2 mm, away from P. In order for the pixel P to be on the prostate boundary, I out  has to be brighter than I in , and as a result X out  should be greater than X in  (Nannayakkara et al. 2006). 
         [0075]    Since estimates of X out  and X in  are subject to variation due to image noise, it was tested whether X out  is greater than X in , and assigned a probability of boundary membership based on the t-test where t-statistic is defined as (Rosner 2000): 
         [0000]    
       
         
           
             
               
                 
                   t 
                   = 
                   
                     
                       ( 
                       
                         
                           X 
                           out 
                         
                         - 
                         
                           X 
                           
                             i 
                              
                             
                                 
                             
                              
                             n 
                           
                         
                       
                       ) 
                     
                     
                       
                         
                           ( 
                           
                             
                               σ 
                               out 
                               2 
                             
                             n 
                           
                           ) 
                         
                         + 
                         
                           ( 
                           
                             
                               σ 
                               
                                 i 
                                  
                                 
                                     
                                 
                                  
                                 n 
                               
                               2 
                             
                             n 
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where σ out   2  is the variance of region I out , σ in   2  is the variance of I in , and n is the size of I out  and I in . 
         [0076]    If a pixel is indeed on the prostate boundary, its t-value has to be positive and significantly different than zero. The significance of the difference is measured by a P-value.  FIG. 9  shows the t-values of the image pixels with their corresponding P-values. 
         [0077]    Although conventional biomedical statistical analysis typically uses a P-value of 0.05 as a threshold for significance, a threshold value P th  was chosen to optimize the segmentation performance, and t th  is its corresponding t-value. Using P th , a contrast membership function, M c , was constructed as defined in equation (6), which assigns for each pixel being tested a probability of being on the prostate boundary based on its t-value. A plot of the contrast-test membership function M c  is shown in  FIG. 10 . 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       M 
                       c 
                     
                      
                     
                       ( 
                       pixel 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           
                             
                               ( 
                               
                                 
                                   P 
                                   th 
                                 
                                 - 
                                 
                                   P 
                                   pixel 
                                 
                               
                               ) 
                             
                             
                               P 
                               th 
                             
                           
                         
                         
                           
                             
                               t 
                               pixel 
                             
                             &gt; 
                             
                               t 
                               th 
                             
                           
                         
                       
                       
                         
                           
                             t 
                              
                             
                                 
                             
                              
                             value 
                           
                         
                         
                           
                               
                           
                         
                       
                       
                         
                           0 
                         
                         
                           else 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
           
         
       
     
         [0078]    The image showing each pixel&#39;s probability measure is shown in  FIG. 12   a . The darker font represents pixels with a higher membership value, the lighter font represents pixels with a lower membership value, and the pixels with zero membership value are of course eliminated. 
         [0079]    In this test, the following fact is used: typical prostates in patients scheduled for brachytherapy are on average 3 cm in width and 2.8 cm in height. Therefore, assuming a circular shape of the prostate in the 2D ultrasound image, the boundary should be found between two distances, which encompass the mean size of the prostate. The following two distances were used from the centre, d 1 =7 mm and d 2 =14 mm, and constructed a membership function, M D , as shown in  FIG. 11 , which assigns for each pixel being examined a probability value based on its distance from the prostate centre. This membership function is the built-in Matalb function pimf given by equation (7). 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         
                           
                             M 
                             D 
                           
                            
                           
                             ( 
                             
                               pixel 
                               , 
                               
                                 [ 
                                 
                                   a 
                                   , 
                                   b 
                                   , 
                                   c 
                                   , 
                                   d 
                                 
                                 ] 
                               
                             
                             ) 
                           
                         
                         = 
                           
                          
                         
                           pimf 
                            
                           
                             ( 
                             
                               pixel 
                               , 
                               
                                 [ 
                                 
                                   a 
                                   , 
                                   b 
                                   , 
                                   c 
                                   , 
                                   d 
                                 
                                 ] 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                   
                     
                       
                         
                           = 
                             
                            
                           
                             
                               smf 
                                
                               
                                 ( 
                                 
                                   pixel 
                                   , 
                                   
                                     [ 
                                     
                                       a 
                                       , 
                                       b 
                                     
                                     ] 
                                   
                                 
                                 ) 
                               
                             
                             × 
                             
                               zmf 
                                
                               
                                 ( 
                                 
                                   pixel 
                                   , 
                                   
                                     [ 
                                     
                                       c 
                                       , 
                                       d 
                                     
                                     ] 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                         ; 
                       
                     
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where the parameters [a, b, c, d]=[minimum(dist), d1, d2, maximum(dist)]; dist is the vector of distance values from the edge pixels to the prostate centre; and the two functions smf and xmf are defined as shown in equations (8) and (10), respectively (MATLAB—The Language of Technical Computing). 
         [0000]    
       
         
           
             
               
                 
                   
                     smf 
                      
                     
                       ( 
                       
                         pixel 
                         , 
                         
                           [ 
                           
                             a 
                             , 
                             b 
                           
                           ] 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           1 
                         
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 a 
                                 ≥ 
                                 b 
                               
                               ) 
                             
                              
                             
                                 
                             
                              
                             and 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 
                                   d 
                                   pixel 
                                 
                                 ≥ 
                                 
                                   
                                     a 
                                     + 
                                     b 
                                   
                                   2 
                                 
                               
                               ) 
                             
                           
                         
                       
                       
                         
                           0 
                         
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 a 
                                 ≥ 
                                 b 
                               
                               ) 
                             
                              
                             
                                 
                             
                              
                             and 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 
                                   d 
                                   pixel 
                                 
                                 &lt; 
                                 
                                   
                                     a 
                                     + 
                                     b 
                                   
                                   2 
                                 
                               
                               ) 
                             
                           
                         
                       
                       
                         
                           0 
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 d 
                                 pixel 
                               
                             
                             ≤ 
                             a 
                           
                         
                       
                       
                         
                           
                             2 
                             × 
                             
                               [ 
                               
                                 
                                   ( 
                                   
                                     
                                       
                                         d 
                                         pixel 
                                       
                                       - 
                                       a 
                                     
                                     
                                       b 
                                       - 
                                       a 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                               ] 
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               a 
                             
                             &lt; 
                             
                               
                                 d 
                                 pixel 
                               
                                
                               
                                   
                               
                                
                               and 
                                
                               
                                   
                               
                                
                               
                                 ( 
                                 
                                   
                                     d 
                                     pixel 
                                   
                                   ≤ 
                                   
                                     
                                       a 
                                       + 
                                       b 
                                     
                                     2 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                       
                         
                           
                             1 
                             - 
                             
                               2 
                               × 
                               
                                 [ 
                                 
                                   
                                     ( 
                                     
                                       
                                         b 
                                         - 
                                         
                                           d 
                                           pixel 
                                         
                                       
                                       
                                         b 
                                         - 
                                         a 
                                       
                                     
                                     ) 
                                   
                                   2 
                                 
                                 ] 
                               
                             
                           
                         
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     a 
                                     + 
                                     b 
                                   
                                   2 
                                 
                                 &lt; 
                                 
                                   d 
                                   pixel 
                                 
                               
                               ) 
                             
                              
                             
                                 
                             
                              
                             and 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 
                                   d 
                                   pixel 
                                 
                                 ≤ 
                                 b 
                               
                               ) 
                             
                           
                         
                       
                       
                         
                           1 
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               b 
                             
                             ≤ 
                             
                               d 
                               pixel 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
             
               
                 
                   
                     zmf 
                      
                     
                       ( 
                       
                         pixel 
                         , 
                         
                           [ 
                           
                             c 
                             , 
                             d 
                           
                           ] 
                         
                       
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           1 
                         
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 d 
                                 ≥ 
                                 c 
                               
                               ) 
                             
                              
                             
                                 
                             
                              
                             and 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 
                                   d 
                                   pixel 
                                 
                                 ≤ 
                                 
                                   
                                     c 
                                     + 
                                     d 
                                   
                                   2 
                                 
                               
                               ) 
                             
                           
                         
                       
                       
                         
                           0 
                         
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 d 
                                 ≥ 
                                 c 
                               
                               ) 
                             
                              
                             
                                 
                             
                              
                             and 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 
                                   d 
                                   pixel 
                                 
                                 &gt; 
                                 
                                   
                                     c 
                                     + 
                                     d 
                                   
                                   2 
                                 
                               
                               ) 
                             
                           
                         
                       
                       
                         
                           1 
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 d 
                                 pixel 
                               
                             
                             ≤ 
                             d 
                           
                         
                       
                       
                         
                           
                             1 
                             - 
                             
                               2 
                               × 
                               
                                 [ 
                                 
                                   
                                     ( 
                                     
                                       
                                         
                                           d 
                                           pixel 
                                         
                                         - 
                                         d 
                                       
                                       
                                         d 
                                         - 
                                         c 
                                       
                                     
                                     ) 
                                   
                                   2 
                                 
                                 ] 
                               
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               d 
                             
                             &lt; 
                             
                               
                                 d 
                                 pixel 
                               
                                
                               
                                   
                               
                                
                               and 
                                
                               
                                   
                               
                                
                               
                                 ( 
                                 
                                   
                                     d 
                                     pixel 
                                   
                                   ≤ 
                                   
                                     
                                       d 
                                       + 
                                       c 
                                     
                                     2 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                       
                         
                           
                             2 
                             × 
                             
                               [ 
                               
                                 
                                   ( 
                                   
                                     
                                       c 
                                       - 
                                       
                                         d 
                                         pixel 
                                       
                                     
                                     
                                       d 
                                       - 
                                       c 
                                     
                                   
                                   ) 
                                 
                                 2 
                               
                               ] 
                             
                           
                         
                         
                           
                             if 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     d 
                                     + 
                                     c 
                                   
                                   2 
                                 
                                 &lt; 
                                 
                                   d 
                                   pixel 
                                 
                               
                               ) 
                             
                              
                             
                                 
                             
                              
                             and 
                              
                             
                                 
                             
                              
                             
                               ( 
                               
                                 
                                   d 
                                   pixel 
                                 
                                 ≤ 
                                 c 
                               
                               ) 
                             
                           
                         
                       
                       
                         
                           0 
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               c 
                             
                             ≤ 
                             
                               d 
                               pixel 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where d pixel  is the distance from the pixel under consideration to the prostate centre. 
         [0080]    The image showing each pixel&#39;s probability for being part of the prostate boundary based on the distance test is shown in  FIG. 12(   b ). As with the contrast-test membership function, the darker font represents pixels with a higher membership value, the lighter font represents pixels with a lower membership value, and the pixels with zero membership value are of course eliminated. 
         [0081]    Since a pixel on the prostate boundary has to satisfy both the contrast-test and the distance-test, we multiply the contrast-test membership function and the distance-test membership function to obtain M CD  membership function as follows: 
         [0000]        M   CD (pixel)= M   c (pixel)× M   D (pixel)   (10) 
         [0000]    The image showing each pixel&#39;s probability value based on M CD  is shown in  FIG. 12(   c ) using the same colour codes described previously. Although some of the false edge pixels are inside the gland, most of them are on the outside. Therefore, M CD  was modified by removing more false edge pixels by assuming that true pixels are the first to be detected when scanning the image shown in  FIG. 12(   c ) along radial lines from the centre. Therefore, a modified membership function M′ CD  was constructed as shown in equation 11 where the membership value of the first detected pixels along each radial line will be equal to M CD , and those that lie along same radial lines but are further away from the centre will have a zero membership value. The image showing each pixel&#39;s probability value based on M′ CD  is shown in  FIG. 12(   d ) using the same colour codes described previously. As shown in this figure, more false edges have been removed. 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       M 
                       
                         C 
                          
                         
                             
                         
                          
                         D 
                       
                     
                      
                     
                       ( 
                       pixel 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           
                             
                               M 
                               
                                 C 
                                  
                                 
                                     
                                 
                                  
                                 D 
                               
                             
                              
                             
                               ( 
                               pixel 
                               ) 
                             
                           
                         
                         
                           
                             
                               
                                 
                                   if 
                                    
                                   
                                       
                                   
                                    
                                   pixel 
                                    
                                   
                                       
                                   
                                    
                                   is 
                                    
                                   
                                       
                                   
                                    
                                   first 
                                    
                                   
                                       
                                   
                                    
                                   to 
                                    
                                   
                                       
                                   
                                    
                                   be 
                                    
                                   
                                       
                                   
                                    
                                   detected 
                                 
                               
                             
                             
                               
                                 
                                   along 
                                    
                                   
                                       
                                   
                                    
                                   a 
                                    
                                   
                                       
                                   
                                    
                                   given 
                                    
                                   
                                       
                                   
                                    
                                   radial 
                                    
                                   
                                       
                                   
                                    
                                   line 
                                 
                               
                             
                           
                         
                       
                       
                         
                           0 
                         
                         
                           else 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
         [0000]    Since many false edge pixels still remain inside and outside the prostate gland, as shown in  FIG. 12(   d ), the observation that the inside of the prostate is typically smoother than the outside was used to perform a texture test. If σ out   2  and σ in   2  are the intensity variances of the regions I out  and I in  respectively, then in order for an edge pixel to be on the prostate boundary, I in  should be smoother than I out , and as a result σ out   2 &gt;σ in   2 . Since estimates of σ out   2  and σ in   2  are subject to variation due to image noise, it was tested whether σ out   2  is greater than σ in   2 , and assign a probability of boundary membership based on the F-test where F-statistic is defined as (Rosner 2000): 
         [0000]    
       
         
           
             
               
                 
                   
                     F 
                     th 
                   
                    
                   
                     
 
                   
                    
                   
                     F 
                     = 
                     
                       
                         σ 
                         out 
                         2 
                       
                       
                         σ 
                         
                           i 
                            
                           
                               
                           
                            
                           n 
                         
                         2 
                       
                     
                   
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
           
         
       
     
         [0000]    If a pixel is indeed on the prostate boundary, its F-value has to be significantly greater than 1.  FIG. 13  shows the F-values of the image pixels with their corresponding P-values. 
         [0082]    Although conventional biomedical statistical analysis typically uses a P-value of 0.05 as a threshold for significance, a threshold value P th  was chosen to optimize the segmentation performance, and F th  is its corresponding F-value. Using P th , we constructed a membership function, M T , described in equation (13), which assigns for each pixel being tested a probability of being on the prostate boundary based on its F-value. A plot of the texture-test membership function M T  is shown in  FIG. 14 . 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       M 
                       T 
                     
                      
                     
                       ( 
                       pixel 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           
                             
                               ( 
                               
                                 
                                   P 
                                   threshold 
                                 
                                 - 
                                 
                                   P 
                                   pixel 
                                 
                               
                               ) 
                             
                             
                               P 
                               threshold 
                             
                           
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 F 
                                 pixel 
                               
                             
                             &gt; 
                             
                               F 
                               threshold 
                             
                           
                         
                       
                       
                         
                           0 
                         
                         
                           else 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
         [0083]    A pixel on the prostate boundary has to satisfy all three tests; therefore, the final membership function M should be the product of M CD  and M T , as described in equation 14. The image showing each pixel&#39;s probability value based on the final membership function M using the colour codes as before is shown in  FIG. 15 . Most of the edge pixels with a probability greater than 0.7 are on the prostate boundary. Therefore, the final membership function, M Final , was constructed as described in equation (15), which assigns a membership of zero to the pixels with probability less than 0.7.  FIG. 16  shows all edge pixels remaining after removing those with a probability less than 0.7. 
         [0000]        M (pixel)= M   CD (pixel)× M   T (pixel)   (14) 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       M 
                       Final 
                     
                      
                     
                       ( 
                       pixel 
                       ) 
                     
                   
                   = 
                   
                     { 
                     
                       
                         
                           1 
                         
                         
                           
                             
                               if 
                                
                               
                                   
                               
                                
                               
                                 M 
                                  
                                 
                                   ( 
                                   pixel 
                                   ) 
                                 
                               
                             
                             ≥ 
                             0.7 
                           
                         
                       
                       
                         
                           0 
                         
                         
                           else 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
           
         
       
     
         [0084]    As shown in  FIG. 16 , some false edge pixels remain. If the prostate gland is perfectly circular, then mapping the image into (R,Θ) coordinates (where R is the distance from a pixel to the prostate centre and Θ is the clockwise angle that the pixel forms with the horizontal diameter) should result in the true edge pixels forming a straight line. However, if the prostate gland is elliptical, then this kind of mapping should result in the true edge pixels forming a curve that could be described by a 9 th  order polynomial; false edge pixels would be far from the curve. Since a typical prostate gland in a transverse plane is elliptical, the removal of the false edge pixels remaining in the image shown in  FIG. 16  can be carried out by mapping that image into (R,Θ) coordinates and fitting a polynomial to the pixels, as shown in  FIG. 17 . We then remove a candidate pixel with the maximum distance from the resulting fit and repeat the fit and the removal of the furthest pixel until the maximum distance of pixels away from the curve is less than 4 mm. The final polynomial fit is shown in  FIG. 18 , and the final image showing the remaining pixels on the prostate boundary is shown in  FIG. 19 . 
         [0085]    After the polynomial fitting, we are left with unconnected edge pixels that are highly probable to be on the prostate boundary. Some of these pixels might not be exactly on the boundary. To obtain a closed contour of the prostate boundary, we use these pixels as initial points to Ladak&#39;s et al. DDC model (Ladak et al. 2000), a polyline that deforms under the influence of internal and external forces to fit features in an image (Lobregt and Viergever 1995, Ladak et al. 2000).  FIG. 20  shows two prostate images with their respective initialization points resulting from our algorithm, and final contours.  FIG. 20  ( a ) shows a prostate image with the result from the initialization algorithm, and  FIG. 20  ( b ) shows its closed contour after deformation with the DDC model.  FIG. 20  ( c ) shows another prostate image with the result from our initialization algorithm, and  FIG. 20  ( d ) shows its closed contour that results from the DDC segmentation. 
         [0086]    To evaluate the algorithm in this present invention, we segmented 51 2D TRUS prostate images obtained from three different patients scheduled for brachytherapy using both versions of the algorithm: the semi-automatic version and the fully-automatic version. The 51 images were acquired using a transrectal ultrasound coupled to a 3D TRUS system developed in our lab (Tong et al. 1998). The images were 468×356 pixels each with pixel size approximately 0.2 mm×0.2 mm. The ‘gold standard’ in evaluating the proposed algorithm was manually outlined prostate boundaries of the same images performed by an expert radiologist. 
         [0087]    Four different images were used to optimize the parameters employed in the algorithm. To optimize the standard deviation, σ, which determines the degree of smoothing of the LOG filter, we varied its value from σ=1 to σ=11 in increments of 2, and visually determined the value that resulted in more true edge pixels, less false edge pixels, and a contour that is closer to the prostate boundary for four different prostate images.  FIG. 21  shows examples of the result of the LOG filter for one of the prostate images used with different values of σ. The optimum a value was found to be 7 ( FIG. 21   b ). 
         [0088]    The null hypothesis for the contrast-test was that the regions I in  and I out  on both sides of the boundary (see  FIG. 8 ) have the same mean brightness level; in which case, it would be less probable that the pixel is a part of the prostate boundary. The alternative hypothesis was that these two regions have different mean brightness levels with the outside being brighter than the inside; in which case, it is more probable that the pixel is a part of the prostate boundary. For each pixel in question, we performed a T-test with a significance level α T , and obtained a p-value. If this p-value is less than α T , then we reject the null hypothesis and assume that the alternative hypothesis is true. The higher the value of α T , the more pixels we accept as being part of the prostate boundary. To determine the optimal significance level, we performed the T-test using 7 different values of α T  for each of the four images, from α T =0.001 to α T =0.05 and then computed the followings: the number of clusters on the prostate boundary, the gap between these clusters, and the number of clusters off the true prostate boundary. The objective was to find a combination that generated more clusters on the prostate boundary, smaller gaps between them, and fewer clusters off the prostate boundary. Table 1 shows for each α T  the mean of the values obtained for the four prostate images. α T =0.03 was found to be the optimum. 
         [0089]    The F-test was used to compare the standard deviation on each side of a candidate boundary pixel. The null hypothesis was that the region inside, R in , and the region outside, R out , (see  FIG. 8 ) have the same variance; in which case, it would be less probable that the pixel is a part of the prostate boundary. The alternative hypothesis was that these two regions have different variances; in which case, it is more probable that the pixel is a part of the prostate boundary. After multiplying the contrast-test membership function and the distance membership function using the optimum values for the parameters σ and σ T , we performed an F-test with a significance level α F  for each pixel left in question, and obtained a p-value. Like the t-test, if this p-value is less than α F , then we reject the null hypothesis and assume that the alternative hypothesis is true. The higher the value of α F , the more pixels we accept as being a part of the prostate boundary. To determine the optimal α F  value, we performed the F-test using 7 different values for a for each of the four images, from α F =0.001 to α F =0.05 and then computed the followings: the number of clusters on the prostate boundary, the gap between these clusters, and the number of clusters off the prostate boundary. The objective was to find the value of α F , which generated more clusters on the prostate boundary, smaller gaps between them, and fewer clusters off the prostate boundary. Table 2 shows for each α F  the mean of the values obtained for the four prostate images. α F =0.03 was found to be the optimum for the F-test. 
         [0090]    To test the overall performance of the algorithm, the following was determined: (1) the accuracy when the user inputs the prostate centre; (2) the sensitivity to the user input position and (3) the accuracy when the prostate centre is assumed to be the centre of the image and found automatically: 
         [0091]    Automated initialization: Assuming that the prostate is centred at the centre of the image, and there is no need for the input of the user, the fully-automatic version of our proposed segmentation algorithm was used with the optimum parameter values found above to segment the prostate boundary using the set of 51 prostate images. The results of the fully-automatic version of the segmentation algorithm were compared with the manually segmented boundaries using the evaluation metrics described below. 
         [0000]    Distance-based and area-based metrics were used to compare the boundaries outlined using either version of our algorithm (the semi-automatic version or the fully-automatic version) to the manually outlined boundaries (Nannayakkara et al. 2006, Chiu et al. 2004, Ladak et al. 2000). 
         [0092]    Distance-based metrics were used to measure the distance between the contour generated using either version of our segmentation algorithm and the manually outlined contour. Let C={c i , i=1, 2, . . . K} be the set of vertices that define the algorithm-generated contour, and M={m j =1:2, . . . N} be the set of vertices that define the manually generated contour. To obtain a measure of the distance between both contours, these contours were linearly interpolated to have vertices 1 pixel apart, and then the distance between a vertex, c i , from C and M, d(c 1 ,M), was computed as shown in equation (16): 
         [0000]    
       
         
           
             
               
                 
                   
                     d 
                      
                     
                       ( 
                       
                         
                           c 
                           i 
                         
                         , 
                         M 
                       
                       ) 
                     
                   
                   = 
                   
                     
                       min 
                       j 
                     
                      
                     
                       
                          
                         
                           
                             c 
                             i 
                           
                           - 
                           
                             m 
                             j 
                           
                         
                          
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
     
         [0000]    For each image, we computed the following three parameters: 
         [0093]    1) MAD, the mean absolute distance that measures the mean error in the segmentation: 
         [0000]    
       
         
           
             
               
                 
                   MAD 
                   = 
                   
                     
                       1 
                       k 
                     
                      
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         k 
                       
                        
                       
                         
                           d 
                            
                           
                             ( 
                             
                               
                                 c 
                                 i 
                               
                               , 
                               M 
                             
                             ) 
                           
                         
                         . 
                       
                     
                   
                 
               
               
                 
                   ( 
                   17 
                   ) 
                 
               
             
           
         
       
     
         [0094]    2) MAXD, the maximum distance that measures the maximum error in segmentation: 
         [0000]    
       
         
           
             
               
                 
                   MAXD 
                   = 
                   
                     
                       max 
                       
                         i 
                         ∈ 
                         
                           [ 
                           
                             1 
                             , 
                             k 
                           
                           ] 
                         
                       
                     
                      
                     
                       
                         { 
                         
                           d 
                            
                           
                             ( 
                             
                               
                                 c 
                                 i 
                               
                               , 
                               M 
                             
                             ) 
                           
                         
                         } 
                       
                       . 
                     
                   
                 
               
               
                 
                   ( 
                   18 
                   ) 
                 
               
             
           
         
       
     
         [0095]    3) PC, which is the percentage of vertices in C that have a distance to M less than 4 mm, evaluates the percentage of vertices in C considered to be very close to M. 4 mm, or 20 pixels, was used because previous studies showed that using an uncertainty of contouring less than 4 mm results in an impact on the dose that covers 90% of the target volume of less than 2%, and an impact on tumour control probability of less than 10%, which was not a significant impact on the implant dosimetry (Tong et al. 1998, Lindsay et al. 2003). 
         [0000]    
       
         
           
             
               
                 
                   PC 
                   = 
                   
                     
                       
                         
                           
                             
                               number 
                                
                               
                                   
                               
                                
                               of 
                                
                               
                                   
                               
                                
                               elements 
                                
                               
                                   
                               
                                
                               in 
                             
                           
                         
                         
                           
                             
                               { 
                               
                                 
                                   c 
                                   i 
                                 
                                 ∈ 
                                 
                                   C 
                                    
                                   
                                     : 
                                   
                                    
                                   
                                       
                                   
                                    
                                   
                                     d 
                                     ( 
                                     
                                       
                                         
                                           c 
                                           i 
                                         
                                          
                                         
                                           : 
                                         
                                          
                                         
                                             
                                         
                                          
                                         
                                           d 
                                            
                                           
                                             ( 
                                             
                                               
                                                 c 
                                                 i 
                                               
                                               , 
                                               M 
                                             
                                             ) 
                                           
                                         
                                       
                                       ≤ 
                                       
                                         20 
                                          
                                         
                                             
                                         
                                          
                                         pixels 
                                       
                                     
                                     } 
                                   
                                 
                               
                             
                           
                         
                       
                       k 
                     
                     × 
                     100 
                      
                     % 
                   
                 
               
               
                 
                   ( 
                   19 
                   ) 
                 
               
             
           
         
       
     
         [0096]    In order to evaluate the performance of the semi-automatic version and the fully-automatic version of the proposed algorithm on all images, the average of MID, MAXD, PC, was calculated along with their standard deviation for the complete set of 51 images. For each image; two area-based metrics were used to compare the area enclosed by the algorithm-generated contour and the area enclosed by the manually generated contour (Ladak et al. 2003, Chiu et al. 2004, Nanayakkara et al. 2006). Let A C  and A M  be the area enclosed by the algorithm-generated contour and the manually-generated contour respectively, then we define the following: 
         [0097]    1) AO is the percent area overlap, which measures the proportional area correctly identified by the algorithm: 
         [0000]    
       
         
           
             
               
                 
                   AO 
                   = 
                   
                     
                       
                         
                           A 
                           C 
                         
                         ⋂ 
                         
                           A 
                           M 
                         
                       
                       
                         A 
                         M 
                       
                     
                     × 
                     100 
                      
                     % 
                   
                 
               
               
                 
                   ( 
                   20 
                   ) 
                 
               
             
           
         
       
     
         [0098]    2) AD is the area difference, which measures the proportional area falsely identified by the algorithm: 
         [0000]    
       
         
           
             
               
                 
                   AD 
                   = 
                   
                     
                       
                          
                         
                           
                             A 
                             C 
                           
                           - 
                           
                             A 
                             M 
                           
                         
                          
                       
                       
                         A 
                         M 
                       
                     
                     × 
                     100 
                      
                     % 
                   
                 
               
               
                 
                   ( 
                   21 
                   ) 
                 
               
             
           
         
       
     
         [0099]    In order to further evaluate the performance of the semi-automatic version and the fully-automatic version of the proposed algorithm on all images, the average of AO, AD was calculated along with their standard deviation for the complete set of 51 prostate images. 
         [0100]    The initialization point for the same entire set of the 51 images analysed was fixed in table 3 to be the centre of the image. Table 4 shows the results of all the metrics described in section 3.3. The prostate images are tabulated in the same order as in table 3. Table 4 shows that the fully-automatic version of our proposed algorithm produced prostate boundaries with an average error of 0.82±0.4 mm, and an average maximum distance of 2.66±1.92 mm; over 99% of points within 4 mm from the manually generated contour. The resulting boundaries show an area overlap, AO, of 91.2% and an error, AD, of 7.09%. 
         [0101]    The AO resulting from the semi-automatic version of our algorithm is 0.8% higher than AO produced by the fully-automatic version of our algorithm, and the AD resulting from the semi-automatic version of our algorithm is 1.4% higher than AD produced by the fully-automatic version of our algorithm. This demonstrates that the fully-automatic version of our proposed algorithm gave good results, very close to those obtained from the semi-automatic version. 
         [0102]    The average run time for the present algorithm was approximately 10 seconds on a personal computer with a Pentium 4, 2.6 GHz, when implemented in Matlab. The time would be significantly reduced if the algorithm were implemented in C++. 
         [0000]    The summary of the method described here is as follows:
 
A) A fully automated algorithm to select an object boundary.
 
B) A method for automatic object boundary segmentation using an image, comprising the steps of: acquiring a point at the approximate center in said image which is assumed to be the center of said object; filtering said image to identify said object edge candidates; length thresholding to remove false edges on said object boundary and keep as many true edges on said object boundary as possible; domain knowledge to remove any said object boundary candidates that are false edges and aid in identifying said object boundary; scanning of said image along radial lines keeping only first-detected said object boundary candidates; removal of remaining false edge pixels by fitting a polynomial to the said image points; generating an initial closed contour of said object&#39;s boundary using the Discrete Dynamic Contour (DDC) model.
 
C) The method of B), wherein said images are 2D TRUS, US, MRI and CT images of said object.
 
D) The method of B) and C), wherein no user selection of the said object center is needed since said object is typically centered at the approximate center of said ultrasound image.
 
E) The method of B) and C), wherein said filtering could be performed by and filtering system including but not limited to a Laplacian of Gaussian (LOG) filter and/or zero-crossing filtering.
 
F) The method of B) and C), wherein polynomial fitting removes the point with the maximum distance from the fit, and repeats the process until this maximum distance is less than 4 mm.
 
G) The method of A), wherein the use of pixels as initial points are used to generate an initial boundary which is deformed in a DDC model to obtain a closed contour of said object&#39;s boundary.
 
H) The method of A) and B), wherein said object is the prostate.
 
I) The method of H), wherein said domain knowledge includes; the inside of the prostate gland being typically darker than the outside, the inside of the prostate gland being typically smoother than the outside and an average prostate in patients undergoing a brachytherapy procedure being approximately 3 cm in width and 2.8 cm in height.
 
J) The method of claim H) and I), wherein since the average width and height of the prostate are known a circular or elliptical shape of the prostate in the 2D ultrasound image can be assumed, in which the boundary should be found between two distances that encompasses the mean size of the prostate.
 
K) A method for initializing a DDC model to obtain a closed contour of said object&#39;s boundary, comprising the steps of: acquiring a point at the center in said image which is assumed to be the approximate center of said object; filtering said image to identify said object edge candidates; length thresholding to remove false edges on said object boundary and keep as many true edges on said object boundary as possible; domain knowledge to remove any said object boundary candidates that are false edges and aid in identifying said object boundary; scanning of said image along radial lines keeping only first-detected said object boundary candidates; removal of remaining false edge pixels by fitting a polynomial to the said image points; generating an initial closed contour of said object&#39;s boundary using the Discrete Dynamic Contour (DDC) model.