[go: up one dir, main page]

CN109064472B - Fitting method and device for fitting plane of three-dimensional space model of vertebra - Google Patents

Fitting method and device for fitting plane of three-dimensional space model of vertebra Download PDF

Info

Publication number
CN109064472B
CN109064472B CN201810788858.7A CN201810788858A CN109064472B CN 109064472 B CN109064472 B CN 109064472B CN 201810788858 A CN201810788858 A CN 201810788858A CN 109064472 B CN109064472 B CN 109064472B
Authority
CN
China
Prior art keywords
fitting
bounding box
module
triangular
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810788858.7A
Other languages
Chinese (zh)
Other versions
CN109064472A (en
Inventor
檀结庆
霍星
荆珏华
田大胜
程里
邵堃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei University of Technology
Original Assignee
Hefei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei University of Technology filed Critical Hefei University of Technology
Priority to CN201810788858.7A priority Critical patent/CN109064472B/en
Publication of CN109064472A publication Critical patent/CN109064472A/en
Application granted granted Critical
Publication of CN109064472B publication Critical patent/CN109064472B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/50ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for simulation or modelling of medical disorders
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing
    • G06T2207/30008Bone
    • G06T2207/30012Spine; Backbone
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/41Medical
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2219/00Indexing scheme for manipulating 3D models or images for computer graphics
    • G06T2219/20Indexing scheme for editing of 3D models
    • G06T2219/2016Rotation, translation, scaling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Public Health (AREA)
  • Medical Informatics (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Graphics (AREA)
  • Biomedical Technology (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Pathology (AREA)
  • General Engineering & Computer Science (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Architecture (AREA)
  • Image Analysis (AREA)
  • Apparatus For Radiation Diagnosis (AREA)
  • Magnetic Resonance Imaging Apparatus (AREA)

Abstract

本发明涉及一种脊椎骨的三维空间模型拟合平面的拟合方法及装置,其特征在于,拟合装置至少包括识别模块和拟合模块,其中,识别模块以脊柱三维空间模型上的三角片为种子点进行生长并利用广度优先遍历法进行有最大迭代次数的相邻平面生长以获得三角片集合,拟合模块基于识别模块识别出的三角片的法向量和顶点参数采用矩阵乘法以及计算矩阵奇异值的方法计算两个相对拟合平面的方程式以获得两个相对的拟合面。本发明的脊椎矫正装置作为从整体中截取局部模型的装置,具有通用性,而且可实现自动地获得包围盒的空间位置和大小来适应不同形态的脊椎骨。相对于现有技术,本发明具有操作简单、自动性高、准确度高的优势。

Figure 201810788858

The invention relates to a fitting method and device for fitting a three-dimensional space model of a vertebral bone, and is characterized in that the fitting device at least includes an identification module and a fitting module, wherein the identification module takes the triangular piece on the three-dimensional space model of the spine as the The seed points are grown and the adjacent planes with the maximum number of iterations are grown by the breadth-first traversal method to obtain a triangular patch set. The fitting module uses matrix multiplication and calculation matrix singularity based on the normal vector and vertex parameters of the triangular patch identified by the recognition module. The value method computes the equation of two opposing fit planes to obtain two opposing fit surfaces. The spinal correction device of the present invention has universality as a device for intercepting a local model from the whole, and can automatically obtain the spatial position and size of the bounding box to adapt to the vertebrae of different shapes. Compared with the prior art, the present invention has the advantages of simple operation, high automation and high accuracy.

Figure 201810788858

Description

一种脊椎骨的三维空间模型拟合平面的拟合方法及装置Fitting method and device for fitting plane of three-dimensional space model of vertebra

本发明是申请号为201710195660.3,申请日为2017年03月28日,申请类型为发明,申请名称为一种脊椎矫正装置的分案申请。The present invention is a divisional application whose application number is 201710195660.3, the application date is March 28, 2017, the application type is invention, and the application name is a spinal correction device.

技术领域technical field

本发明涉及医学图像技术领域,尤其涉及一种脊椎骨的三维空间模型拟合平面的拟合方法及装置。The invention relates to the technical field of medical images, in particular to a method and device for fitting a three-dimensional space model of a vertebrae to a plane.

背景技术Background technique

脊椎矫正技术是专用于复位偏位、半脱位的脊椎,调整脊椎关节的一门技术,类似于中医的扳法和正骨术。脊椎矫正技术具有系统的理论指导,特有的发力技巧,是一项科学、高效的治疗技术。脊椎矫正技术已经被纳入治疗顽固性疾病的重要辅助治疗手段,并且收到了非常好的疗效,脊椎矫正技术对糖尿病、类风湿、心脑血管疾病等均有重要辅助治疗作用。现如今的脊柱侧弯矫正技术运用的方法多数是弯棒固定矫正。手术之前,由医生根据病人的脊柱CT图(包括侧位图和断层扫描图)结合自己的经验来计算预测手术之中要用的弯棒形状,以达到利用弯棒矫正脊柱的目的。The chiropractic technique is a technique dedicated to repositioning the deviated and subluxated spine and adjusting the vertebral joints, similar to the pulling method and bone setting of traditional Chinese medicine. Chiropractic technology has systematic theoretical guidance and unique force-generating skills, and is a scientific and efficient treatment technology. Chiropractic technology has been incorporated into an important adjuvant treatment for intractable diseases, and has received very good results. Chiropractic technology has an important adjuvant treatment effect on diabetes, rheumatoid, cardiovascular and cerebrovascular diseases, etc. Most of today's scoliosis correction techniques use curved rod fixation correction. Before the operation, the doctor calculates and predicts the shape of the curved rod to be used in the operation according to the patient's spine CT image (including lateral view and tomographic scan) combined with his own experience, so as to achieve the purpose of using the curved rod to correct the spine.

在生成弯棒过程中,医生只能利用二维的CT图,计算一些脊柱参数(如cobb角,腰底角)和通过CT图的三视图来确定脊椎的空间相对位置和脊柱整体形态,根据这些状态和医生自身的经验来预期矫正后脊柱的形态。可见,传统脊椎矫正技术需要经验丰富的临床医生才能很好的做出预测,但仅依靠临床医生的经验,缺乏科学系统的方法,容易存在预测失误,造成手术过程中还要对已经制作好的弯棒加以修改,这样就不可避免地会增加手术时间,增加病人的出血量,增大手术风险。因此,提供一种专门针对脊椎矫正技术的装置来辅助医生出色地完成矫正手术成为亟待解决的技术问题。In the process of generating the curved rod, the doctor can only use the two-dimensional CT image to calculate some spine parameters (such as the cobb angle, lumbar base angle) and determine the spatial relative position of the spine and the overall shape of the spine through the three views of the CT image. These states and the doctor's own experience predict the shape of the spine after correction. It can be seen that traditional chiropractic techniques require experienced clinicians to make good predictions, but relying only on the experience of clinicians and lack of scientific and systematic methods are prone to prediction errors, resulting in The curved rod is modified, which will inevitably increase the operation time, increase the patient's blood loss, and increase the operation risk. Therefore, it has become an urgent technical problem to provide a device specially designed for chiropractic technology to assist doctors to perform corrective surgery well.

为此,中国专利(公开号为CN102968791A)公开了一种三维医学图像图形显示的交互方法及其系统。该专利的交互方法包括如下步骤:A、在三维医学图像/图形显示的场景中,通过控制包围盒选择交互处理的范围;B、将所述包围盒圈定的范围运用到所述三维医学图像/图形显示的处理中,获得对应的局部显示结果;C、将所述局部显示结果输出到分割算法,执行相应的分割处理。该专利的交互系统包括:选择模块,用于在三维医学图像/图形显示的场景中,通过控制包围盒选择交互处理的范围;包围盒处理模块,用于将所述包围盒圈定的范围运用到所述三维医学图像/图形显示的处理中,获得对应的局部显示结果;执行模块,用于将所述局部显示结果输出到分割算法,执行相应的分割处理。To this end, a Chinese patent (publication number CN102968791A) discloses an interactive method and system for displaying three-dimensional medical image graphics. The interactive method of the patent includes the following steps: A. In the scene of the 3D medical image/graphic display, the range of interactive processing is selected by controlling the bounding box; B. The range delimited by the bounding box is applied to the 3D medical image/ In the processing of the graphic display, the corresponding partial display result is obtained; C. The partial display result is output to the segmentation algorithm, and the corresponding segmentation processing is performed. The interactive system of this patent includes: a selection module for selecting a range of interactive processing by controlling a bounding box in a scene of 3D medical image/graphic display; a bounding box processing module for applying the range bounded by the bounding box to In the processing of the three-dimensional medical image/graphic display, the corresponding partial display result is obtained; the execution module is used for outputting the partial display result to the segmentation algorithm, and executes the corresponding segmentation processing.

该专利提供的方法和系统可以实现在显示方式下的感兴趣区域/感兴趣空间的局部显示,从而有利于医生的观察诊断,但是该专利提供的交互方法和交互系统在选择交互处理范围时需要花费大量时间,而且难以快速精确地选取需要进行交互处理的对象。因此,急需提供一种能够准确自动地获得包围盒空间位置和大小的装置。The method and system provided by this patent can realize the partial display of the region of interest/space of interest in the display mode, which is beneficial to the doctor's observation and diagnosis, but the interaction method and interaction system provided by this patent need to be It takes a lot of time, and it is difficult to quickly and accurately select objects that need to be interacted with. Therefore, there is an urgent need to provide a device that can accurately and automatically obtain the spatial position and size of a bounding box.

在本发明母案的审查过程中,第一次审查意见通知书仅指出形式性问题,未检索到最接近的现有技术。因此,本发明具有突出的实质性特点和显著的进步。During the examination process of the parent case of the present invention, the first Office Action only pointed out the formal problems, and the closest prior art was not retrieved. Accordingly, the present invention has outstanding substantive features and significant advancements.

发明内容SUMMARY OF THE INVENTION

针对现有技术在脊椎骨进行局部分割时,完全手动地调整包围盒来适应不同形态的脊椎骨,费时费力,难以快速精确地获得包围盒空间位置和大小的问题,本发明提供了一种能够实现自动获得包围盒空间位置和大小的脊椎矫正装置,尤其是一种对医学脊柱三维空间模型进行局部分割以获得单块脊椎骨的装置。本发明提供的脊椎矫正装置采用的方法主要基于VisualToolkit工具中生成的三维脊柱模型,在空间区域中生成一个空间包围盒,将包围盒的六个面设置成切面,将待分割的脊椎骨存储于包围盒内部。本发明的包围盒还可以自由地移动位置和调整大小和角度,这样就实现了截取不同形态特征的单块脊椎骨。进一步地,为了使包围盒定位更加准确快捷,本发明提供了一种先对三维脊柱模型上将要截取的脊椎骨的上下平面进行平面识别来获得上下平面的法向量和空间位置等参数,然后利用这些参数,进行切合实际的运算过程,最后可以自动生成较为理想的空间包围盒,用户只需要微调便可以从整体脊柱模型上面截取出来理想的单块脊椎骨。进一步地,为了使截取过程更加方便快捷,在包围盒处理模块采用了左右两部分对照截取,左半部分放置整体三维脊柱模型与包围盒,右半部分放置包围盒截取的部分模型与包围盒,两边的包围盒完全同步,如此便可使截取过程更加方便。Aiming at the problems in the prior art that when the vertebra is partially segmented, the bounding box is manually adjusted to adapt to different shapes of vertebrae, which is time-consuming and labor-intensive, and it is difficult to quickly and accurately obtain the spatial position and size of the bounding box. A spinal correction device for obtaining the spatial position and size of a bounding box, especially a device for partially segmenting a three-dimensional space model of a medical spine to obtain a single vertebra. The method adopted by the spine correction device provided by the present invention is mainly based on the three-dimensional spine model generated in the Visual Toolkit tool. A space bounding box is generated in the space area, the six faces of the bounding box are set as cut planes, and the vertebrae to be divided are stored in the bounding box. inside the box. The bounding box of the present invention can also freely move the position and adjust the size and angle, thus realizing the interception of a single vertebra with different morphological features. Further, in order to make the positioning of the bounding box more accurate and fast, the present invention provides a method of firstly performing plane recognition on the upper and lower planes of the vertebrae to be intercepted on the three-dimensional spine model to obtain parameters such as normal vectors and spatial positions of the upper and lower planes, and then using these parameters. parameters, carry out a realistic calculation process, and finally can automatically generate a more ideal space bounding box, the user only needs to fine-tune to cut out an ideal single vertebra from the overall spine model. Further, in order to make the interception process more convenient and fast, the bounding box processing module adopts the left and right two parts for contrast interception, the left half is placed with the overall 3D spine model and the bounding box, and the right half is placed with the partial model and bounding box intercepted by the bounding box. The bounding boxes on both sides are fully synchronized, which makes the capture process more convenient.

根据一个优选实施方式,脊椎矫正装置截取单块脊椎骨的方法包括如下过程:采取以脊柱三维空间模型的表面模型法向量为基础的平面生长及平面拟合,以确定包围盒的上下平面的形态;将上下两个拟合平面沿各自的法向量平移一定距离,使之包含整个欲截取的脊椎骨;根据两个拟合平面的中心点的连线来确定包围盒的中心,根据两个拟合平面的与竖直方向夹角较小的法向量来确定包围盒的上下平面的法向量,从而确定包围盒的形状和大小。采用左右两部分对照截取,以及包围盒完全交互式操作,让截取过程更加方便直观;在截取局部区域后,立即对局部模型进行去噪处理,保存模型在空间上的最大连通域,消除小块的杂质。According to a preferred embodiment, the method for cutting a single vertebra by a chiropractic device includes the following process: adopting plane growth and plane fitting based on the normal vector of the surface model of the three-dimensional space model of the spine to determine the shape of the upper and lower planes of the bounding box; Translate the upper and lower fitting planes by a certain distance along their respective normal vectors to include the entire vertebra to be cut; determine the center of the bounding box according to the line connecting the center points of the two fitting planes. The normal vector with the smaller angle with the vertical direction determines the normal vector of the upper and lower planes of the bounding box, thereby determining the shape and size of the bounding box. The left and right parts are compared for interception, and the bounding box is completely interactive, which makes the interception process more convenient and intuitive; after the local area is intercepted, the local model is immediately denoised, the maximum connected domain of the model in space is saved, and small blocks are eliminated. of impurities.

根据一个优选实施方式,一种脊椎骨的三维空间模型拟合平面的拟合装置,至少包括识别模块和拟合模块。其中,所述识别模块以所述脊柱三维空间模型上的三角片为种子点进行生长并利用广度优先遍历法进行有最大迭代次数的相邻平面生长以获得三角片集合,所述拟合模块基于所述识别模块识别出的三角片的法向量和顶点参数采用矩阵乘法以及计算矩阵奇异值的方法计算两个相对拟合平面的方程式以获得两个相对的拟合面。According to a preferred embodiment, a fitting device for fitting a three-dimensional space model of a vertebra to a plane includes at least an identification module and a fitting module. Wherein, the identification module uses the triangular patch on the three-dimensional space model of the spine as a seed point to grow, and uses the breadth-first traversal method to grow adjacent planes with the maximum number of iterations to obtain a triangular patch set, and the fitting module is based on The normal vector and vertex parameters of the triangular pieces identified by the identification module are calculated by the method of matrix multiplication and calculation of matrix singular values to calculate the equations of two relative fitting planes to obtain two opposite fitting planes.

根据一个优选实施方式,所述脊椎矫正装置至少包括识别模块、拟合模块、包围盒处理模块和矫正模块。所述识别模块以所述脊柱三维空间模型上的三角片为种子点进行生长并利用广度优先遍历法进行有最大迭代次数的相邻平面生长以获得三角片集合。所述拟合模块基于所述识别模块识别出的三角片集合中所有三角片的法向量和顶点参数采用矩阵乘法以及计算矩阵奇异值的方法计算拟合平面方程式。所述包围盒处理模块基于所述拟合模块拟合出的两个相对拟合平面的中心点和法向量来确定包围盒的中心、两个相对面的距离和两个相对面的法向量并基于所确定的包围盒的中心、两个相对面的距离和两个相对面的法向量来确定所述包围盒的空间位置和大小。所述矫正模块基于所述包围盒处理模块所确定的包围盒截取的脊椎骨参数来产生弯棒的弯曲参数以通过所述弯棒实现脊椎矫正。According to a preferred embodiment, the spinal correction device at least includes an identification module, a fitting module, a bounding box processing module and a correction module. The identification module uses the triangular patch on the three-dimensional space model of the spine as a seed point to grow, and uses the breadth-first traversal method to grow the adjacent plane with the maximum number of iterations to obtain a triangular patch set. The fitting module calculates the fitting plane equation by using the method of matrix multiplication and calculating the singular value of the matrix based on the normal vectors and vertex parameters of all the triangular pieces in the triangular piece set identified by the identification module. The bounding box processing module determines the center of the bounding box, the distance between the two opposite faces, and the normal vector of the two opposite faces based on the center points and normal vectors of the two opposite fitting planes fitted by the fitting module. The spatial position and size of the bounding box are determined based on the determined center of the bounding box, the distance between the two opposite faces, and the normal vectors of the two opposite faces. The correction module generates a bending parameter of the curved rod based on the vertebral bone parameters intercepted by the bounding box determined by the bounding box processing module, so as to realize spine correction through the curved rod.

根据一个优选实施方式,所述脊椎矫正装置产生弯棒的弯曲参数,使得医生能够定制是和患者脊椎病状所需矫正的弯棒。优选地,矫正模块基于所述包围盒处理模块所确定的包围盒截取的脊椎骨参数来产生弯棒的弯曲方案。更优选地,所述矫正装置基于所述包围盒处理模块所确定的包围盒截取的脊椎骨参数来获取弯棒螺杆位置和方向并使用一种或多种基于几何形状的算法将螺杆位置和方向转换成一系列的弯曲指令。优选地,所述弯棒的弯曲算法为获取并且数字化空间中的点,分析所述点并且计算用机械弯曲装置使弯棒弯曲所需的弯曲指令和所述弯棒长度。本发明可以应用于医学中对脊柱侧弯手术的空间模型参考和弯棒的预先生成,提高弯棒制作精度,减少手术中病人的出血量,降低医生的劳动强度,减少手术时间和降低手术风险,在临床应用上具有重要意义。According to a preferred embodiment, the vertebral correction device generates the bending parameters of the curved rod, so that the doctor can customize the curved rod to be corrected according to the patient's spinal pathology. Preferably, the correction module generates the bending scheme of the curved rod based on the vertebral bone parameters intercepted by the bounding box determined by the bounding box processing module. More preferably, the orthodontic device obtains the position and orientation of the curved rod screw based on the vertebral parameters intercepted by the bounding box determined by the bounding box processing module, and converts the screw position and orientation using one or more geometry-based algorithms. into a series of bending instructions. Preferably, the bending algorithm for the bent rod is to acquire and digitize points in space, analyze the points and calculate the bending instructions and the length of the bent rod required to bend the bent rod with a mechanical bending device. The invention can be applied to the spatial model reference of scoliosis surgery and the pre-generation of curved rods in medicine, so as to improve the manufacturing accuracy of the curved rods, reduce the blood volume of patients during the operation, reduce the labor intensity of doctors, reduce the operation time and reduce the operation risk. , which is of great significance in clinical application.

根据一个优选实施方式,所述识别模块至少包括选取单元、标记数组建立单元、第一存储单元和生长单元。所述选取单元用于从所述脊柱三维空间模型表面上选取一个三角片的ID。所述标记数组建立单元用于在所述选取单元选取三角片后建立标记数组,所述标记数组用以标记三角片的使用情况且所述标记数组的大小为要截取的脊柱三维空间模型表面的三角片总数。所述第一存储单元用于存储所述脊柱三维空间模型的数据、待比较三角片的ID链表和/或所述识别模块识别出的三角片ID链表。所述生长单元以所述选取单元选取的三角片法向量为基准并利用广度优先遍历法进行有最大迭代次数的相邻平面生长以获得所述三角片集合。According to a preferred embodiment, the identification module includes at least a selection unit, a label array establishment unit, a first storage unit and a growth unit. The selecting unit is used for selecting an ID of a triangular slice from the surface of the three-dimensional space model of the spine. The marker array establishment unit is used to create a marker array after the selection unit selects the triangular slice, and the marker array is used to mark the usage of the triangular slice and the size of the marker array is the size of the surface of the spine three-dimensional space model to be intercepted. Total number of triangles. The first storage unit is used for storing the data of the three-dimensional space model of the spine, the ID linked list of the triangular slices to be compared, and/or the triangular slice ID linked list identified by the identification module. The growing unit uses the triangular patch normal vector selected by the selecting unit as a reference and uses a breadth-first traversal method to grow adjacent planes with a maximum number of iterations to obtain the triangular patch set.

根据一个优选实施方式,所述生长单元通过如下方式获得所述三角片集合:所述生长单元从所述选取单元选取的三角片开始,依次标记并判断待选择三角片的使用情况,在所述待选择三角片已经使用之时,所述生长单元放弃所述待选择三角片与种子点三角片的比较;在所述待选择三角片未使用之时,所述生长单元计算所述待选择三角片法向量与种子点三角片法向量的各分量差值的绝对值之和。According to a preferred embodiment, the growing unit obtains the triangular piece set in the following manner: the growing unit starts from the triangular piece selected by the selection unit, and sequentially marks and judges the usage of the triangular piece to be selected. When the triangle to be selected has been used, the growing unit discards the comparison between the triangle to be selected and the seed point triangle; when the triangle to be selected is not used, the growth unit calculates the triangle to be selected. The sum of the absolute values of the component differences between the patch normal vector and the triangular patch normal vector of the seed point.

根据一个优选实施方式,所述生长单元计算出所述待选择三角片法向量与所述种子点三角片法向量的各分量差值的绝对值之和不大于0.5时,所述生长单元将所述待选择三角片ID的链表发送至第一存储单元进行存储。所述生长单元计算出所述待选择三角片法向量与所述种子点三角片法向量的各分量差值的绝对值之和大于0.5时,所述生长单元访问下一个待选择的三角片。相对于现有技术判断两向量的夹角来生成新的平面,本发明通过判断两向量各分量差值的绝对值之和具有简单、效率高、更省时的优势。According to a preferred embodiment, when the growing unit calculates that the sum of the absolute values of the differences of the components of the normal vector of the triangle to be selected and the normal vector of the triangle of the seed point is not greater than 0.5, the growing unit will The linked list of the IDs of the triangle pieces to be selected is sent to the first storage unit for storage. When the growing unit calculates that the sum of the absolute values of the differences between the normal vector of the triangular patch to be selected and the normal vector of the triangular patch of the seed point is greater than 0.5, the growing unit accesses the next triangular patch to be selected. Compared with the prior art judging the angle between the two vectors to generate a new plane, the present invention has the advantages of simplicity, high efficiency and time saving by judging the sum of the absolute values of the differences of the components of the two vectors.

根据一个优选实施方式,所述生长单元以存储至所述第一存储单元中的三角片作为待比较对象,将待选择三角片的法向量与所述待比较对象三角片法向量的各分量差值的绝对值之和不大于0.5的所述待选择三角片ID的链表发送至所述第一存储单元进行存储并作为下一次循环中的待比较对象,如此循环直至遍历完所有三角片,并且在循环结束之后,所述生长单元调取存储于所述第一存储单元中的三角片ID的链表并将对应的三角片以不同于未选中三角片的颜色进行着色以生成一个近似平面的超平面。According to a preferred embodiment, the growing unit takes the triangular patch stored in the first storage unit as the object to be compared, and uses the difference between the normal vector of the triangular patch to be selected and each component of the normal vector of the triangular patch to be compared. The linked list of the to-be-selected triangle slice IDs whose absolute value sum is not greater than 0.5 is sent to the first storage unit for storage and used as the object to be compared in the next cycle, and this cycle is repeated until all triangle slices are traversed, and After the loop is over, the growing unit retrieves the linked list of triangle IDs stored in the first storage unit and colors the corresponding triangles with a color different from that of the unselected triangles to generate an approximately planar hyper flat.

根据一个优选实施方式,所述拟合模块至少包括第一计算单元、第二存储单元、第二计算单元、第三计算单元和验证单元。其中,所述第一计算单元对所述识别模块识别出的所述三角片集合中所有三角片的法向量进行平均化处理以获得所述三角片的平均法向量并将所述平均法向量存储至所述第二存储单元。所述第二存储单元用于存储所述平均法向量以及所述识别模块识别出的所述三角片集合中所有三角片的顶点参数。所述第二计算单元基于存储于所述第二存储单元中的顶点参数分别计算所述三角片顶点在X、Y、Z轴的平均值。所述第三计算单元基于所述第一计算单元计算的平均法向量和所述第二计算单元计算的所述三角片顶点在X、Y、Z轴的平均值采用矩阵乘法以及计算矩阵奇异值的方法计算拟合平面方程式。所述验证单元基于所述拟合平面方程式计算所述拟合平面的法向量并将其与所述第一计算单元计算的平均法向量进行比较,在二者偏差达到设定阈值时重新计算所述拟合平面方程式。优选地,所述拟合模块基于所述识别模块识别出的三角片集合中所有三角片的法向量和顶点参数采用矩阵乘法以及计算矩阵奇异值的方法计算欲截取的单块脊椎骨的上下两个平面的拟合平面方程式。According to a preferred embodiment, the fitting module includes at least a first calculation unit, a second storage unit, a second calculation unit, a third calculation unit and a verification unit. Wherein, the first computing unit averages the normal vectors of all the triangular patches in the triangular patch set identified by the identification module to obtain the average normal vector of the triangular patches and stores the average normal vector to the second storage unit. The second storage unit is configured to store the average normal vector and vertex parameters of all the triangular patches in the triangular patch set identified by the identification module. The second calculating unit calculates the average values of the triangle vertices in the X, Y and Z axes respectively based on the vertex parameters stored in the second storage unit. The third calculation unit adopts matrix multiplication and calculates matrix singular values based on the average normal vector calculated by the first calculation unit and the average value of the triangular patch vertices in the X, Y, and Z axes calculated by the second calculation unit method to calculate the fitted plane equation. The verification unit calculates the normal vector of the fitted plane based on the fitted plane equation and compares it with the average normal vector calculated by the first calculation unit, and recalculates the normal vector when the difference between the two reaches a set threshold. Describe the fitted plane equation. Preferably, the fitting module uses matrix multiplication and the method of calculating the singular value of the matrix to calculate the upper and lower two vertebrae of the single vertebra to be intercepted based on the normal vectors and vertex parameters of all the triangular pieces in the triangular piece set identified by the recognition module. The fitted plane equation for the plane.

本发明第一计算单元和第二计算单元计算出的平均法向量以及顶点平均值作为参考向量以及计算拟和平面中心的基准值,而不直接用于拟合平面,从而减小拟合平面与理想平面的偏差,使拟合出的平面更精确。The average normal vector and the vertex average value calculated by the first calculation unit and the second calculation unit of the present invention are used as the reference vector and the reference value for calculating the center of the fitting plane, and are not directly used for the fitting plane, thereby reducing the difference between the fitting plane and the fitting plane. The deviation of the ideal plane makes the fitted plane more accurate.

根据一个优选实施方式,所述包围盒处理模块根据所述拟合模块拟合出的两个相对面的的中心点连线来确定所述包围盒的中心并将中心线的长度作为所述包围盒两个相对面的距离、根据所述两个相对面的法向量与竖直方向夹角较小者来确定所述包围盒两个相对面的法向量,并且所述包围盒处理模块基于所述包围盒的中心、所述包围盒两个相对面的距离和所述包围盒两个相对面的法向量来确定所述包围盒的空间位置和大小。According to a preferred embodiment, the bounding box processing module determines the center of the bounding box according to the line connecting the center points of the two opposite surfaces fitted by the fitting module, and uses the length of the center line as the bounding box. The distance between the two opposite faces of the box, the normal vector of the two opposite faces of the bounding box is determined according to the smaller angle between the normal vector of the two opposite faces and the vertical direction, and the bounding box processing module is based on the The center of the bounding box, the distance between the two opposite faces of the bounding box, and the normal vector of the two opposite faces of the bounding box are used to determine the spatial position and size of the bounding box.

根据一个优选实施方式,所述包围盒处理模块至少包括包围盒确定单元、调整单元和后处理单元。其中,所述包围盒确定单元基于所述拟合模块拟合出的两个相对面的的中心点与法向量参数来确定所述包围盒的空间位置。所述调整单元对所述包围盒确定单元确定的所述包围盒的空间位置进行旋转以使所述包围盒能够与所述脊椎三维空间模型表面贴合。所述后处理单元在基于所述调整单元旋转后的包围盒截取脊椎骨后,对所述包围盒内截取的局部模型进行去噪处理以保存所述局部模型在空间上的最大连通域。According to a preferred embodiment, the bounding box processing module includes at least a bounding box determination unit, an adjustment unit and a post-processing unit. Wherein, the bounding box determining unit determines the spatial position of the bounding box based on the center point and normal vector parameters of the two opposite surfaces fitted by the fitting module. The adjusting unit rotates the spatial position of the bounding box determined by the bounding box determining unit so that the bounding box can fit the surface of the three-dimensional space model of the spine. After the post-processing unit intercepts the vertebrae based on the bounding box rotated by the adjustment unit, the local model intercepted in the bounding box is denoised to save the maximum connected domain of the local model in space.

根据一个优选实施方式,所述包围盒确定单元通过如下方式确定所述包围盒的空间位置:所述包围盒确定单元基于计算所述拟合模块拟合出的两个相对面的的中心点的平均值以获得所述包围盒中心,所述包围盒确定单元将所述包围盒在X、Y轴方向分别根据所述中心左右延伸预设阈值,将所述包围盒在Z轴方向分别根据所述中心上下延伸预设阈值以确定所述包围盒的空间位置。According to a preferred embodiment, the bounding box determining unit determines the spatial position of the bounding box in the following manner: the bounding box determining unit is based on calculating the difference between the center points of the two opposite surfaces fitted by the fitting module. The average value is obtained to obtain the center of the bounding box, and the bounding box determination unit extends the bounding box in the X and Y axis directions according to the left and right preset thresholds of the center, respectively, and the bounding box in the Z axis direction according to the predetermined threshold. The center extends up and down by a preset threshold to determine the spatial position of the bounding box.

根据一个优选实施方式,所述调整单元通过如下方式调整所述包围盒的空间位置:所述调整单元计算与Z轴夹角最小的空间向量并确定所述空间向量与Z轴的夹角的角度值,所述调整单元计算所述空间向量与Z轴的公垂线,并且所述调整单元使所述包围盒以所述公垂线为旋转轴,以所述空间向量与Z轴的夹角为旋转角进行旋转。According to a preferred embodiment, the adjustment unit adjusts the spatial position of the bounding box in the following manner: the adjustment unit calculates the space vector with the smallest angle with the Z axis and determines the angle of the angle between the space vector and the Z axis value, the adjustment unit calculates the common vertical line between the space vector and the Z axis, and the adjustment unit makes the bounding box take the common vertical line as the rotation axis, and use the angle between the space vector and the Z axis Rotate for the rotation angle.

本发明的脊椎矫正装置作为从整体中截取局部模型的装置,具有通用性,而且可实现自动地获得包围盒的空间位置和大小来适应不同形态的脊椎骨,为了更好地适应不同形态的脊椎骨,本发明的包围盒还能够自动旋转。相对于现有技术,本发明具有操作简单、自动性高、准确度高的优势。The spinal correction device of the present invention, as a device for intercepting a local model from the whole, has versatility, and can automatically obtain the spatial position and size of the bounding box to adapt to different shapes of vertebrae. In order to better adapt to different shapes of vertebrae, The bounding box of the present invention is also capable of automatic rotation. Compared with the prior art, the present invention has the advantages of simple operation, high automation and high accuracy.

附图说明Description of drawings

图1是本发明的脊椎矫正装置一个优选实施方式的模块示意图;Fig. 1 is the module schematic diagram of a preferred embodiment of the chiropractic device of the present invention;

图2是本发明确定的包围盒的一个优选实施方式的效果示意图;和FIG. 2 is a schematic diagram of the effect of a preferred embodiment of the bounding box determined by the present invention; and

图3是本发明确定的包围盒的另一个优选实施方式的效果示意图。FIG. 3 is a schematic diagram of the effect of another preferred embodiment of the bounding box determined by the present invention.

附图标记列表List of reference signs

10:识别模块 101:选取单元10: Recognition module 101: Select unit

102:标记数组建立单元 103:第一存储单元102: mark array establishment unit 103: first storage unit

104:生长单元 20:拟合模块104: Growth Unit 20: Fitting Module

201:第一计算单元 202:第二存储单元201: first computing unit 202: second storage unit

203:第二计算单元 204:第三计算单元203: The second computing unit 204: The third computing unit

205:验证单元 30:包围盒处理模块205: Verification unit 30: Bounding box processing module

301:包围盒确定单元 302:调整单元301: Bounding box determination unit 302: Adjustment unit

303:后处理单元 40:矫正模块303: Post-processing unit 40: Correction module

具体实施方式Detailed ways

下面结合附图和实施例进行详细说明。The following describes in detail with reference to the accompanying drawings and embodiments.

针对当今医院做脊柱侧弯矫正只能利用二维CT图进行简单的测量和预估的尴尬局面,本发明提供了一种脊椎矫正装置,通过该装置可以对利用三维建模技术生成的脊椎骨模型进行局部分割并利用分割后的局部模型进行模拟矫正仿真。具体地,通过对CT断层扫描图像,利用VisualToolkit(简称VTK)工具的MarchingCubes方法进行三维重建,还原出人体骨骼的三维图像,然后对重建的三维模型分割并进行处理,最终得到单个脊椎骨的三维模型并分别保存,利于后续的测量和调整。优选地,VTK通过封装不同的处理类使用户可以方便的利用CT断层扫描图及核磁共振成像图进行三维模型的生成,包括体绘制和面绘制。更优选地,本发明利用面绘制方法将成套的CT断层扫描图进行三维建模,生成逼真的三维表面模型。三维表面模型包含了三维模型所需要的一系列信息,如点,线,面,法向量等。通过这些信息,可以对三维模型进行一系列的操作以实现手术模拟等功能。Aiming at the embarrassing situation that only two-dimensional CT images can be used for simple measurement and estimation in the current hospital for scoliosis correction, the present invention provides a spinal correction device, through which the spinal bone model generated by the three-dimensional modeling technology can be analyzed. Perform local segmentation and use the segmented local model to simulate and correct the simulation. Specifically, by using the MarchingCubes method of the Visual Toolkit (VTK) tool for 3D reconstruction of CT tomographic images, a 3D image of the human skeleton is restored, and then the reconstructed 3D model is segmented and processed to finally obtain a 3D model of a single vertebra. And save them separately for subsequent measurement and adjustment. Preferably, by encapsulating different processing classes, VTK enables users to conveniently generate 3D models using CT tomographic images and MRI images, including volume rendering and surface rendering. More preferably, the present invention uses a surface rendering method to perform three-dimensional modeling on a set of CT tomographic scans to generate a realistic three-dimensional surface model. The 3D surface model contains a series of information required by the 3D model, such as points, lines, surfaces, normal vectors, etc. With this information, a series of operations can be performed on the 3D model to achieve functions such as surgical simulation.

进一步地,本发明提供了一种利用医学脊柱三维空间模型进行局部分割获得单块脊椎骨的装置。该装置通过采用空间包围盒,手动调整包围盒的大小和空间形态,对整个脊柱进行局部截取。该装置还可以先对脊柱三维空间模型上脊椎骨上下表面进行平面识别,利用识别生成的平面的各种参数(如法向量和各方向的长度)确定空间包围盒的位置和形态,然后通过微调来截取单块脊椎骨。对截取出来的脊椎骨进行标号和存储必要的脊椎骨参数,以利于后续脊椎调整和矫正模拟工作的进行。Further, the present invention provides a device for obtaining a single vertebra by partial segmentation using a three-dimensional space model of a medical spine. The device uses a spatial bounding box and manually adjusts the size and spatial shape of the bounding box to locally intercept the entire spine. The device can also perform plane recognition on the upper and lower surfaces of the vertebrae on the three-dimensional space model of the spine, and determine the position and shape of the space bounding box by using various parameters of the recognized plane (such as the normal vector and the length in each direction), and then fine-tune to determine the position and shape of the space bounding box. A single vertebra was cut. Label the cut-out vertebrae and store the necessary vertebrae parameters, so as to facilitate the subsequent vertebra adjustment and correction simulation work.

对本发明中涉及到的名词做如下解释。The terms involved in the present invention are explained as follows.

广度优先遍历法:广度优先遍历法是连通图的一种遍历策略,其基本思想是从一个顶点V0开始,辐射状地优先遍历其周围较广的区域。广度优先遍历法以层为顺序,将某一层上的所有节点都搜索到了之后才向下一层搜索。其包括三个步骤:(1)从图中某个顶点V0出发并访问此顶点。(2)从V0出发,访问V0的各个未曾访问的邻接点W1、W2……WK,然后依此从W1、W2……WK出发访问各自未被访问的邻接点。(3)重复步骤(2),直至全部顶点都被访问为止。 Breadth -first traversal method: The breadth-first traversal method is a traversal strategy for connected graphs. The breadth-first traversal method is in the order of layers, and after all nodes on a certain layer are searched, the next layer is searched. It includes three steps: (1) Starting from a certain vertex V 0 in the graph and visiting this vertex. (2) Starting from V 0 , visit each unvisited adjacent point W 1 , W 2 ...... W K of V 0 , and then visit each unvisited adjacent point from W 1 , W 2 ...... W K accordingly . (3) Repeat step (2) until all vertices are visited.

包围盒:包围盒被定义为包含该对象且各边平行于坐标轴的最小六面体。包围盒可以在空间坐标系中自由移动和旋转,并能自由调整大小。包围盒有七个小球分别控制每个面的位置和整体的位置,鼠标点击在面上而非小球上时以中心小球为旋转中心的自由旋转运动。Bounding Box: The bounding box is defined as the smallest hexahedron containing the object with sides parallel to the coordinate axes. The bounding box can be freely moved and rotated in the spatial coordinate system, and can be freely resized. The bounding box has seven balls that control the position of each face and the overall position. When the mouse is clicked on the face instead of the ball, the center ball is used as the center of rotation for free rotation.

实施例1Example 1

图1示出了本发明的脊椎矫正装置一个优选实施方式的模块示意图。如图1,本发明的脊柱矫正装置至少包括识别模块10、拟合模块20、包围盒处理模块30和矫正模块40。识别模块10以脊柱三维空间模型上的三角片为种子点进行生长,并利用广度优先遍历法进行有最大迭代次数的相邻平面生长以获得三角片集合。拟合模块20基于识别模块10识别出的三角片的法向量和顶点参数采用矩阵乘法以及计算矩阵奇异值的方法计算两个相对拟合平面的方程式以获得两个相对的拟合面。优选地,两个相对的面为欲截取的单块脊椎骨的上下面。包围盒处理模块30基于拟合模块20拟合出的两个相对拟合平面的中心点和法向量来确定包围盒的中心、两个相对面的距离和两个相对面的法向量并基于所确定的包围盒的中心、两个相对面的距离和两个相对面的法向量来确定包围盒的空间位置和大小。矫正模块40基于包围盒处理模块30所确定的包围盒截取的脊椎骨参数来产生弯棒的弯曲参数以通过所述弯棒实现脊椎矫正。本实施例所确定的包围盒的效果示意图如图2所示。Fig. 1 shows a schematic block diagram of a preferred embodiment of the chiropractic device of the present invention. As shown in FIG. 1 , the spinal correction device of the present invention at least includes an identification module 10 , a fitting module 20 , a bounding box processing module 30 and a correction module 40 . The identification module 10 uses the triangular patch on the three-dimensional space model of the spine as the seed point to grow, and uses the breadth-first traversal method to grow the adjacent plane with the maximum number of iterations to obtain the triangular patch set. The fitting module 20 calculates the equations of the two relative fitting planes based on the normal vectors and vertex parameters of the triangular pieces identified by the identifying module 10 by means of matrix multiplication and calculating matrix singular values to obtain two opposite fitting planes. Preferably, the two opposite surfaces are the upper and lower surfaces of the single vertebra to be cut. The bounding box processing module 30 determines the center of the bounding box, the distance between the two opposite faces, and the normal vector of the two opposite faces based on the center points and normal vectors of the two opposite fitting planes fitted by the fitting module 20, and based on the Determine the center of the bounding box, the distance between the two opposite faces, and the normal vector of the two opposite faces to determine the spatial position and size of the bounding box. The correction module 40 generates the bending parameters of the curved rod based on the vertebral bone parameters intercepted by the bounding box determined by the bounding box processing module 30 to realize spine correction through the curved rod. A schematic diagram of the effect of the bounding box determined in this embodiment is shown in FIG. 2 .

根据一个优选实施方式,脊柱三维空间模型的每一个三角片都有一个法向量,当选择某一三角片进行区域生长时,可与相邻三角片之的法向量进行比较,向与选中的三角片空间夹角不超过某一较小度量(根据实际情况确定)的相邻三角片进行生长,利用生长后的众多三角片进行平面拟合即可实现空间平面拟合。优选地,众多三角片是通过如下方式获得的:利用三角片选取器在一个平面上选取一个三角片,以该三角片为种子点进行生长,结合每个三角片的法向量,生长时根据种子点三角片的法向量和其他三角片法向量的夹角,利用广度优先遍历发法选取夹角在较小范围内的相邻三角片,进行有最大迭代次数的相邻平面生长,这样可以得到较大范围的平面三角片。According to a preferred embodiment, each triangular piece of the spine three-dimensional space model has a normal vector. When a certain triangular piece is selected for regional growth, it can be compared with the normal vector of the adjacent triangular pieces, and the direction to the selected triangle The adjacent triangular slices whose space included angle does not exceed a certain small measure (determined according to the actual situation) are grown, and the spatial plane fitting can be realized by performing plane fitting with many triangular slices after the growth. Preferably, many triangular pieces are obtained by the following method: selecting a triangular piece on a plane by using a triangular piece selector, using the triangular piece as a seed point to grow, combining the normal vector of each triangle piece, and growing according to the seed The angle between the normal vector of the point triangle and the normal vector of other triangles, the breadth-first traversal method is used to select the adjacent triangles with the angle within a small range, and the adjacent planes with the maximum number of iterations are grown, so that we can get Larger range of flat triangles.

再次参见图1,识别模块10至少包括选取单元101、标记数组建立单元102、第一存储单元103和生长单元104。优选地,选取单元101用于从脊柱三维空间模型表面上选取一个三角片的ID。优选地,标记数组建立单元102用于在选取单元101选取一个三角片后建立标记数组,标记数组用以标记每个三角片的使用情况且标记数组的大小为要截取的脊柱三维空间模型表面的三角片的总数。优选地,在选取单元101从脊柱三维空间模型表面上选取一个三角片后,若无标记数组,则由标记数组建立单元102新建一个标记数组,该标记数组用于确定要识别的平面上的三角片是否被使用。更优选地,标记数组的大小为所选三角片所在平面的三角片的总数。优选地,第一存储单元103用于存储脊柱三维空间模型的数据、待比较三角片的ID链表和/或最终被选择的三角片ID的链表。优选地,待比较三角片的ID链表为选取单元101从脊柱三维空间模型表面上选取的三角片的ID,第一存储单元103存储的数据以为生长单元104的广度优先遍历做准备。优选地,生长单元104以选取单元101选取的三角片的法向量作为基准向量,利用广度优先遍历法进行有最大迭代次数的相邻平面生长以获得符合要求的三角片集合。优选地,广度优先遍历法至少包括如下步骤:Referring to FIG. 1 again, the identification module 10 at least includes a selection unit 101 , a label array establishment unit 102 , a first storage unit 103 and a growth unit 104 . Preferably, the selecting unit 101 is used to select an ID of a triangular slice from the surface of the three-dimensional space model of the spine. Preferably, the marker array establishment unit 102 is configured to create a marker array after the selection unit 101 selects a triangular slice, the marker array is used to mark the usage of each triangle slice and the size of the marker array is the size of the surface of the spine three-dimensional space model to be intercepted. The total number of triangles. Preferably, after the selection unit 101 selects a triangle slice from the surface of the spine three-dimensional space model, if there is no marker array, a marker array is created by the marker array establishment unit 102, and the marker array is used to determine the triangle on the plane to be identified. whether the slice is used. More preferably, the size of the marker array is the total number of triangles in the plane where the selected triangle is located. Preferably, the first storage unit 103 is used for storing the data of the three-dimensional space model of the spine, the ID linked list of the triangular slices to be compared and/or the linked list of the IDs of the triangular slices finally selected. Preferably, the ID linked list of the triangles to be compared is the IDs of the triangles selected by the selection unit 101 from the surface of the spine three-dimensional space model, and the data stored in the first storage unit 103 is prepared for the breadth-first traversal of the growth unit 104 . Preferably, the growing unit 104 uses the normal vector of the triangular patch selected by the selecting unit 101 as a reference vector, and uses the breadth-first traversal method to grow adjacent planes with the maximum number of iterations to obtain a set of triangular patches that meet the requirements. Preferably, the breadth-first traversal method at least includes the following steps:

S1:生长单元104首先设置广度优先遍历的循环数。优选地,循环数为选取单元101所选的三角片所在平面的三角片的总数。S1: The growing unit 104 firstly sets the number of cycles of breadth-first traversal. Preferably, the number of cycles is the total number of triangles in the plane where the triangles selected by the selection unit 101 are located.

S2:进行第一次循环时,生长单元104先获取脊柱三维空间模型中所有三角片的法向量信息。优选地,所有三角片的法向量信息在VTK构建三维表面模型时依据得出并保存在三维数据中。更优选地,第一存储单元103中存储有脊柱三维空间模型的数据,生长单元104可从第一存储单元103中获取所有三角片的法向量信息。S2: During the first cycle, the growth unit 104 first obtains the normal vector information of all triangular slices in the three-dimensional space model of the spine. Preferably, the normal vector information of all triangular pieces is obtained and stored in the three-dimensional data when the VTK constructs the three-dimensional surface model. More preferably, the first storage unit 103 stores the data of the three-dimensional space model of the spine, and the growth unit 104 can obtain the normal vector information of all triangular slices from the first storage unit 103 .

S3:生长单元104从选取单元101选取的三角片开始循环,依次标记并判断要比较的三角片的使用情况。在待选择三角片已经使用时,生长单元104放弃待选择三角片与种子点三角片的比较。在待选择三角片未使用时,生长单元104标记并比较待选择三角片与种子点三角片法向量的各分量差值的绝对值之和。S3: The growing unit 104 starts to cycle from the triangular slices selected by the selection unit 101, and sequentially marks and judges the usage of the triangular slices to be compared. When the triangle to be selected has been used, the growing unit 104 discards the comparison of the triangle to be selected with the seed point triangle. When the triangular patch to be selected is not used, the growing unit 104 marks and compares the sum of the absolute values of the differences of the components of the normal vector of the triangular patch to be selected and the triangular patch of the seed point.

优选地,生长单元104计算出待选择三角片的法向量与种子点三角片法向量的各分量差值的绝对值之和不大于0.5时,生长单元104将待选择三角片ID的链表发送至第一存储单元103进行存储。存储在第一存储单元103中的待选择三角片作为最终结果集中的一个三角片。生长单元104计算出待选择三角片的法向量与种子点三角片法向量的各分量差值的绝对值之和大于0.5时,生长单元104访问下一个待选择的三角片。Preferably, when the growing unit 104 calculates that the sum of the absolute values of the difference between the normal vector of the triangle to be selected and the normal vector of the seed point triangle is not greater than 0.5, the growing unit 104 sends the linked list of the IDs of the triangles to be selected to The first storage unit 103 performs storage. The triangular patch to be selected stored in the first storage unit 103 is used as a triangular patch in the final result set. When the growing unit 104 calculates that the sum of the absolute values of the difference between the normal vector of the triangle to be selected and the normal vector of the seed point triangle is greater than 0.5, the growing unit 104 accesses the next triangle to be selected.

S4:生长单元104从已经筛选出的待选择三角片着手,找到其相邻的三角片,并将相邻三角片ID存入第一存储单元103的待比较数组,,作为下一次循环中的待选择三角片来使用,进入下一次循环,直至循环次数用完。S4: The growing unit 104 starts from the triangular slices to be selected that have been screened, finds its adjacent triangular slices, and stores the IDs of the adjacent triangular slices in the array to be compared in the first storage unit 103, as the next iteration in the cycle. To select the triangular piece to use, enter the next cycle until the number of cycles is used up.

优选地,生长单元104以筛选出的三角片作为待比较对象,并将待选择三角片的法向量与待比较对象三角片法向量的各分量差值的绝对值之和不大于0.5的三角片ID存入第一存储单元103的待比较数组以作为下一次循环中的待比较对象来使用,如此循环直至遍历完所有三角片。Preferably, the growing unit 104 takes the selected triangular patch as the object to be compared, and selects the triangular patch whose sum of absolute values of the difference between the normal vector of the triangular patch to be selected and the normal vector of the triangular patch to be compared is not greater than 0.5 The ID is stored in the to-be-compared array of the first storage unit 103 to be used as the to-be-compared object in the next cycle, and the cycle is repeated until all triangles are traversed.

S5:在循环结束之后,生长单元104调取存储于第一存储单元103中的三角片ID并将对应的三角片以不同于未选中三角片的颜色进行着色以生成一个近似平面的超平面。优选地,存储于第一存储单元103中的三角片近似在同一个平面上。S5: After the loop ends, the growing unit 104 retrieves the triangle ID stored in the first storage unit 103 and colorizes the corresponding triangle with a color different from the unselected triangle to generate an approximate plane hyperplane. Preferably, the triangular pieces stored in the first storage unit 103 are approximately on the same plane.

当获得近似平面的三角形集合之后,拟合模块20利用选择的三角片进行平面拟合以生成一个平面,生成的平面作为后续包围盒定位的依据。After obtaining the triangle set that approximates the plane, the fitting module 20 uses the selected triangle pieces to perform plane fitting to generate a plane, and the generated plane serves as the basis for the subsequent positioning of the bounding box.

继续参见图1,拟合模块20至少包括第一计算单元201、第二存储单元202、第二计算单元203、第三计算单元204和验证单元205。优选地,第一计算单元201对识别模块10识别出的三角片的法向量进行平均化处理以获得三角片的平均法向量并将平均法向量存储至第二存储单元202。优选地,第二存储单元202还存储有识别模块10识别出的三角片的顶点参数。优选地,第二计算单元203基于存储于第二存储单元202中的顶点参数分别计算三角片顶点在X、Y、Z轴的平均值。该平均值作为后续计算拟合平面中心的基准值,而并不将其直接作为拟合平面中心,如此可以减小拟合平面与理想平面的偏差。优选地,第三计算单元204基于第一计算单元201计算的平均法向量和第二计算单元203计算的三角片顶点在X、Y、Z轴的平均值采用矩阵乘法以及计算矩阵奇异值的方法计算拟合平面的方程式。优选地,第三计算单元204根据计算所得的矩阵奇异值获得的奇异向量来指定拟合平面的平面系数。优选地,验证单元205基于拟合平面方程式计算拟合平面的法向量并将其与第一计算单元201计算的平均法向量进行比较,在二者出现偏差达到设定阈值时重新计算拟合平面的方程式。更优选地,拟合平面的法向量在原平均法向量上投影的方向和原平均法向量一致。其中,拟合平面的法向量由椎骨平面内指向椎骨平面外。Continuing to refer to FIG. 1 , the fitting module 20 includes at least a first calculation unit 201 , a second storage unit 202 , a second calculation unit 203 , a third calculation unit 204 and a verification unit 205 . Preferably, the first calculation unit 201 averages the normal vectors of the triangular patches identified by the identification module 10 to obtain an average normal vector of the triangular patches and stores the averaged normal vectors in the second storage unit 202 . Preferably, the second storage unit 202 further stores the vertex parameters of the triangle pieces identified by the identification module 10 . Preferably, the second calculating unit 203 calculates the average values of the triangle vertices in the X, Y and Z axes respectively based on the vertex parameters stored in the second storage unit 202 . The average value is used as the reference value for the subsequent calculation of the center of the fitted plane, rather than directly used as the center of the fitted plane, so that the deviation between the fitted plane and the ideal plane can be reduced. Preferably, the third calculating unit 204 adopts the method of matrix multiplication and calculating the singular value of the matrix based on the average normal vector calculated by the first calculating unit 201 and the average value of the triangular patch vertices in the X, Y and Z axes calculated by the second calculating unit 203 Calculate the equation for the fitted plane. Preferably, the third calculation unit 204 specifies the plane coefficients of the fitted plane according to the singular vectors obtained from the calculated singular values of the matrix. Preferably, the verification unit 205 calculates the normal vector of the fitted plane based on the fitted plane equation and compares it with the average normal vector calculated by the first calculation unit 201, and recalculates the fitted plane when the deviation between the two reaches a set threshold. formula. More preferably, the projection direction of the normal vector of the fitted plane on the original average normal vector is consistent with the original average normal vector. Among them, the normal vector of the fitting plane points from the inside of the vertebral plane to the outside of the vertebral plane.

经拟合模块20拟合后可以在脊柱三维空间模型表面上生成近似平面的拟合平面,通过对拟合平面进行适当平移,生成浮于脊柱三维空间模型表面之上的一个平面,利用生成的拟合平面,通过包围盒处理模块30可进一步确定包围盒的空间位置和大小。优选地,包围盒处理模块30根据拟合模块20拟合出的两个相对面的的中心点连线来确定包围盒的中心,将中心线的长度作为包围盒两个相对面的距离、根据两个相对面的法向量与竖直方向夹角较小者来确定包围盒两个相对面的法向量。包围盒处理模块30基于包围盒的中心、包围盒两个相对面的距离和包围盒两个相对面的法向量来确定包围盒的位置和大小。后续只需微调便可很方便准确的截取出单块的脊椎骨。After fitting by the fitting module 20, an approximate plane fitting plane can be generated on the surface of the three-dimensional space model of the spine, and a plane floating on the surface of the three-dimensional space model of the spine can be generated by appropriately translating the fitted plane. After fitting the plane, the bounding box processing module 30 can further determine the spatial position and size of the bounding box. Preferably, the bounding box processing module 30 determines the center of the bounding box according to the line connecting the center points of the two opposite faces fitted by the fitting module 20, and takes the length of the center line as the distance between the two opposite faces of the bounding box, according to The normal vector of the two opposite faces of the bounding box is determined by the smaller angle between the normal vectors of the two opposite faces and the vertical direction. The bounding box processing module 30 determines the position and size of the bounding box based on the center of the bounding box, the distance between two opposite faces of the bounding box, and the normal vectors of the two opposite faces of the bounding box. Subsequent fine-tuning can easily and accurately cut out a single piece of vertebrae.

继续参见图1,包围盒处理模块30至少包括包围盒确定单元301、调整单元302和后处理单元303。优选地,包围盒确定单元301基于拟合模块20拟合出的两个相对面的的中心点与法向量参数来确定包围盒的空间位置。优选地,调整单元302基于包围盒确定单元301确定的包围盒的空间位置进行旋转以使包围盒能够与脊柱三维空间模型表面贴合。优选地,后处理单元303在基于调整单元302旋转后的包围盒截取脊椎骨后,对包围盒内截取的局部模型进行去噪处理以保存模型在空间上的最大连通域。优选地,使用了VTK中的vtkPolyDataConnectivity Filter方法提取截取部分的最大连通域。Continuing to refer to FIG. 1 , the bounding box processing module 30 at least includes a bounding box determination unit 301 , an adjustment unit 302 and a post-processing unit 303 . Preferably, the bounding box determining unit 301 determines the spatial position of the bounding box based on the center point and normal vector parameters of the two opposite surfaces fitted by the fitting module 20 . Preferably, the adjusting unit 302 rotates based on the spatial position of the bounding box determined by the bounding box determining unit 301 so that the bounding box can fit the surface of the three-dimensional space model of the spine. Preferably, after the post-processing unit 303 intercepts the vertebrae based on the bounding box rotated by the adjustment unit 302, the local model intercepted in the bounding box is denoised to save the maximum connected domain of the model in space. Preferably, the vtkPolyDataConnectivity Filter method in VTK is used to extract the maximum connected domain of the intercepted part.

根据一个优选实施方式,包围盒确定单元301通过如下方式确定包围盒的空间位置:包围盒确定单元301基于计算拟合模块20拟合出的两个相对面的的中心点的平均值以获得包围盒中心。包围盒确定单元301将包围盒在X、Y轴方向分别根据中心左右延伸预设阈值,将包围盒在Z轴方向分别根据中心上下延伸预设阈值以确定包围盒的空间位置。优选地,包围盒在X、Y轴方向分别根据中心左右延伸的距离大于包围盒在Z轴方向分别根据中心上下延伸的距离。具体延伸的距离可基于实际情况进行调整。例如,包围盒在X、Y轴方向分别根据中心左右延伸30~60个单位的距离,而包围盒在Z轴方向分别根据中心上下延伸1~2个单位的距离。According to a preferred embodiment, the bounding box determination unit 301 determines the spatial position of the bounding box in the following manner: the bounding box determination unit 301 obtains the bounding box based on the average value of the center points of the two opposite surfaces fitted by the fitting module 20 box center. The bounding box determining unit 301 extends the bounding box in the X and Y axis directions to the left and right according to the preset thresholds respectively, and extends the bounding box in the Z axis direction respectively according to the center up and down the preset threshold value to determine the spatial position of the bounding box. Preferably, the distance that the bounding box extends left and right in the X and Y axis directions according to the center is greater than the distance that the bounding box extends up and down according to the center in the Z axis direction. The specific extension distance can be adjusted based on the actual situation. For example, the bounding box extends 30 to 60 units left and right in the X and Y axis directions, respectively, according to the center, and the bounding box extends 1 to 2 units up and down in the Z axis direction, respectively, according to the center.

根据一个优选实施方式,调整单元302通过如下方式调整包围盒的空间位置:调整单元302计算与Z轴夹角最小的空间向量并确定空间向量与Z轴的夹角的角度值,调整单元302计算空间向量与Z轴的公垂线。优选地,调整单元302通过计算公垂线的三个分量,利用三阶行列式,求两向量的叉乘得到公垂线。调整单元302使包围盒以公垂线为旋转轴,以空间向量与Z轴的夹角为旋转角进行旋转。According to a preferred embodiment, the adjustment unit 302 adjusts the spatial position of the bounding box in the following manner: the adjustment unit 302 calculates the space vector with the smallest angle with the Z axis and determines the angle value of the angle between the space vector and the Z axis, and the adjustment unit 302 calculates The space vector is the common perpendicular to the Z axis. Preferably, the adjustment unit 302 obtains the common perpendicular by calculating the three components of the common perpendicular and using the third-order determinant to obtain the cross product of the two vectors. The adjustment unit 302 rotates the bounding box with the common perpendicular as the rotation axis and the included angle between the space vector and the Z axis as the rotation angle.

实施例2Example 2

本发明实施例1提供的脊椎矫正装置作为从整体模型中截取局部模型的装置,具有通用性,调整较为方便,但对于某些复杂的、不精细的三维模型用实施例1提供的装置进行切割显得步骤繁琐,为此,实施例2提供了一种用手动的方法进行多次调整来进行切割的方法。The spinal correction device provided in Embodiment 1 of the present invention is used as a device for cutting a partial model from an overall model. It is versatile and easy to adjust. However, for some complex and imprecise three-dimensional models, the device provided in Embodiment 1 is used for cutting. It seems that the steps are cumbersome, for this reason, Example 2 provides a method of performing multiple adjustments by a manual method for cutting.

根据一个优选实施方式,脊椎矫正装置利用VTK在构建的三维模型表面取点,利用此点为中心向X、Y、Z三个方向的正负方向各扩张若干个单位生成一个VTKBox包围盒。设置包围盒的六个面分别为切割面,取包围盒内部的模型为截取结果,便可实现局部截取。包围盒可以进行扩大缩小,旋转,以适应不同形态的脊椎骨。优选地,为了避免截取的杂质对后续操作的影响,脊椎矫正装置提取空间最大连通体作为脊柱区域截取的最终结果。本实施例所确定的包围盒的效果示意图如图3所示。According to a preferred embodiment, the spine correction device uses VTK to take a point on the surface of the constructed 3D model, and uses this point as the center to expand several units in the positive and negative directions of the X, Y, and Z directions to generate a VTKBox bounding box. The six faces of the bounding box are set as cutting planes, and the model inside the bounding box is taken as the interception result, so that partial interception can be realized. The bounding box can be enlarged, reduced, and rotated to accommodate different vertebrae. Preferably, in order to avoid the influence of the intercepted impurities on subsequent operations, the vertebral correction device extracts the largest connected body in the space as the final result of the interception of the spine region. A schematic diagram of the effect of the bounding box determined in this embodiment is shown in FIG. 3 .

根据一个优选实施方式,脊椎矫正装置将截取窗口分为左右两个部分,左半部分用于显示整个三维脊柱空间模型。脊椎矫正装置首先在截取窗口左边的三维脊柱空间模型上选择要截取的某一块脊椎骨表面上的一点,然后以该点为中心生成一个固定大小的包围盒。同时在右边的截取窗口显示同样包围盒与截取出来的局部模型,两边完全同步,都可以手动调整包围盒的大小和旋转角。本发明的脊椎矫正装置将截取窗口分为左右两个部分以实现对照,使得截取出来的模型更精确。According to a preferred embodiment, the chiropractic device divides the interception window into two parts, left and right, and the left half is used to display the entire three-dimensional spine space model. The spine correction device first selects a point on the surface of a certain vertebra to be intercepted on the three-dimensional spine space model on the left side of the interception window, and then generates a bounding box of a fixed size with the point as the center. At the same time, the same bounding box and the extracted local model are displayed in the interception window on the right. Both sides are completely synchronized, and the size and rotation angle of the bounding box can be adjusted manually. The vertebral correction device of the present invention divides the interception window into two parts, left and right, for comparison, so that the intercepted model is more accurate.

采用如下方式对比实施例1和实施例2采用的脊椎矫正装置截取的单块脊椎骨的准确性,比较结果如表1和表2所示。The accuracy of the single vertebrae obtained by the vertebral correction device used in Example 1 and Example 2 was compared in the following manner, and the comparison results are shown in Table 1 and Table 2.

实施例1的脊椎矫正装置:该脊椎矫正装置首先识别出欲截取脊椎骨的上下表面,基于识别的表面确定中心点和法向量后自动生成一个空间位置和大小合理的空间包围盒,通过鼠标交互微调包围盒的位置和大小,从而截取出单块脊椎骨。The spine correction device of Embodiment 1: the spine correction device first identifies the upper and lower surfaces of the vertebrae to be intercepted, determines a center point and a normal vector based on the identified surface, and automatically generates a space bounding box with a reasonable spatial position and size, and fine-tunes it through mouse interaction. The location and size of the bounding box to extract a single vertebra.

实施例2的脊椎矫正装置:该脊椎矫正装置首先在脊柱三维空间模型的表面选取一点,以该点为中心分别在X、Y、Z方向上定义包围盒半径,从而生成一个与坐标轴平行的空间包围盒,后续通过鼠标交互调整包围盒的大小和位置,从而截取出单块脊椎骨。The spine correction device of Embodiment 2: The spine correction device first selects a point on the surface of the three-dimensional space model of the spine, and defines a bounding box radius in the X, Y, and Z directions with the point as the center, thereby generating a parallel to the coordinate axis. Spatial bounding box, and then adjust the size and position of the bounding box through mouse interaction, so as to cut out a single vertebra.

首先确定理想模型的中心点,然后把实施例1和实施例2实际初次截取模型的所有点与理想模型的中心点比较。这里判断一个局部模型初次截取效果的标准是:该截取模型离理想模型中心点接近的点越多的模型是越接近理想模型的,更能表现理想模型的形状。用距离中心点大于一定阈值的点的个数作为标准,个数越少,说明模型越能表现理想模型的形状特征。因为越大于这个区间,模型的点就会越离散。优选地,阈值的确定是根据理想模型的X方向上的边界值确定,方法是先获取理想模型的X、Y、Z三个方向上的边界值,然后取X方向上的距离值的1/2作为判断标准。这里选取X方向是因为X方向脊柱斜率较大,更容易体现差异性。First determine the center point of the ideal model, and then compare all the points of the actual initial interception models in Example 1 and Example 2 with the center point of the ideal model. Here, the criterion for judging the initial interception effect of a local model is: the closer the intercepted model is to the center point of the ideal model, the closer the model is to the ideal model, and the better it can represent the shape of the ideal model. The number of points whose distance from the center point is greater than a certain threshold is used as the standard. The smaller the number, the better the model can represent the shape characteristics of the ideal model. Because the larger the interval is, the more discrete the points of the model will be. Preferably, the threshold is determined according to the boundary value in the X direction of the ideal model, and the method is to first obtain the boundary values in the X, Y, and Z directions of the ideal model, and then take 1/1 of the distance value in the X direction. 2 as the criterion for judgment. The X-direction is chosen here because the spine slope in the X-direction is larger, which makes it easier to reflect the differences.

因此,根据距离理想模型中心点大于某一阈值的点的个数(称为失效点数目)及有效点占模型总点数的百分率(称之为有效率)这两个数值,就可以比较出两种方法效果的差异性,失效点个数越少,有效率越大的模型说明越接近理想截取模型。此处,理想截取模型是指通过提取截取模型的空间最大连通域所得到的单个脊椎骨模型,该模型不包含细小杂质,属于用户最后想得到的模型。Therefore, according to the two values, the number of points that are greater than a certain threshold from the center point of the ideal model (called the number of failure points) and the percentage of valid points to the total number of points in the model (called the effective rate), the two values can be compared. The difference of the effect of each method, the smaller the number of failure points, the greater the efficiency of the model, the closer to the ideal interception model. Here, the ideal truncated model refers to a single vertebrae model obtained by extracting the largest spatially connected domain of the truncated model, which does not contain small impurities and belongs to the model that the user finally wants to obtain.

表1实施例1和实施例2截取的单块脊椎骨失效点数目和有效率Table 1 The number of failure points and the effective rate of a single vertebra cut in Example 1 and Example 2

Figure BDA0001732813180000141
Figure BDA0001732813180000141

从表1可知,实施例1截取的单块脊椎骨有效率在70%~93.1%,实施例2截取的单块脊椎骨的有效率为54.1%~75.0%。其中,T4~L1的脊椎骨曲率依次增大,L1~L4脊椎骨的曲率依次减小。从表1还可看出,在曲率较大的脊椎骨位置,实施例1与实施例2的差异越大,由此可见,实施例1的脊椎矫正装置在截取单块脊椎骨时与理想模型更接近,尤其是在脊椎骨曲率较大时,采用实施1的脊椎矫正装置更能截取出理想模型解决的单块脊椎骨。From Table 1, it can be seen that the effective rate of the single vertebra cut in Example 1 is 70%-93.1%, and the effective rate of the single vertebra cut in Example 2 is 54.1%-75.0%. Among them, the curvature of the vertebrae from T4 to L1 increased in turn, and the curvature of the vertebrae from L1 to L4 decreased in turn. It can also be seen from Table 1 that the difference between Example 1 and Example 2 is greater at the position of the vertebrae with larger curvature. It can be seen that the vertebral correction device of Example 1 is closer to the ideal model when cutting a single vertebra. , especially when the curvature of the vertebral bone is large, the use of the vertebral correction device of implementation 1 can better cut out a single vertebral bone solved by the ideal model.

使用实施例1和实施例2截取模型点的数量与理想截取模型点的数量的比率作为比较标准,结果如表2所示。Using the ratio of the number of intercepted model points in Example 1 and Example 2 to the number of ideal intercepted model points as a comparison standard, the results are shown in Table 2.

表2实施例1和实施例2截取模型点的数量与理想模型的比率Table 2 The ratio of the number of intercepted model points to the ideal model in Example 1 and Example 2

脊椎骨编号spine number 实施例1Example 1 实施例2Example 2 T4T4 1.123341.12334 1.243891.24389 T5T5 1.164031.16403 1.223281.22328 L1L1 1.125591.12559 1.225431.22543 L2L2 1.125541.12554 1.347371.34737 L3L3 1.092581.09258 1.288721.28872 L4L4 1.063191.06319 1.156001.15600

从表2可以看出,实施例1截取模型与理想模型的比率更接近于1。It can be seen from Table 2 that the ratio of the intercepted model to the ideal model in Example 1 is closer to 1.

综上所述,相对于实施例2,实施例1的脊椎矫正装置截取的单块脊椎骨准确性更高,与理想模型更接近。To sum up, compared with Example 2, the single vertebrae obtained by the spinal correction device of Example 1 is more accurate and closer to the ideal model.

需要注意的是,上述具体实施例是示例性的,本领域技术人员可以在本发明公开内容的启发下想出各种解决方案,而这些解决方案也都属于本发明的公开范围并落入本发明的保护范围之内。本领域技术人员应该明白,本发明说明书及其附图均为说明性而并非构成对权利要求的限制。本发明的保护范围由权利要求及其等同物限定。It should be noted that the above-mentioned specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the scope of the present invention. within the scope of protection of the invention. It should be understood by those skilled in the art that the description of the present invention and the accompanying drawings are illustrative rather than limiting to the claims. The protection scope of the present invention is defined by the claims and their equivalents.

Claims (4)

1.一种脊椎骨的三维空间模型拟合平面的拟合装置,其特征在于,所述拟合装置至少包括识别模块(10)和拟合模块(20),其中,1. A fitting device for a three-dimensional space model fitting plane of a vertebra, wherein the fitting device at least comprises an identification module (10) and a fitting module (20), wherein, 所述识别模块(10)以脊柱三维空间模型上的三角片为种子点进行生长并利用广度优先遍历法进行有最大迭代次数的相邻平面生长以获得三角片集合,The identification module (10) uses the triangular slices on the three-dimensional space model of the spine as seed points to grow and uses the breadth-first traversal method to grow adjacent planes with the maximum number of iterations to obtain a triangular slice set, 所述拟合模块(20)基于所述识别模块(10)识别出的三角片的法向量和顶点参数采用矩阵乘法以及计算矩阵奇异值的方法计算两个相对拟合平面的方程式以获得两个相对的拟合面,The fitting module (20) uses matrix multiplication and the method of calculating matrix singular values to calculate the equations of two relative fitting planes based on the normal vectors and vertex parameters of the triangular pieces identified by the identification module (10) to obtain two equations. The relative fitting surface, 所述识别模块(10)至少包括第一存储单元(103),所述第一存储单元(103)用于存储所述脊柱三维空间模型的数据、待比较三角片ID链表和/或所述识别模块(10)识别出的三角片ID链表;The identification module (10) includes at least a first storage unit (103), and the first storage unit (103) is used for storing the data of the three-dimensional space model of the spine, the ID linked list of the triangle slices to be compared and/or the identification The triangular piece ID linked list identified by the module (10); 所述拟合模块(20)至少包括第一计算单元(201)和第二存储单元(202),其中,The fitting module (20) includes at least a first calculation unit (201) and a second storage unit (202), wherein, 所述第一计算单元(201)对所述识别模块(10)识别出的所述三角片集合中所有三角片的法向量进行平均化处理以获得所述三角片的平均法向量并将所述平均法向量存储至所述第二存储单元(202);The first computing unit (201) averages the normal vectors of all the triangular patches in the triangular patch set identified by the identifying module (10) to obtain the average normal vector of the triangular patches and uses the The average normal vector is stored in the second storage unit (202); 所述第二存储单元(202)用于存储所述平均法向量以及所述识别模块(10)识别出的所述三角片集合中所有三角片的顶点参数所述第二存储单元(202)用于存储所述平均法向量以及所述识别模块(10)识别出的所述三角片集合中所有三角片的顶点参数;The second storage unit (202) is configured to store the average normal vector and the vertex parameters of all the triangle patches in the triangle patch set identified by the identification module (10). The second storage unit (202) is used for for storing the average normal vector and the vertex parameters of all triangular patches in the triangular patch set identified by the identification module (10); 所述拟合模块(20)还包括第二计算单元(203),所述第二计算单元(203)基于存储于所述第二存储单元(202)中的顶点参数分别计算所述三角片顶点在X、Y、Z轴的平均值;The fitting module (20) further includes a second calculation unit (203), which respectively calculates the triangle patch vertices based on the vertex parameters stored in the second storage unit (202) Average value in X, Y, Z axis; 所述拟合模块(20)还包括第三计算单元(204),所述第三计算单元(204)基于所述第一计算单元(201)计算的平均法向量和所述第二计算单元(203)计算的所述三角片顶点在X、Y、Z轴的平均值采用矩阵乘法以及计算矩阵奇异值的方法计算拟合平面方程式。The fitting module (20) further includes a third calculation unit (204), the third calculation unit (204) is based on the average normal vector calculated by the first calculation unit (201) and the second calculation unit ( 203) Calculate the average value of the triangular piece vertices in the X, Y, and Z axes by using the method of matrix multiplication and calculating the singular value of the matrix to calculate the fitting plane equation. 2.如权利要求1所述的拟合装置,其特征在于,所述拟合装置还包括包围盒处理模块(30),其中,2. The fitting device according to claim 1, characterized in that, the fitting device further comprises a bounding box processing module (30), wherein, 所述包围盒处理模块(30)基于所述拟合模块(20)拟合出的两个相对拟合平面的中心点和法向量来确定包围盒的中心、两个相对面的距离和两个相对面的法向量并基于所确定的包围盒的中心、两个相对面的距离和两个相对面的法向量来确定所述包围盒的空间位置和大小。The bounding box processing module (30) determines the center of the bounding box, the distance between the two opposite surfaces, and the The space position and size of the bounding box are determined based on the determined center of the bounding box, the distance between the two opposing faces, and the normal vectors of the two opposing faces. 3.如权利要求2所述的拟合装置,其特征在于,所述拟合模块(20)还包括验证单元(205),所述验证单元(205)基于所述拟合平面方程式计算所述拟合平面的法向量并将其与所述第一计算单元(201)计算的平均法向量进行比较,在二者偏差达到设定阈值时重新计算所述拟合平面方程式。3. The fitting device according to claim 2, wherein the fitting module (20) further comprises a verification unit (205), wherein the verification unit (205) calculates the The normal vector of the fitted plane is compared with the average normal vector calculated by the first calculation unit (201), and the fitted plane equation is recalculated when the deviation between the two reaches a set threshold. 4.如权利要求3所述的拟合装置,其特征在于,所述第一计算单元(201)和所述第二计算单元(203)计算出的平均法向量以及顶点平均值作为参考向量以及计算所述拟合平面中心的基准值。4. The fitting device according to claim 3, wherein the average normal vector and the vertex average calculated by the first calculation unit (201) and the second calculation unit (203) are used as reference vectors and Calculate the reference value for the center of the fitted plane.
CN201810788858.7A 2017-03-28 2017-03-28 Fitting method and device for fitting plane of three-dimensional space model of vertebra Active CN109064472B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810788858.7A CN109064472B (en) 2017-03-28 2017-03-28 Fitting method and device for fitting plane of three-dimensional space model of vertebra

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710195660.3A CN106934810B (en) 2017-03-28 2017-03-28 A spinal correction device
CN201810788858.7A CN109064472B (en) 2017-03-28 2017-03-28 Fitting method and device for fitting plane of three-dimensional space model of vertebra

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201710195660.3A Division CN106934810B (en) 2017-03-28 2017-03-28 A spinal correction device

Publications (2)

Publication Number Publication Date
CN109064472A CN109064472A (en) 2018-12-21
CN109064472B true CN109064472B (en) 2020-09-04

Family

ID=59426139

Family Applications (3)

Application Number Title Priority Date Filing Date
CN201810788858.7A Active CN109064472B (en) 2017-03-28 2017-03-28 Fitting method and device for fitting plane of three-dimensional space model of vertebra
CN201710195660.3A Expired - Fee Related CN106934810B (en) 2017-03-28 2017-03-28 A spinal correction device
CN201810788859.1A Active CN109003281B (en) 2017-03-28 2017-03-28 A device and method for obtaining a single vertebra based on a three-dimensional space model

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN201710195660.3A Expired - Fee Related CN106934810B (en) 2017-03-28 2017-03-28 A spinal correction device
CN201810788859.1A Active CN109003281B (en) 2017-03-28 2017-03-28 A device and method for obtaining a single vertebra based on a three-dimensional space model

Country Status (1)

Country Link
CN (3) CN109064472B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109979572B (en) * 2019-03-25 2022-11-01 合肥工业大学 Method and device for obtaining tangent plane of vertebral pedicle in three-dimensional vertebral model
CN110223396B (en) * 2019-06-19 2022-09-30 合肥工业大学 Morphology-based spine simulation correction method and device
CN110522515B (en) * 2019-09-04 2021-09-24 上海电气集团股份有限公司 Method, system, electronic device and storage medium for determining coverage of acetabular prosthesis
CN112819826B (en) * 2021-03-30 2022-04-19 四川大学华西医院 Spine image processing device based on artificial intelligence and computer equipment
CN115227231A (en) * 2021-04-25 2022-10-25 深圳市易尚康瑞技术有限公司 Method, device, computer equipment and medium for measuring inclination angle of human spine
CN114983459B (en) * 2022-06-21 2025-01-14 济南大学 An interactive measurement system and method for Cobb angle of three-dimensional spine model

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593365A (en) * 2009-06-19 2009-12-02 电子科技大学 A general adjustment method for 3D face model
US8165375B2 (en) * 2006-12-11 2012-04-24 Siemens Medical Solutions Usa, Inc. Method and system for registering CT data sets
CN102509352A (en) * 2011-11-15 2012-06-20 云南瑞诚科技有限公司 Three-dimensional spinal lateral protrusion reconstructing method based on orthophoric and lateral phases
CN102737407A (en) * 2012-05-24 2012-10-17 深圳市旭东数字医学影像技术有限公司 Fitting optimization method of triangular mesh data and system for achieving fitting optimization method
CN102930602A (en) * 2012-10-20 2013-02-13 西北大学 Tomography-image-based facial skin three-dimensional surface model reconstructing method
CN103617603A (en) * 2013-12-06 2014-03-05 南京大学 Automatic restoration method of three-dimensional digital geometric grid model structure
CN104200488A (en) * 2014-08-04 2014-12-10 合肥工业大学 Multi-target tracking method based on graph representation and matching
CN104517318A (en) * 2013-09-27 2015-04-15 鸿富锦精密工业(深圳)有限公司 System and method for three-dimensional measurement simulation point selection
WO2015056131A1 (en) * 2013-10-18 2015-04-23 Medicrea International Method making it possible to achieve the ideal curvature of a rod for vertebral osteosynthesis equipment designed to support a patient's vertebral column
CN105982674A (en) * 2015-01-27 2016-10-05 中慧医学成像有限公司 Method for measuring spinal curvature angle
CN106126794A (en) * 2016-06-17 2016-11-16 北京航空航天大学 The ray autonomous tracing in intelligent vehicle that under a kind of triangle mesh curved surface, facet dynamically adjusts
CN106137373A (en) * 2016-08-04 2016-11-23 湖南坤昇三维科技有限公司 Combination type spinal column puts nail guide plate and preparation method thereof
CN106333575A (en) * 2016-10-08 2017-01-18 东莞市邦达实业有限公司 A sleeping pillow comprising modified MDI foam
CN106355178A (en) * 2016-07-25 2017-01-25 北京航空航天大学 Method of massive points cloud adaptive simplification based on hierarchical clustering and topological connection model

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0503236D0 (en) * 2005-02-16 2005-03-23 Ccbr As Vertebral fracture quantification
JP6184926B2 (en) * 2014-09-30 2017-08-23 富士フイルム株式会社 Vertebral segmentation device, method and program
CN105342641B (en) * 2015-11-20 2018-07-06 深圳开立生物医疗科技股份有限公司 A kind of ultrasonic imaging method, device and its ultrasonic device
CN105809730B (en) * 2016-03-07 2018-08-07 哈尔滨工程大学 A kind of long bone fracture section data reduction method

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8165375B2 (en) * 2006-12-11 2012-04-24 Siemens Medical Solutions Usa, Inc. Method and system for registering CT data sets
CN101593365A (en) * 2009-06-19 2009-12-02 电子科技大学 A general adjustment method for 3D face model
CN102509352A (en) * 2011-11-15 2012-06-20 云南瑞诚科技有限公司 Three-dimensional spinal lateral protrusion reconstructing method based on orthophoric and lateral phases
CN102737407A (en) * 2012-05-24 2012-10-17 深圳市旭东数字医学影像技术有限公司 Fitting optimization method of triangular mesh data and system for achieving fitting optimization method
CN102930602A (en) * 2012-10-20 2013-02-13 西北大学 Tomography-image-based facial skin three-dimensional surface model reconstructing method
CN104517318A (en) * 2013-09-27 2015-04-15 鸿富锦精密工业(深圳)有限公司 System and method for three-dimensional measurement simulation point selection
WO2015056131A1 (en) * 2013-10-18 2015-04-23 Medicrea International Method making it possible to achieve the ideal curvature of a rod for vertebral osteosynthesis equipment designed to support a patient's vertebral column
CN103617603A (en) * 2013-12-06 2014-03-05 南京大学 Automatic restoration method of three-dimensional digital geometric grid model structure
CN104200488A (en) * 2014-08-04 2014-12-10 合肥工业大学 Multi-target tracking method based on graph representation and matching
CN105982674A (en) * 2015-01-27 2016-10-05 中慧医学成像有限公司 Method for measuring spinal curvature angle
CN106126794A (en) * 2016-06-17 2016-11-16 北京航空航天大学 The ray autonomous tracing in intelligent vehicle that under a kind of triangle mesh curved surface, facet dynamically adjusts
CN106355178A (en) * 2016-07-25 2017-01-25 北京航空航天大学 Method of massive points cloud adaptive simplification based on hierarchical clustering and topological connection model
CN106137373A (en) * 2016-08-04 2016-11-23 湖南坤昇三维科技有限公司 Combination type spinal column puts nail guide plate and preparation method thereof
CN106333575A (en) * 2016-10-08 2017-01-18 东莞市邦达实业有限公司 A sleeping pillow comprising modified MDI foam

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
利用特征向量的三维模型检索;霍星,檀结庆;《工程图学学报》;20091230;第76-79页 *
基于CT的椎骨组织分离与碰撞检测技术研究与实现;姚沛延;《中国优秀硕士学位论文全文数据库》;20090716;第I138-1011页 *

Also Published As

Publication number Publication date
CN109064472A (en) 2018-12-21
CN109003281A (en) 2018-12-14
CN109003281B (en) 2020-11-27
CN106934810A (en) 2017-07-07
CN106934810B (en) 2018-08-31

Similar Documents

Publication Publication Date Title
CN109064472B (en) Fitting method and device for fitting plane of three-dimensional space model of vertebra
US8698795B2 (en) Interactive image segmentation
CN102525662B (en) Three-dimensional visual tissue organ operation navigation system
JP6313024B2 (en) Method and system for automatically determining a localizer within a scout image
US20190355183A1 (en) Methods of Reconstructing Skulls
CN106960439B (en) A kind of vertebrae identification device and method
CN102651145B (en) Three-dimensional femoral model visualization method
CN107595387A (en) A kind of vertebra image generation system and spinal operation navigation positioning system based on ultrasonic rubbing technology
CN101189638B (en) Method and system for characterization of knee joint morphology
JP2015531923A (en) An improved method of correcting data for deformation during image guidance procedures
CN101216953A (en) Method for constructing three-dimensional model of skull
EP3654292B1 (en) Three-dimensional ultrasound image display method
CN113223028A (en) Multi-modal liver tumor segmentation method based on MR and CT
CN103099679A (en) Personalized lumbar internal fixation auxiliary device and manufacturing method thereof
CN108601512A (en) Systems and methods for providing surgical assistance in the presence of tissue deformation
CN108510506A (en) A kind of tubular structure image partition method
CN114298986A (en) Thoracic skeleton three-dimensional construction method and system based on multi-viewpoint disordered X-ray film
CN115361909B (en) Computer-implemented method for visualizing elongated anatomical structures
CN115222887A (en) A design method for face-based craniofacial skeletal surgery planning
Ün et al. An analytical method to create patient-specific deformed bone models using X-ray images and a healthy bone model
CN109979572B (en) Method and device for obtaining tangent plane of vertebral pedicle in three-dimensional vertebral model
CN101366639A (en) Three-dimensional modeling method of pectus pectus excavatum in children
CN115732060A (en) Spine osteotomy simulation method and device and electronic equipment
Pawar et al. PDE-constrained shape registration to characterize biological growth and morphogenesis from imaging data
CN107170009B (en) A method for measuring goggle base bending data based on medical images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant