[Insight-users] LabelGeometryImageFilter - erroneous information for objects at image boundaries

Neal R. Harvey harve at lanl.gov
Wed May 12 17:53:05 EDT 2010


I have been getting some very strange results with the 
LabelGeometryImageFilter when it is calculating
the characteristics of objects that are located on the boundaries of 
images. It seems to work fine for objects
that are away from the boundary.

For example, in one of the images I am examining there are several small 
objects on the boundary. I can
write out the labeled image and examine it using software such as IDLand 
Matlab and can see where the
labeled objects are. However, the LabelGeometryImageFilter gives the 
centroids and bounding boxes of
the objects as lying somewhere out in the main part of the image.

Specifically, I have a 1000x1000 image, that has been thresholded 
(BinaryThresholdImageFilter) and then a
connected component analysis (ConnectedComponentImageFilter) performed 
on the thresholded result,
followed by a relabeling (RelabelComponentImageFilter)

In the resulting labeled image, there is a blob, of area 29 pixels, that 
has its centroid at approximately [998,494],
so the blob is butting right up against the edge.

The LabelGeometryImageFilter returns the following, with respect to its 
centroid position: [679.033, 415.933]
and its bounding box size [622, 158].

Now, if I look in that region of the image, there is nothing.

Anyone else had any problems like this? If so, how did you solve it? Am 
I going to have to embed all my images
in a slightly large image, to ensure that all of my labeled blobs are 
never at the edge?





More information about the Insight-users mailing list