读取 DICOM-RT 文件来创建 3D 二进制矩阵?
我目前正在使用 DICOM-RT 文件(其中包含 DICOM 以及剂量输送数据和结构集文件)。我主要对“结构集”文件(即 RTSS.dcm)感兴趣,其中包含感兴趣的 ROI 的轮廓点集。特别地,轮廓点围绕肿瘤体积。例如,肿瘤将具有一组 5 个轮廓,每个轮廓都是围绕肿瘤切片的一组点。
我正在尝试使用 MatLab 使用这些轮廓点在二进制 3D 矩阵中构建肿瘤体积(0 = 非肿瘤,1 = 肿瘤),并且需要帮助。
一种可能的方法是将每个轮廓集填充为二进制切片,然后在切片之间插入体积。到目前为止,我已经使用 fill 或 patch 函数来创建每个轮廓切片的二进制横截面,但我很难弄清楚如何插入这些二进制切片成 3D 体积。没有一个内置函数似乎适用于这个特定问题(尽管也许我只是错误地使用了它们?)。简单的线性插值似乎也不合适,因为一个轮廓的边缘应该在所有方向上融入相邻轮廓。
另一种选择是获取点并将它们细分(不先制作切片)。但是,我不知道如何使 MatLab 仅对肿瘤表面进行细分而不与肿瘤体积相交。目前似乎在肿瘤内发现了三角形。如果我可以将其放入一个表面,我也不知道如何将其转换为二进制 3D 矩阵体积。
有谁有可能适用于此的 3D 切片插值或曲面细分技术的经验吗?或者也许存在任何相关的工具包?我陷入困境...:(
我也对其他语言的方法持开放态度:我对 C# 和 Python 有点熟悉,尽管我认为 MatLab 会更容易地处理矩阵运算。
提前致谢!
I'm currently working with DICOM-RT files (which contain DICOM along with dose delivery data and structure set files). I'm mainly interested in the "structure set" file (i.e. RTSS.dcm), which contains the set of contour points for an ROI of interest. In particular, the contour points surround a tumor volume. For instance, a tumor would have a set of 5 contours, each contour being a set of points that encircle that slice of the tumor.
I'm trying to use MatLab to use these contour points to construct a tumor volume in a binary 3D matrix (0 = nontumor, 1=tumor), and need help.
One possible approach is to fill each contour set as a binary slice, then interpolate the volume between slices. So far I've used the fill or patch function to create binary cross-sections of each contour slice, but I'm having difficulty figuring out how to interpolate these binary slices into a 3D volume. None of the built-in functions appear to apply to this particular problem (although maybe I'm just using them wrong?). A simple linear interpolation doesn't seem appropriate either, since the edges of one contour should blend into the adjacent contour in all directions.
Another option would be to take the points and tesselate them (without making slices first). However, I don't know how to make MatLab only tesselate the surface of the tumor and not intersecting the tumor volume. Currently it seems to find triangles within the tumor. If I could get it into just a surface, I'm not sure how to take that and convert it into a binary 3D matrix volume either.
Does anyone have experience with either 3D slice interpolation OR tesselation techniques that might apply here? Or perhaps any relevant toolkits that exist? I'm stuck... :(
I'm open to approaches in other languages as well: I'm somewhat familiar with C# and Python, although I assumed MatLab would handle the matrix operations a little easier.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不确定您从哪个程序导出 dicom-rt 结构文件,但我相信我为您找到了一个更优雅的解决方案,已经在 Insight 期刊的开源软件(GDCM、CMake、ITK)中进行了描述文章。
我正在与我们的一位物理学家讨论类似的问题,我们看到了您的解决方案。如果您尝试二值化的任何结构没有凹面,那很好,但如果是这样,它们将被渲染不准确。
此方法已针对 Eclipse 和 Masterplan 中的 dicom-rt 结构集进行了验证。希望有帮助。
http://www.midasjournal.org/download/viewpdf/701/4
I'm not sure from what program you're exporting your dicom-rt structure files, but I believe I found a more elegant solution for you, already described in an open-source software (GDCM, CMake, ITK) in an Insight journal article.
I was discussing a similar problem with one of our physicists, and we saw your solution. It's fine if whatever structure you're attempting to binarize has no concavities, but if so, they'll be rendered inaccurately.
This method is verified for dicom-rt structure sets from Eclipse and Masterplan. Hope it helps.
http://www.midasjournal.org/download/viewpdf/701/4
我想我在另一篇文章中找到了答案(此处) 。与其尝试在定义的轮廓之间插入“缺失的切片”,不如将轮廓点视为点云并找到凸包可能是更有效的方法。这种方法创建了我想要的二进制 3D 体积。
这是我使用的代码,希望对那些需要使用 DICOM-RT 文件的人有所帮助:
此方法是 @gnovice 在上面的链接中发布的方法的稍作修改的版本。
I think I found an answer in another post (here). Rather than trying to interpolate the "missing slices" between the defined contours, treating the contour points as a point cloud and finding the convex hull might be a more efficient way of doing it. This method created the binary 3D volume that I was after.
Here is the code I used, hope it might be helpful to those who need to work with DICOM-RT files:
This method is a slightly modified version of the method posted by @gnovice in the link above.
iTk 是处理这类事情的优秀库:http://www.itk.org/
华泰
iTk is an excellent library for this sort of thing: http://www.itk.org/
HTH