Research Article

A Registration Method Based on Contour Point Cloud for 3D Whole-Body PET and CT Images

Algorithm 2

Dynamic threshold segmentation.
Input: The result image of median filter S and the id of the current slice.
Output: The result of threshold segmentation T, which is a binary image.
Steps:
() H = calcHist (S)       Calculating the gray histogram of S.
() peakLoc = getPeakLoc (H);   peakLoc is the gray value corresponding to the peak
() if id < 36 then threshold = peakLoc + 1
() else if id < 46
(5)  if peakLoc > 5 then threshold = peakLoc + 3
    else if peakLoc > 3 then threshold = peakLoc − 3
    else threshold = 0
    end if
(6) else threshold = peakLoc + 3
(7) end if
(8) T = doThreshold (S, threshold)