InsightSoftwareConsortium / ITKThickness3D

An ITK module to compute 3D thickness
Apache License 2.0
39 stars 18 forks source link

Question regarding spurious branches in computed centerline #12

Closed jbi35 closed 5 years ago

jbi35 commented 5 years ago

Hi @T4mmi, I've been using your ITKThickness3D filter to compute the centerlines of airway segmentations. For the most part, it works like charm. However, I've noticed that the centerline computed with ITKThickness3D sometimes contain what I would refer to as "short spurious branches". I am not sure whether this is a bug in the implementation or an undesirable but sometimes to be expected behavior of the algorithm. As it's difficult to explain this, I've created a short example showing this phenomenon. Using the code below I create the skeleton of the airway segmentation:

import itk

airway_img_path = "airways.mhd"
centerline_path = "centerline_test.mhd"

airway_img = itk.imread(airway_img_path)

skeleton = itk.BinaryThinningImageFilter3D.New(airway_img)
pipeline_endpoint = skeleton

pipeline_endpoint.Update()

itk.imwrite(pipeline_endpoint, centerline_path)

I've upload the input file as well as the result I get here

If you open the centerline_test.mhd file, could you have a look at the two branches below the first bifurcation? In the middle of the left one of those two branches there is a small (2-points) branch sticking out to the side. Looking at the "airways.mhd" images I do not understand where these two points come from. Is this an expected behavior of the algorithm? Or am I overlooking something? BTW, I've observed similar results for other airway geometries as well.

T4mmi commented 5 years ago

Hi,

I'm out of the office this week, but I'll take a look at your data when I come back. By what I read, is there any bumps on the original volume surface that would create such spurious branches ? Theoretically a perfect sphere would be skeletonized as point but any bumps on its surface would create a branch in the medical axis transform..

jbi35 commented 5 years ago

Hi, thanks for the quick reply. I am assuming you are correct. The original volume is not perfectly regular and this is likely the reason for these stub branches. However, I read up on the topic and found out that it is fairly easy to remove these spurious stubs using the thickness information that also can be computed with this ITK package.