从 DICOM 文件逐个组织渲染 3D 模型,使用 VTK,使用 vtkContourFilter,如何设置正确的值?

Rendering 3D model from DICOM files, tissue by tissue, with VTK, using vtkContourFilter, how to set the right value?

我正在使用 VTK 从 DICOM 文件渲染 3D 模型。我希望能够按组织显示模型组织。我的意思是,例如,仅显示骨骼,或仅显示皮肤等...

我发现这个很有用 class vtkContourFilter。有了它,可以做类似的事情:

vtkContourFilter *filter = vtkContourFilter::New();
filter->SetValue(0, 650);

第二个值越高,它进入模型的深度就越深。这样,使用我的 dicom 文件样本,我只能显示值为 650 的骨骼。

如果我设置为-150,我可以看到皮肤。

所以如果我这样做:

filter->SetValue(0, 650);
filter->SetValue(1, -150);

我将有两个轮廓,有骨骼和皮肤。

问题是,我手动尝试了不同的值来知道在哪里停下来看骨头等......而且每个样本可能不同。有没有办法让它自动?可能是 dicom 文件中设置的东西?

我假设您询问的是来自 CT 扫描的 DICOM 数据。在这种情况下,体素值以亨斯菲尔德单位给出,遵循与设备无关的 scale (Wikipedia). However, as you can read on that page, the boundaries are not exact, and there is no additional information about the boundaries in the DICOM data. To determine exact thresholds, you will have to a segmentation of the data for which a lot of different algorithms exist, including determining optimal thresholds (e.g. Otsu).

要对此有一个感受,您可以尝试一些带有交互式分割工具的 DICOM 查看器,例如MITK Workbench, 3D Slicer, or ITK Snap.