如何从动脉分割获取斑块并以图形形式存储?

发布于 2025-02-06 19:29:37 字数 482 浏览 1 评论 0原文

我有动脉的图像分割(X射线冠状动脉造影),并希望沿着分支提取斑块并以图形形式存储,以便保留冠状动脉树结构。

动脉分割图像和提取的中心线的一个示例:

例如,我希望结果看起来像这样:

“在此处输入图像描述”

我可以在其中获取节点的XY坐标,并且还具有连接边缘,该连接边缘将存储动脉的分支结构。然后,我将能够在每个节点处进行小2D图像贴片(节点将是中心点)。

I have image segmentations of arteries (Xray coronary angiography), and want to extract patches along the branches and store them in a graphical form so that it preserves the coronary tree structure.

An example of an artery segmentation image and the extracted centerline:

enter image description here

The centerline has been extracted using a skeletonisation algorithm, however, I am unsure how to extract points on the centerline and store them in a graph.

For example, I would want the result to look like this:

enter image description here

where I can get the x-y coordinates of the nodes, and also have the connecting edges, which will store the branch structure of the artery. Then, I will be able to take small 2D image patches at each node (the node will be the center point).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

○愚か者の日 2025-02-13 19:29:37

算法:

- Scan centerline image for location of nodes
   - Record x,y location of each dot, with a unique index number
- Scan centerlineimage for links between nodes
   - Record x,y locations of end points of each line, with a unique index number
- Loop over recorded lines
   - Record index number of closest dot to each line end point.
- Add dots connected by a line to adjacency matrix
- Store adjacency matrix in your favorite graph theory library.

棘手的部分是扫描。有两种方法:

  1. 使用GUI并通过鼠标光标在其上单击来定位节点和链接。这对于代码很简单,但是如果您有多个图像可以扫描。

  2. 图像处理。这对于代码非常复杂,但是可以自动化多个图像扫描。

我在C ++中编码了选项1。这是屏幕截图

用法:

扫描节点

  • 选择菜单项X射线。用户可以浏览文件文件夹,然后单击OM图像文件。图像将出现在左
  • 移动鼠标光标上。右键单击节点位置。单击弹出菜单中的“节点”。图像上将出现一个黄色点,右图和节点索引将显示在右侧。

扫描链接

  • 将光标移到节点上。左点击。单击弹出菜单中的“链接端点”,
  • 将光标移到第二个节点上。左点击。单击弹出菜单中的“链接端点”。节点之间的图像上将出现蓝线。链接的节点索引将

在此应用程序的代码上显示在 https://github.com/jamesbremner/artery/artery

fyi这是节点和链接存储类的公共类界面

/// store of node locations and the links between them
class cArteries
{
public:
    /// add node location on x-ray image
    void addNode(const std::pair<int, int> &p);

    /// add link end location on x-ray image
    void addLinkEnd(const std::pair<int, int> &p);

    /// draw nodes and links on x-ray image
    void draw(wex::shapes &S);

    /// text describing each node
    std::vector<std::string> textNodes();

    /// text describing nodes connected by each link
    std::vector<std::string> textLinks();

    /// get adjacency matrix
    std::vector<std::vector<bool>> adjacencyMatrix();

private:
...
};

The algorithm:

- Scan centerline image for location of nodes
   - Record x,y location of each dot, with a unique index number
- Scan centerlineimage for links between nodes
   - Record x,y locations of end points of each line, with a unique index number
- Loop over recorded lines
   - Record index number of closest dot to each line end point.
- Add dots connected by a line to adjacency matrix
- Store adjacency matrix in your favorite graph theory library.

The tricky part is scanning. There are two ways:

  1. Use a GUI and locate nodes and links by clicking when the mouse cursor is on them. This is straightforward to code, but tedious if you have more than a few images to scan.

  2. Image processing. This is very complex to code, but multiple image scanning can be automated.

I have coded option 1 in C++. Here is a screenshot

enter image description here

Usage:

Scanning nodes

  • Select menu item X-ray. User can browse through file folders and click om image file. Image will appear on left
  • Move mouse cursor over image. Right click on node position. Click on 'Node' in popup menu. A yellow dot will appear on image and the co-ords and node index will be displayed on right.

Scanning links

  • Move cursor over a node. Left click. Click on 'link endpoint' in popup menu
  • Move cursor over a second node. Left click. Click on 'link endpoint' in popup menu. A blue line will appear on image between nodes. The linked node indexes will display on right

The code for this application is at https://github.com/JamesBremner/artery

FYI here is the public class interface for the nodes and link storage class

/// store of node locations and the links between them
class cArteries
{
public:
    /// add node location on x-ray image
    void addNode(const std::pair<int, int> &p);

    /// add link end location on x-ray image
    void addLinkEnd(const std::pair<int, int> &p);

    /// draw nodes and links on x-ray image
    void draw(wex::shapes &S);

    /// text describing each node
    std::vector<std::string> textNodes();

    /// text describing nodes connected by each link
    std::vector<std::string> textLinks();

    /// get adjacency matrix
    std::vector<std::vector<bool>> adjacencyMatrix();

private:
...
};
你穿错了嫁妆 2025-02-13 19:29:37

filfinder 似乎可以处理此工作,特别是在其骨架和修剪部分。 (请参阅下面的链接中,它们具有细丝/分割的图形节点表示形式。)软件包通过将其首先转换为图形形式来分析细丝,您可以返回。此过程与某些输入参数自动化 - 如果您遵循其教程,您将能够调整自己更喜欢节点的严格性。

一旦获取了filfinder产生的节点列表,就可以使用节点的坐标来获取大小偏好的边界框来创建图像补丁。

这是一个没有代码的答案,但我希望这是实现您的请求的粗略指南。

FilFinder seems like it can handle this job, specifically in its skeleton and pruning section. (See in the link below where they have a graphical node representation of the filaments/segmentation.) The package analyzes filaments by turning them first into graphical form, which you can return. This process is automated with some entry parameters - if you follow their tutorial you'll be able to tune how stringent you'd prefer your nodes to be.

Once you obtain a list of nodes that FilFinder produces, you can use a node's coordinates to obtain a bounding box of your size preference to create image patches.

This is a no code answer, but I hope this serves as a rough guideline towards achieving your request.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文