# RegionBinarize distance parameter has no effect

I'm trying to segment an object from background in noisy micro CT data. The original 3D volume data looks like this:

theimg = Image3D[vol, "Real", ColorSpace -> "Grayscale",
ColorFunction -> "XRay", Background -> Black]


(where vol is a 3D matrix imported from a MATLAB file)

ImageDimensions[theimg]
{73, 72, 75}


I first erode away the noise to obtain a seed volume that is within the object of interest:

marker = Binarize[DeleteSmallComponents[Erosion[theimg, 8]]]


(I have also tried using the following for the seed region:)

marker = ImageMultiply[theimg, Binarize[DeleteSmallComponents[Erosion[theimg, 8]]]]


If I use the default MeanEuclidean method for RegionBinarize to try to segment the whole object from the background by region growing, the distance parameter seems to have no effect whatsoever on the result, regardless of whether or not I include the optional intensity interval parameter. This does not appear to match the description given in the documentation for RegionBinarize. Is this some kind of bug or have I misunderstood how this function is supposed to work? What am I doing wrong?

RegionBinarize[theimg, marker, 1*^-100, Method -> "MeanEuclidean"]


RegionBinarize[theimg, marker, 1*^100, Method -> "MeanEuclidean"]


RegionBinarize[theimg, marker, 1*^100, {0, 1000}, Method -> "MeanEuclidean"]


produces the same result, even though I know there are plenty of voxels adjacent to the seed volume with values in the range of 0 to 1000 HU.

When properly segmented, the object should look something like this (the best segmentation I have found thus far):

• In case it matters, I am using Mathematica version 10 – Matt Dec 18 '14 at 21:41

I believe I've figured out what the problem was. The MeanEuclidean method of RegionBinarize was unresponsive to changes in the distance parameter because it expects ImageData for the image and the marker to be in the range {0, 1}. The actual range for computed tomography data in HU is roughly {-1000, 3000}.
Expected results are obtained by scaling the ImageData range to {0, 1} with ImageAdjust as a preprocessing step:
RegionBinarize[ImageAdjust[theimg], marker, distance, Method->"MeanEuclidean"]