Movatterモバイル変換


[0]ホーム

URL:


CN120086916B - Neck artery lumen geometric model construction system based on CTA image - Google Patents

Neck artery lumen geometric model construction system based on CTA image

Info

Publication number
CN120086916B
CN120086916BCN202510240289.2ACN202510240289ACN120086916BCN 120086916 BCN120086916 BCN 120086916BCN 202510240289 ACN202510240289 ACN 202510240289ACN 120086916 BCN120086916 BCN 120086916B
Authority
CN
China
Prior art keywords
data
model
module
user
plane
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
CN202510240289.2A
Other languages
Chinese (zh)
Other versions
CN120086916A (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJUfiledCriticalZhejiang University ZJU
Priority to CN202510240289.2ApriorityCriticalpatent/CN120086916B/en
Publication of CN120086916ApublicationCriticalpatent/CN120086916A/en
Application grantedgrantedCritical
Publication of CN120086916BpublicationCriticalpatent/CN120086916B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种基于CTA图像的颈动脉管腔几何模型构建系统,涉及图像处理技术领域,涵盖数据导入、体数据裁剪、交互式颈动脉管腔分割、3D模型构建、模型处理、模型裁剪、边界检测、出入口填充、STL文件导出等模块,各模块分工明确且有详细工作流程。本发明解决了现有几何建模方法依赖商业化软件、成本高、存在法律风险以及操作流程繁琐、速度慢等问题,能够简便、高效且精确地构建颈动脉几何模型,为动脉粥样硬化、动脉瘤等疾病的颈动脉流体动力学分析研究与诊断提供有力支持。

This invention discloses a system for constructing a carotid artery lumen geometry model based on CTA images. This system relates to the field of image processing technology and encompasses modules such as data import, volumetric data cropping, interactive carotid artery lumen segmentation, 3D model construction, model processing, model cropping, boundary detection, entrance and exit filling, and STL file export. Each module has a clear division of labor and a detailed workflow. This invention addresses the problems of existing geometric modeling methods, such as reliance on commercial software, high costs, legal risks, and cumbersome and slow operational procedures. By enabling simple, efficient, and accurate construction of carotid artery geometry models, this invention provides strong support for the analysis, research, and diagnosis of carotid artery fluid dynamics in diseases such as atherosclerosis and aneurysms.

Description

Neck artery lumen geometric model construction system based on CTA image
Technical Field
The invention relates to the technical field of image processing, in particular to a carotid artery lumen geometric model construction system based on a CTA image.
Background
At present, carotid artery hydrodynamic analysis has great significance for research and diagnosis of diseases such as atherosclerosis, aneurysms and the like in clinical medicine. The key to performing the hydrodynamic simulation is to build an accurate carotid artery geometric model. At present, the existing geometric modeling method has a plurality of defects:
Depending on commercial software, the medical image data (such as CTA image) is usually segmented and modeled by commercial software (such as MIMICS), and then model refinement is performed by using Geomagic and other software, so that the required geometric model can be obtained finally. This process requires multiple software to work together, not only is it costly, but also faces legal compliance issues, such as the risk of using pirated software.
The operation flow is complicated, the existing segmentation and modeling process is extremely complex, and the data transmission and processing among different software are involved. Because of the complex structure of commercialized software, even processing a simple carotid model, the speed is slow, and an efficient solution cannot be provided for related research and clinical application.
Therefore, how to simply, efficiently and accurately construct a carotid artery geometric model is a great need for solving the problem of those skilled in the art.
Disclosure of Invention
In view of the above, the invention provides a carotid artery lumen geometric model construction system based on CTA images, which solves the problems in the background art.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
a neck arterial lumen geometric model construction system based on CTA image comprises a data import module, a volume data clipping module, an interactive neck arterial lumen segmentation module, a 3D model construction module, a model processing module, a model clipping module, a boundary detection module, an entrance filling module and an STL file export module;
the data importing module is used for automatically importing carotid artery CTA image data from a folder appointed by a user and converting the carotid artery CTA image data into three-dimensional data;
the body data clipping module clips the imported three-dimensional body data VolumeData according to the clipping range selected by the user, and generates clipped child data;
the interactive carotid lumen segmentation module is used for automatically and manually segmenting the carotid lumen based on the subvolume data through user interaction;
The 3D model construction module is used for extracting surface grids from the segmented data to generate three-dimensional surface data so as to construct a preliminary three-dimensional geometric model;
the model processing module is used for carrying out smoothing processing on the obtained preliminary three-dimensional geometric model;
The model clipping module clips the preliminary three-dimensional geometric model through a user interactive selection plane;
the boundary detection module is used for identifying the boundary and the hole of the preliminary three-dimensional geometric model by analyzing the boundary of the grid;
the entrance filling module is used for filling the opening of the preliminary three-dimensional geometric model, extracting vertexes of the boundary of the three-dimensional geometric model, calculating a plane, filling a closed boundary area by a constraint Delaunay triangulation method, and generating a new patch to fill the opening;
and the STL file export module converts the processed three-dimensional geometric model data according to the STL file format and stores the data in ASCII codes.
Optionally, the workflow of the data importing module is as follows:
User selecting DICOM folder, wherein the user triggers folder selecting operation through the button of opening CTA file; at this time, the system pops up a folder selection dialog box, allowing the user to select a folder containing the DICOM file, after the user selects the folder, the system will acquire the path of the folder, and save it to the variable folderPath;
Reading DICOM data, namely using dicomread functions to read DICOM files from a folder path folderPath by a system, listing and reading all files meeting the conditions by the system if the selected folder contains the DICOM files, and extracting meta information in each DICOM file by the system in the reading process;
Processing DICOM data, namely judging whether the data is a multi-frame DICOM sequence by a system after the DICOM data is read, and if the data is the multi-frame DICOM sequence, sequencing a plurality of files according to InstanceNumber or SliceLocation by the system and stacking the files into three-dimensional volume data VolumeData;
Displaying data preview, namely after importing data, displaying slices of three-dimensional data by using orthosliceViewer by a system;
Updating the interface control, namely dynamically updating the slider control on the main interface according to the imported VolumeData size by the system.
Optionally, the workflow of the volume data clipping module is as follows:
Acquiring a cutting range, namely setting the cutting range of the data by a user through sliding the sliders at two ends of xRangeSlider, yRangeSlider, zRangeSlider on a graphical user interface after the data is imported;
Cutting the volume data, namely cutting VolumeData by the system by using xRange, yRange and zRange set by a user after the cutting range is set by the user to obtain sub-volume data subVolume;
The clipping results are displayed-the system displays the sub-volume data subVolume using orthosliceViewer.
Optionally, the workflow of the interactive carotid lumen segmentation module is:
Initializing and loading data, namely when a user firstly calls the module, the input data is child data subVolume, the system pops out a new interface, and firstly, the left side of the interface carries out preliminary binarization processing on the data according to initial thresholds thLow and thHigh to display a preliminary mask;
threshold adjustment and mask update, wherein after a user inputs a frame adjustment threshold through thLow and thHigh and clicks an update threshold button, the system regenerates a mask according to the new threshold;
The 3D region growing step, namely, selecting a seed point from a currently displayed slice by a user through clicking a region growing button, and determining the seed point through a carriage return key, wherein the seed point is used as a starting point of the region growing step, and the system uses a breadth-first searching method to carry out the region growing according to the position of the seed point and a current mask to obtain the whole region communicated with the seed point;
cutting to the mask, namely clicking a 'cutting to mask' button after a user is satisfied with the segmentation result, and cutting the volume data and the mask to a minimum bounding box of the mask;
mask preview, in all operations, the user always looks at the current mask situation in the 3D view in the lower right corner;
Export and end-user exports the segmentation result to MATLAB work area for subsequent processing.
Optionally, the workflow of the 3D model building module is:
Generating a three-dimensional surface by extracting a surface grid from the three-dimensional mask data ExportedMask by using isosurface functions, calculating an equivalent surface of the three-dimensional volume data by isosurface functions according to a set threshold value, and returning surface and vertex data on the surface, wherein the generated surface data and vertex data are used for constructing a three-dimensional geometric body;
simplifying the three-dimensional surface by using a reducepatch function and simplifying the surface by using a simplification proportion to obtain simplified surface data F2 and simplified vertex data V2;
Saving the simplified three-dimensional model as an STL file;
Presenting the exported STL model by reading the exported STL file using stlread functions, popping up a new graphical window to present the three-dimensional model, and allowing the user to interactively view the different perspectives of the model.
Optionally, the workflow of the model processing module is as follows:
Default smoothing, namely performing iterative smoothing on the input V2 and F2 by using SurfaceSmooth functions by using a module to obtain smoothed vertex data V_ smoothed after the processing is finished;
The manual processing comprises the steps of popping up an interface window after default smooth processing, and dividing a left 3D drawing area and a right operation panel in the window;
the system uses patchSmooth function to smooth the current model according to the global smooth factor set by the user based on weighted average method and update the vertex data;
The grid simplifying operation, in which a user adjusts the simplifying degree through a grid simplifying comparison slide bar and clicks a button of 'redrawing grid (reducepatch)', a system call reducepatch algorithm performs simplifying processing on the face data and the vertex data of the current model, and updated model data is displayed in a graphic window in real time;
and (3) recovering and exporting, namely if the user is not satisfied with the editing result, clicking a 'recovering original grid' button to recover the model data to an initial state, clicking a 'exporting grid (F, V) to a working area' button to export the finally edited model data to a MATLAB working area.
Optionally, the workflow of the model clipping module is as follows:
Initializing a graphical interface, namely when the clipping module is activated, firstly popping up an interface, wherein the interface comprises two areas:
The left display area is used for displaying the three-dimensional geometric model, drawing initial display of the grid through a patch function, and generating a model by vertex data and face data of the grid;
The right side operation panel comprises four input boxes for a user to input coordinates of four points required by a cutting plane and simultaneously provides buttons for determining the plane, cutting a model and reversely cutting the model;
plane definition and creation:
The user inputs four points of the plane, namely, in the initial condition, the four points (point 1, point2, point3 and point 4) of the clipping plane are predefined, after the user clicks a 'determine plane' button, the system calculates the equation of the plane according to the four points, and draws the plane in a left display area;
Calculating plane equation, namely calculating normal vector of the plane through the selected four points, and then calculating the plane equation by using the normal vector and the selected points;
drawing a plane, namely generating a grid in a region where the plane is positioned by using meshgrid functions according to the plane equation obtained by calculation, and calculating the z value of each point on the region;
Cutting model:
when a user clicks a 'cut' button, the geometric model is divided into two parts according to a plane shown on the left side;
Reverse cutting:
The function of the reverse clipping button is reverse to normal clipping, after the user clicks the button, the system will execute the same steps as clipping but will keep the opposite part to clipping model, and the result of the reverse clipping operation will update F_final and V_final as well and save to the working area.
Optionally, the workflow of the boundary detection module is as follows:
Extracting information of all sides from the grid F_final through a detect_mesh_boundary_and_holes function, sorting and de-duplicating all sides to obtain independent boundary sides, sequentially connecting adjacent vertexes until returning to a starting point by traversing the independent boundary sides to form a complete boundary, sorting in a descending order according to the quantity of the vertexes of the boundary, printing the quantity of the detected boundary, and popping up a graphic window to check the detected boundary.
Optionally, the working flow of the entrance filling module is as follows:
extracting boundary vertexes, namely acquiring vertex indexes loopIdx of each boundary, and extracting coordinates loopVerts of the boundary vertexes from a global vertex set V_final;
Calculating a best fit plane, namely calculating the mass center of the boundary vertex, and analyzing the main direction of the calculation plane by using a main component to determine a direction vector and a normal vector in the plane;
projecting each boundary vertex relative to the plane, calculating two-dimensional coordinates of the boundary vertex, and generating a two-dimensional coordinate set uv;
Performing Delaunay triangulation and mapping back to global coordinates, namely performing constraint Delaunay triangulation on the two-dimensional projection point set, screening effective triangles, and mapping vertex indexes of the two-dimensional triangles back to the global vertex coordinates V_final to obtain a new patch and filling polygons;
combining the filling patches with the original grid, namely storing the filling patches corresponding to each boundary into an F_patch, and combining the filling patches with the patches of the original grid to generate a new patch set F_new;
and displaying the result, namely displaying the filled grid by using a graphical interface.
Optionally, the workflow of the STL file export module is:
Opening the file and writing header information, namely using fopen to open STL file file_model. STL of default path, writing file header solidmodel, marking file start;
Traversing the triangle patches and writing data, namely acquiring three vertex coordinates corresponding to each triangle patch, wherein the indexes of the vertexes correspond to V_final through F_new, extracting three-dimensional coordinates (V1, V2 and V3) of the three vertexes of each triangle, calculating a vector, and writing normal vector and vertex data of each triangle by using fprintf;
Writing the tail and closing the file-writing endsolidmodel at the tail of the file, marking the end of the STL file, and then closing the file using fclose.
Compared with the prior art, the invention discloses a neck arterial lumen geometric model building system based on CTA images, which comprises modules of data import, volume data cutting, interactive neck arterial lumen segmentation, 3D model building, model processing, model cutting, boundary detection, entrance and exit filling, STL file export and the like, and the modules have definite work procedures. The invention solves the problems that the existing geometric modeling method depends on commercial software, has high cost, legal risk, complex operation flow, low speed and the like, can simply, conveniently, efficiently and accurately construct the carotid geometric model, and provides powerful support for carotid hydrodynamic analysis research and diagnosis of atherosclerosis, aneurysms and other diseases.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture provided by the present invention;
FIG. 2 is a schematic view of a CTA data slice preview provided by the present invention;
FIG. 3 is a schematic view of a preview of a cut CTA data slice provided by the present invention;
FIG. 4 is a schematic diagram of an interactive 3D segmentation tool according to the present invention;
FIG. 5 is a schematic diagram of a display derived STL model provided by the present invention;
FIG. 6 is a schematic diagram of a model processing interface provided by the present invention;
FIG. 7 is a schematic view of a model clipping interface provided by the present invention;
FIG. 8 is a schematic diagram of a boundary view interface provided by the present invention;
FIG. 9 is a schematic diagram of the original model and the boundary plane filling result provided by the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The embodiment of the invention discloses a neck arterial lumen geometric model building system based on a CTA image, which comprises a data importing module, a volume data clipping module, an interactive neck arterial lumen segmentation module, a 3D model building module, a model processing module, a model clipping module, a boundary detection module, an entrance filling module and an STL file exporting module;
the data importing module is used for automatically importing carotid artery CTA image data from a folder appointed by a user and converting the carotid artery CTA image data into three-dimensional data;
the body data clipping module clips the imported three-dimensional body data VolumeData according to the clipping range selected by the user, and generates clipped child data;
the interactive carotid lumen segmentation module is used for automatically and manually segmenting the carotid lumen based on the subvolume data through user interaction;
The 3D model construction module is used for extracting surface grids from the segmented data to generate three-dimensional surface data so as to construct a preliminary three-dimensional geometric model;
the model processing module is used for carrying out smoothing processing on the obtained preliminary three-dimensional geometric model;
The model clipping module clips the preliminary three-dimensional geometric model through a user interactive selection plane;
the boundary detection module is used for identifying the boundary and the hole of the preliminary three-dimensional geometric model by analyzing the boundary of the grid;
the entrance filling module is used for filling the opening of the preliminary three-dimensional geometric model, extracting vertexes of the boundary of the three-dimensional geometric model, calculating a plane, filling a closed boundary area by a constraint Delaunay triangulation method, and generating a new patch to fill the opening;
and the STL file export module converts the processed three-dimensional geometric model data according to the STL file format and stores the data in ASCII codes.
The following describes each module in detail:
Data importing module
The main function of the module is to automatically import carotid CTA (computed tomography) image data from a folder designated by a user and convert the carotid CTA image data into three-dimensional volume data for subsequent operation. The method comprises the following specific steps:
1.1 user selection of DICOM folder
First, the user triggers the folder selection operation through the "open CTA file" button on the interface. At this point, the system pops up a folder selection dialog allowing the user to select a folder containing DICOM files. After the user selects a folder, the system obtains the path of the folder and saves the path to variable folderPath.
1.2 Reading DICOM data
The system reads the DICOM file from the folder using dicomread functions from the folder path folderPath. If the selected folder contains DICOM files, the system will list and read all eligible files. During the reading process, the system will extract meta information in each DICOM file, such as pixel spacing PixelSpacing, slice thickness SLICETHICKNESS, etc., and store it in VolumeInfo.
1.3 Processing DICOM data
After the DICOM data is read, the system determines whether the data is a multi-frame DICOM sequence. In the case of a multi-frame DICOM sequence, the system sorts the files by InstanceNumber or SliceLocation and stacks them into three-dimensional volume data VolumeData.
1.4 Display data previews
After importing the data, the system will display slices of the three-dimensional data using orthosliceViewer (as shown in FIG. 2). Thus, the user can intuitively view the imported CTA data, and the user can view different sections through the yellow lines in the slider map.
1.5 Update interface control
The system dynamically updates the slider control (xRangeSlider, yRangeSlider, zRangeSlider) on the main interface (as shown in FIG. 1) based on the imported VolumeData sizes (i.e., number of rows, columns, and slices of data). The sliders are respectively used for setting a data cutting range, and the minimum value and the maximum value of the sliders are automatically adjusted according to the size VolumeData so as to ensure that a user can select a reasonable cutting interval.
Volume data clipping module
The main function of the volume data clipping module is to clip the imported three-dimensional volume data VolumeData according to the clipping range selected by the user, and generate clipped sub-volume data subVolume. The module can dynamically adjust the child data according to the clipping range set by the user. The specific flow is as follows:
2.1 obtaining the clipping Range
After the data is imported, the user sets the clipping range of the data by sliding the sliders at two ends of xRangeSlider, yRangeSlider, zRangeSlider on the graphical user interface. These sliders correspond to the x-axis (column), y-axis (row) and z-axis (slice) directions of the data, respectively. These values are saved in xRange, yRange and zRange variables.
2.2 Clipping volume data
After the user sets the clipping range, the system clips VolumeData using xRange, yRange and zRange set by the user, resulting in child data subVolume. subVolume is clipped child data, containing the user selected region. It is a subset of VolumeData, the size being determined by the clipping range set by the user.
2.3 Displaying the clipping results
The system uses orthosliceViewer to display the subvolume data subVolume, as shown in fig. 3, so that the user can see a multi-slice view of subVolume, conveniently and intuitively viewing the data.
Interactive carotid artery lumen segmentation module
The main function of the interactive carotid lumen segmentation module is to automatically and manually segment the carotid lumen based on the subvolume data subVolume through user interaction. The module combines the technologies of threshold segmentation, manual editing masking, region growing and the like, provides a real-time three-dimensional preview function, and is convenient for users to accurately adjust and modify segmentation results. The specific flow is as follows:
3.1 initialization and data Loading
When the user first invokes the module, the data entered is child data subVolume. The system pops up a new interface (as shown in fig. 4), and the left side of the interface firstly carries out preliminary binarization processing on the data according to initial thresholds thLow and thHigh to display a preliminary mask. At this point, all voxels in the subvolume data subVolume that meet the threshold range will be marked as true, with the remainder being false. The upper right corner of the interface is an operation area, the lower right corner of the interface can preview the 3D mask view, and a user can rotate to view.
3.2 Threshold adjustment and mask update
After the user enters the box adjustment threshold through thLow and thHigh and clicks the "update threshold" button, the system regenerates the mask according to the new threshold. The updated mask will be displayed on the current slice and the 3D mask view will be updated simultaneously.
3.3 Manual editing mask
When the user wishes to make fine adjustments to the automatic segmentation results, the manual editing mode may be entered via a "manually add mask" or "manually erase mask" button. The system allows the user to add or erase mask areas on the current slice by way of free sketching.
The freely delineated region is immediately applied to the current slice and the 3D view is updated. By manual editing, the user can precisely adjust the segmentation result.
3.43D region growth
By clicking the "region growing" button, the user can select a seed point in the currently displayed slice, and the seed point is determined by the enter key. The seed point is used as a starting point of region growth, and the system uses a Breadth First Search (BFS) method to perform region growth according to the position of the seed point and the current mask to obtain the whole region communicated with the seed point.
The results of the region growing will be incorporated into the current mask, resulting in updated segmentation results and simultaneous updating of the slice display and 3D view.
The updated segmentation results may continue to manually edit the mask and 3D region growing operations multiple times until a user-satisfactory effect is achieved.
3.5 Clipping to mask
When the user is satisfied with the segmentation result, the user may click on the "cut to mask" button, cutting the volume data and mask to the mask's minimum bounding box. The clipping operation reduces the size of the data to a minimum region containing all true voxels, thereby eliminating redundant blank regions and reducing the calculation amount of subsequent processing.
The cut data is updated to the system and the range of the slicing slide bar is updated, so that the follow-up operation is ensured to be carried out in the cut area.
3.63D mask preview
In all operations, the user can always view the current mask situation in the lower right 3D view. The view generates a 3D isosurface through isosurface, which helps the user to intuitively see the three-dimensional effect of the mask. If the mask area is empty, the system will display a hint in the 3D view.
3.7 Derivation and end
The user can export the segmentation results (masks and data) to the MATLAB work area for subsequent processing. After clicking the "export mask to workspace" button, the current mask will be saved as ExportedMask for subsequent use by other modules.
3D model construction module
The module may convert the three-dimensional mask data ExportedMask into a model suitable for three-dimensional modeling and simulation and export into an STL file.
4.1 Generating a three-dimensional surface:
A isosurface function is used to extract the surface mesh from the three-dimensional mask data ExportedMask. The isosurface function calculates the iso-surface (surface) of the three-dimensional volumetric data from the set threshold (typically 0.5) and returns the surface and vertex data on the surface. The generated face data (F) and vertex data (V) are used to construct a three-dimensional geometry. Surface data (Faces) of the three-dimensional surface, representing that each triangle surface is connected by three vertices. Vertex data (Vertices) representing the three-dimensional coordinates of each vertex of the surface.
4.2 Simplifying the three-dimensional surface:
Since isosurface functions can generate very complex surface meshes, containing too many faces and vertices, simplification of these meshes is often required. The surface is simplified by reducepatch functions using a reduction ratio (e.g., 0.5, 50% of the surface is retained) to obtain reduced surface data F2 and reduced vertex data V2. The reducepatch function can effectively reduce redundant surfaces, maintain the basic shape of the surface and optimize subsequent calculation and storage.
4.3 Saving the simplified three-dimensional model as an STL file:
The reduced three-dimensional surface data is saved as an STL file format using stlwrite functions. STL format is widely used in 3D printing and CAD tools. The file name defaults to ExportedMask _ surface. Stl, modifications may be made as desired.
4.4 Shows derived STL model:
The derived STL file is read using stlread functions, and a new graphical window is popped up to reveal the three-dimensional model (as shown in fig. 5). And allows the user to interactively view different perspectives of the model.
Model processing module
The main purpose of the module is to smooth the preliminary three-dimensional geometric model obtained by the previous steps so as to eliminate the irregularity and noise on the surface of the model and improve the geometric shape. The specific flow and key variables are described as follows:
5.1 default smooth handling
The module defaults smooth processing at first, specifically uses SurfaceSmooth function to carry out iterative smooth processing to input V2 and F2, and its core idea is that the neighborhood information of each vertex is utilized, the positions of the vertices are adjusted by calculating the normal vector and the area weight of the adjacent surface, so that the whole grid tends to smooth, and local sharp and noise is reduced. Damping factor (DampingFactor) is used in the process to suppress oscillations, ensuring that the vertex movement is within the allowed range until either a preset displacement tolerance (default 0.02) is met or a maximum number of iterations (default 100) is reached. After the processing is completed, smoothed vertex data v_ smoothed is obtained.
5.2 Manual handling
After the module defaults to smooth, an interface window (as shown in fig. 6) is popped up, in which a left 3D drawing area and a right operation panel are divided. In the operation panel, a slide bar and buttons for parameters such as global smoothness, grid simplification, etc. are set. The default smooth model data (F2, V_ smoothed) is displayed on the left 3D plot area using the patch function.
5.3 Global smooth operation
The user adjusts the smoothing parameters via the global smoothing factor slider and clicks the "global smoothing" button. The system uses patchSmooth functions to smooth the current model according to the global smoothness factor set by the user based on a weighted average method, and updates vertex data.
After the processing is completed, the graphic window displays the updated model, and the user can intuitively see the change before and after the smoothing.
5.4 Grid reduction operations
The user adjusts the degree of simplification by the grid simplification vs. the slider bar and clicks the "redraw grid (reducepatch)" button.
And the system call reducepatch algorithm simplifies the surface data and the vertex data of the current model, reduces redundant surfaces and vertices and improves the calculation efficiency of the model.
The updated model data is displayed in real time in the graphical window.
5.5 Recovery and export
If the user is not satisfied with the editing result, the user can click on the 'restore original grid' button to restore the model data to the initial state.
The user may also click on the export grid (F, V) to workspace button to export the final edited model data (EDITEDFACES, EDITEDVERTICES) to MATLAB workspace.
Model cutting module
The module tailors the three-dimensional geometric model by user-interactively selecting a plane. The user can define a plane by specifying four points, and then divide or crop the model into desired portions using the plane. The module provides three functions, namely, determining a plane, a clipping model and a reverse clipping model, and updating and displaying an operation result in real time in a left graphical interface.
6.1. Initializing a graphical interface
When the cropping module is activated, an interface is first popped up (as shown in FIG. 7). The interface contains two regions:
and the left display area is used for displaying the three-dimensional geometric model and drawing initial display of the grid through the patch function. Vertex data and face data of the mesh are used to generate a model.
The right side operation panel comprises four input boxes for the user to input the coordinates of four points needed by the clipping plane, and simultaneously provides buttons of 'determining plane', 'clipping model', 'reverse clipping model'.
6.2. Plane definition and creation
The user inputs four points of the plane-initially, four points of the clipping plane (point 1, point2, point3, point 4) are already predefined. The user can modify the coordinate values of the points, and after clicking the 'determine plane' button, the system calculates the equation of the plane according to the four points, and draws the plane in the left display area.
Plane equation calculation by selecting four points, firstly calculating the normal vector of the plane, and then calculating the plane equation by using the normal vector and the selected points. The standard form of the plane equation is ax+by+cz=d, where (a, b, c) is the normal vector and d is a constant term.
Drawing a plane, namely generating a grid in a region where the plane is located by using meshgrid functions according to the plane equation obtained by calculation, and calculating the z value of each point on the region. The plane is then drawn using surf functions.
6.3. Cutting model
When the user clicks the "crop" button, the geometric model (EDITEDFACES, EDITEDVERTICES) is split into two parts according to the plane shown on the left.
6.3.1 Clipping triangles
The signed distances of the three vertices of each triangle to the plane are calculated.
The polygons are clipped using clipPolygonWithPlane functions. The function processes each vertex according to the plane position, if one vertex is above the plane, the vertex is reserved, otherwise, the intersection point is calculated by interpolation according to the intersection point formula and added into the cut polygon, and then the polygon is converted into a plurality of triangles.
6.3.2 Judgment of reserved portion
For each vertex, its signed distance to the plane is calculated. By this distance, it is determined whether the vertex is above or below the plane. If the distance is greater than or equal to zero, the vertex is above the plane, otherwise, the vertex is below the plane. If the "clip" button, the portion above the plane remains.
Multiple cuts can be made by setting different planes.
After each clipping is completed, the system automatically saves the clipped new face data F_final and vertex data V_final to a working area for subsequent operation.
6.4. Reverse cutting
The function of the "reverse crop" button is to reverse the normal crop. After the user clicks this button, the system will perform the same steps as clipping, but will leave the opposite part of the clipping model. The result of the reverse clipping operation also updates F_final and V_final and saves to the workspace.
Boundary detection module
The module identifies the boundaries and holes of the model by analyzing the boundaries of the mesh. By computing the boundary information in the triangular mesh, the module can accurately find the topology of all the boundaries and holes and return a list of boundaries and holes.
All side information is extracted from the grid F final by the detect_mesh_boundary_and_holes function. The edges are ordered and de-duplicated to obtain independent boundary edges. By traversing these independent edges, adjacent vertices are connected in turn until they return to the starting point, forming a complete boundary. Only boundaries containing at least three different vertices are considered valid boundaries. The valid boundaries are added to the boundaries list. And sorting in descending order according to the number of the vertexes of the boundary. boundaries is a list containing all valid boundaries, each represented by a set of vertex indices. And prints the number of detected boundaries while popup graphical windows view the detected boundaries (as shown in fig. 8). The vertex coordinates of each boundary are plotted with different colors (red, green, blue, etc.) and line widths (2).
The correct model will contain 3 borders-one inlet, two outlets of the carotid artery.
Entrance filling module
The module is filled at the opening (boundary) of the mould. By extracting vertices of the boundary, computing planes, and filling the closed boundary region by the constrained Delaunay triangulation method, new patches are generated to fill the openings.
8.1 Extracting boundary vertices the vertex index loopIdx for each boundary is obtained and the coordinates loopVerts for these vertices are extracted from the global vertex set v_final.
8.2 Calculating a best fit plane by calculating the centroid of the boundary vertices and calculating the principal direction of the plane using Principal Component Analysis (PCA), determining the direction vector and the normal vector in the plane. PCA provides a plane in which the first two principal components (direction vectors) define the direction in the plane, and the third principal component is the normal vector. These direction vectors will be used to project points in three-dimensional space onto a plane.
8.3 Projecting three-dimensional vertices into a plane, projecting each boundary vertex relative to the plane, calculating its two-dimensional coordinates, and generating a two-dimensional set of coordinates uv.
And 8.4, performing Delaunay triangulation and mapping back to global coordinates, namely performing constraint Delaunay triangulation on the two-dimensional projection point set, screening effective triangles, and mapping vertex indexes of the two-dimensional triangles back to the global vertex coordinates V_final to obtain a new patch and filling polygons.
8.5 Combining the filled dough sheet with the original grid:
And storing the filling patches corresponding to each boundary into the F_patch, and combining the filling patches with patches of the original grid to generate a new patch set F_new.
8.6 Shows the results:
the filled grid is displayed using a graphical interface in which the original grid is displayed in a translucent blue color. The filled dough piece is highlighted in red (as shown in fig. 9).
STL file export module
The module is used for converting the processed three-dimensional grid data (comprising the vertex and the patch information) according to the STL file format and storing the three-dimensional grid data in ASCII codes.
9.1 Opening the file and writing header information:
STL file file_model. STL of default path (current working folder) is opened using fopen and written into file header solidmodel, marking the start of the file.
9.2 Traversing triangle patches and writing data:
For each triangular patch (each row in f_new), three vertex coordinates corresponding to the patch are obtained, and the indices of the vertices correspond to v_final through f_new. For each triangle, three-dimensional coordinates (v 1, v2, v 3) of its three vertices are extracted. Calculate the normal vector and write the normal vector and vertex data for each triangle using fprintf.
9.3 Write tail and close file:
writing endsolidmodel at the tail of the file, marking the end of the STL file, and closing the file by using fclose to ensure the storage integrity of the file.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

Translated fromChinese
1.一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,包括:数据导入模块、体数据裁剪模块、交互式颈动脉管腔分割模块、3D模型构建模块、模型处理模块、模型裁剪模块、边界检测模块、出入口填充模块、STL文件导出模块;1. A system for constructing a carotid artery lumen geometric model based on CTA images, comprising: a data import module, a volume data cropping module, an interactive carotid artery lumen segmentation module, a 3D model construction module, a model processing module, a model cropping module, a boundary detection module, an entrance and exit filling module, and an STL file export module;数据导入模块,从用户指定的文件夹中自动导入颈动脉CTA影像数据,并将其转化为三维体数据;The data import module automatically imports carotid CTA image data from the user-specified folder and converts it into three-dimensional volume data;体数据裁剪模块,根据用户选择的裁剪范围,对导入的三维体数据VolumeData进行裁剪,生成裁剪后的子体数据;The volume data clipping module clips the imported 3D volume data VolumeData according to the clipping range selected by the user and generates clipped sub-volume data;交互式颈动脉管腔分割模块的,通过用户交互,基于子体数据对颈动脉管腔进行自动及手动分割;The interactive carotid artery lumen segmentation module automatically and manually segments the carotid artery lumen based on sub-volume data through user interaction;3D模型构建模块,对分割后的数据进行提取表面网格,生成三维表面数据,进而构建初步三维几何模型;The 3D model construction module extracts surface meshes from the segmented data, generates three-dimensional surface data, and then constructs a preliminary three-dimensional geometric model;模型处理模块,对获得的初步三维几何模型进行光滑处理;The model processing module performs smoothing on the obtained preliminary three-dimensional geometric model;模型裁剪模块,通过用户交互式选择平面来裁剪初步三维几何模型;Model clipping module, which clips the preliminary 3D geometric model through interactive selection of planes by the user;边界检测模块,通过分析网格的边界来识别初步三维几何模型的边界和孔洞;Boundary detection module, which identifies the boundaries and holes of the preliminary 3D geometric model by analyzing the boundaries of the mesh;出入口填充模块,在初步三维几何模型的开口处进行填充,通过提取三维几何模型边界的顶点,计算平面,并通过约束性Delaunay三角剖分方法填充闭合的边界区域,生成新的面片来填充开口处;The entrance and exit filling module fills the openings of the preliminary 3D geometric model by extracting the vertices of the 3D geometric model boundary, calculating the plane, and filling the closed boundary area through the constrained Delaunay triangulation method to generate new patches to fill the openings;STL文件导出模块,将处理完成的三维几何模型数据,按照STL文件格式转换,并以ASCII编码保存。The STL file export module converts the processed 3D geometric model data into the STL file format and saves it in ASCII encoding.2.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述数据导入模块的工作流程为:2. The CTA image-based carotid artery lumen geometric model construction system according to claim 1, wherein the workflow of the data import module is as follows:用户选择DICOM文件夹:用户通过界面上的**“打开CTA文件”**按钮触发文件夹选择操作;此时,系统弹出文件夹选择对话框,允许用户选择包含DICOM文件的文件夹;用户选择文件夹后,系统会获取该文件夹的路径,保存至变量folderPath中;User selects a DICOM folder: The user triggers the folder selection operation by clicking the "Open CTA File" button on the interface. At this time, the system pops up a folder selection dialog box, allowing the user to select the folder containing the DICOM file. After the user selects the folder, the system obtains the folder path and saves it to the variable folderPath.读取DICOM数据:系统使用dicomread函数从文件夹路径folderPath从文件夹中读取DICOM文件;如果选择的文件夹中包含DICOM文件,系统会将所有符合条件的文件列出并读取;读取的过程中,系统会提取每个DICOM文件中的元信息;Read DICOM data: The system uses the dicomread function to read DICOM files from the folder path folderPath; if the selected folder contains DICOM files, the system will list and read all qualified files; during the reading process, the system will extract the metadata in each DICOM file;处理DICOM数据:在DICOM数据读取完成后,系统会判断数据是否为多帧DICOM序列;如果是多帧DICOM序列,系统会将多个文件按照InstanceNumber或SliceLocation进行排序,并将其堆叠成三维体数据VolumeData;Processing DICOM data: After reading the DICOM data, the system will determine whether the data is a multi-frame DICOM sequence. If it is a multi-frame DICOM sequence, the system will sort the multiple files by InstanceNumber or SliceLocation and stack them into 3D volume data.显示数据预览:导入数据后,系统将使用orthosliceViewer显示三维数据的切片;用户通过滑动图中的黄线查看不同切面;Display data preview: After importing data, the system will use orthosliceViewer to display slices of 3D data; users can view different slices by sliding the yellow lines in the diagram;更新界面控件:系统根据导入的VolumeData的尺寸动态更新主界面上的滑块控件。Update interface controls: The system dynamically updates the slider controls on the main interface based on the size of the imported VolumeData.3.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述体数据裁剪模块的工作流程为:3. The CTA image-based carotid artery lumen geometric model construction system according to claim 1, wherein the workflow of the volume data clipping module is as follows:获取裁剪范围:在数据导入后,用户通过滑动图形用户界面上xRangeSlider、yRangeSlider、zRangeSlider两端的滑块,设置数据的裁剪范围;Get the cropping range: After the data is imported, the user sets the data cropping range by sliding the sliders xRangeSlider, yRangeSlider, and zRangeSlider on the graphical user interface.裁剪体数据:在用户设定裁剪范围后,系统使用用户设定的xRange、yRange和zRange对VolumeData进行裁剪,得到子体数据subVolume;Crop volume data: After the user sets the crop range, the system uses the user-set xRange, yRange, and zRange to crop VolumeData to obtain sub-volume data subVolume;显示裁剪结果:系统使用orthosliceViewer显示子体数据subVolume。Display cropping results: The system uses orthosliceViewer to display the sub-volume data subVolume.4.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述交互式颈动脉管腔分割模块的工作流程为:4. The CTA image-based carotid artery lumen geometric model construction system according to claim 1, wherein the workflow of the interactive carotid artery lumen segmentation module is as follows:初始化与数据加载:用户首先调用该模块时,输入的数据是子体数据subVolume;系统弹出新的界面,界面左边首先根据初始阈值thLow、thHigh对数据进行初步的二值化处理显示初步蒙版mask;Initialization and data loading: When the user first calls this module, the input data is subVolume data; the system pops up a new interface, and the left side of the interface first performs preliminary binarization processing on the data according to the initial thresholds thLow and thHigh to display the preliminary mask;阈值调整与蒙版更新:用户通过thLow和thHigh输入框调整阈值,点击“更新阈值”按钮后,系统根据新的阈值重新生成蒙版mask;Threshold adjustment and mask update: Users adjust the threshold through the thLow and thHigh input boxes. After clicking the "Update Threshold" button, the system regenerates the mask based on the new threshold;3D区域生长:通过点击“区域生长”按钮,用户在当前显示的切片中选择一个种子点,通过回车键确定种子点;该种子点将作为区域生长的起点,系统使用广度优先搜索方法根据种子点的位置和当前的蒙版mask进行区域生长,得到与种子点联通的整个区域;区域生长的结果将被合并到当前的蒙版中,得到更新的分割结果,并同步更新切片显示和3D视图;3D Region Growing: By clicking the "Region Growing" button, the user selects a seed point in the currently displayed slice and confirms the seed point by pressing the Enter key. The seed point will serve as the starting point for region growing. The system uses a breadth-first search method to grow the region based on the position of the seed point and the current mask to obtain the entire region connected to the seed point. The result of region growing will be merged into the current mask to obtain an updated segmentation result, and the slice display and 3D view will be updated synchronously.裁剪到蒙版:当用户对分割结果满意后,点击“裁剪到蒙版”按钮,将体数据和蒙版裁剪到蒙版的最小包围盒;Crop to Mask: When the user is satisfied with the segmentation result, click the "Crop to Mask" button to crop the volume data and mask to the minimum bounding box of the mask;蒙版预览:在所有操作中,用户始终在右下角的3D视图中查看当前的蒙版情况;Mask preview: During all operations, users can always view the current mask status in the 3D view in the lower right corner;导出与结束:用户将分割结果导出到MATLAB工作区,以便后续处理。Export and End: The user exports the segmentation results to the MATLAB workspace for subsequent processing.5.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述3D模型构建模块的工作流程为:5. The CTA image-based carotid artery lumen geometric model construction system according to claim 1, wherein the workflow of the 3D model construction module is as follows:生成三维表面:使用isosurface函数从三维蒙版数据ExportedMask中提取出表面网格;isosurface函数根据设置的阈值计算三维体积数据的等值面,并返回表面上的面和顶点数据;生成的面数据和顶点数据会用于构建三维几何体;Generate a 3D surface: Use the isosurface function to extract the surface mesh from the 3D mask data ExportedMask; the isosurface function calculates the isosurface of the 3D volume data based on the set threshold and returns the face and vertex data on the surface; the generated face data and vertex data are used to construct the 3D geometry;简化三维表面:通过reducepatch函数,使用简化比例对表面进行简化,得到简化后的面数据F2,简化后的顶点数据V2;Simplify the three-dimensional surface: Use the reducepatch function to simplify the surface using the simplification ratio to obtain the simplified face data F2 and the simplified vertex data V2;将简化后的三维模型保存为STL文件;Save the simplified 3D model as an STL file;展示导出的STL模型:使用stlread函数读取导出的STL文件,弹出一个新的图形窗口展示三维模型,并允许用户交互式地查看模型的不同视角。Display the exported STL model: Use the stlread function to read the exported STL file, pop up a new graphics window to display the 3D model, and allow users to interactively view different perspectives of the model.6.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述模型处理模块的工作流程为:6. The system for constructing a carotid artery lumen geometric model based on CTA images according to claim 1, wherein the workflow of the model processing module is as follows:默认光滑处理:模块首先默认光滑处理,具体是使用SurfaceSmooth函数对输入的V2和F2进行迭代平滑处理,处理完成后,得到光滑后的顶点数据V_smoothed;Default smoothing: The module first performs default smoothing. Specifically, it uses the SurfaceSmooth function to iteratively smooth the input V2 and F2. After the processing is completed, the smoothed vertex data V_smoothed is obtained.手动处理:默认光滑处理后,弹出界面窗口,在该窗口中划分出左侧的3D绘图区域和右侧的操作面板;使用patch函数将默认光滑处理的模型数据显示在左侧的3D绘图区域;Manual processing: After the default smoothing process, an interface window pops up, which divides the 3D drawing area on the left and the operation panel on the right. Use the patch function to display the model data with the default smoothing process in the 3D drawing area on the left.全局光滑操作:用户通过全局光滑因子滑条调整平滑参数,并点击“全局光滑”按钮;系统使用patchSmooth函数,基于加权平均法对当前模型根据用户设置的全局光滑因子进行平滑处理,并更新顶点数据;处理完成后,图形窗口将更新模型显示;Global smoothing operation: The user adjusts the smoothing parameters using the global smoothing factor slider and clicks the "Global Smooth" button. The system uses the patchSmooth function to smooth the current model based on the global smoothing factor set by the user based on the weighted average method and updates the vertex data. After the processing is completed, the graphics window will update the model display.网格简化操作:用户通过网格简化比滑条调整简化程度,并点击“重画网格(reducepatch)”按钮;系统调用reducepatch算法对当前模型的面数据和顶点数据进行简化处理,更新后的模型数据会实时显示在图形窗口中;Mesh simplification operation: Users adjust the simplification level using the Mesh Simplification Ratio slider and click the "Redraw Mesh (Reducepatch)" button; the system calls the Reducepatch algorithm to simplify the face data and vertex data of the current model, and the updated model data is displayed in real time in the graphics window;恢复与导出:若用户对编辑结果不满意,点击“恢复原始网格”按钮,将模型数据恢复到初始状态;以及点击“导出网格(F,V)到工作区”按钮,将最终编辑好的模型数据导出到MATLAB工作区。Restore and export: If the user is not satisfied with the editing results, click the "Restore original mesh" button to restore the model data to its initial state; and click the "Export mesh (F, V) to workspace" button to export the final edited model data to the MATLAB workspace.7.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述模型裁剪模块的工作流程为:7. The system for constructing a carotid artery lumen geometric model based on CTA images according to claim 1, wherein the workflow of the model clipping module is as follows:初始化图形界面:裁剪模块被激活时,首先会弹出一个界面,界面包含两个区域:Initialize the graphical interface: When the cropping module is activated, an interface will pop up first. The interface consists of two areas:左侧显示区域:用于展示三维几何模型,并通过patch函数绘制网格的初始显示,网格的顶点数据和面数据用于生成模型;The left display area is used to display the 3D geometric model and draw the initial display of the mesh through the patch function. The vertex data and face data of the mesh are used to generate the model.右侧操作面板:包含四个输入框,用于用户输入裁剪平面所需的四个点的坐标,同时提供“确定平面”、“裁剪模型”、“反向裁剪模型”按钮;The right operation panel: contains four input boxes for users to enter the coordinates of the four points required for the clipping plane, and also provides "Confirm Plane", "Clip Model", and "Reverse Clip Model" buttons;平面定义与创建:Plane definition and creation:用户输入平面四个点:初始情况下,裁剪平面的四个点(point1,point2,point3,point4)已经预定义;用户点击“确定平面”按钮后,系统会根据四个点计算出平面的方程,并在左侧显示区域绘制该平面;The user enters four points on the plane: Initially, the four points of the clipping plane (point1, point2, point3, point4) are predefined. After the user clicks the "Confirm Plane" button, the system calculates the plane equation based on the four points and draws the plane in the display area on the left.平面方程计算:通过选择的四个点,首先计算平面的法向量,然后利用法向量和选定的点计算平面方程;Plane equation calculation: First calculate the normal vector of the plane by selecting four points, and then calculate the plane equation using the normal vector and the selected points;绘制平面:根据计算得到的平面方程,使用meshgrid函数在平面所在区域生成网格,并计算该区域上每个点的z值;然后利用surf函数绘制平面;Draw a plane: Based on the calculated plane equation, use the meshgrid function to generate a grid in the area where the plane is located, and calculate the z value of each point in the area; then use the surf function to draw the plane;裁剪模型:Cutting the model:当用户点击“裁剪”按钮时,根据左侧所示的平面将几何模型分为两个部分;When the user clicks the “Crop” button, the geometric model is divided into two parts according to the plane shown on the left;反向裁剪:Reverse cropping:“反向裁剪”按钮的功能是与正常裁剪相反;用户点击此按钮后,系统会执行与裁剪相同的步骤,但会保留与裁剪模型相反的部分;反向裁剪操作的结果同样会更新F_final和V_final,并保存到工作区。The function of the "Reverse Cropping" button is the opposite of normal cropping. After the user clicks this button, the system will perform the same steps as cropping, but will retain the opposite part of the cropped model. The result of the reverse cropping operation will also update F_final and V_final and save them to the workspace.8.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述边界检测模块的工作流程为:8. The system for constructing a carotid artery lumen geometric model based on CTA images according to claim 1, wherein the workflow of the boundary detection module is as follows:通过detect_mesh_boundary_and_holes函数从网格F_final中提取所有边的信息;对所有边进行排序和去重,得到独立的边界边;通过遍历独立的边界边,依次连接相邻的顶点,直到回到起点,形成一个完整的边界;根据边界的顶点数量进行降序排序,并打印检测到的边界数量,同时弹出图形窗口进行检测到的边界查看。Extract all edge information from the mesh F_final using the detect_mesh_boundary_and_holes function. Sorting and deduplicating all edges yields independent boundary edges. Traversing the independent boundary edges, connecting adjacent vertices in sequence until returning to the starting point, forming a complete boundary. Sort the boundary edges in descending order based on the number of vertices, print the number of detected boundaries, and pop up a graphics window to view the detected boundaries.9.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述出入口填充模块的工作流程为:9. The system for constructing a carotid artery lumen geometric model based on CTA images according to claim 1, wherein the workflow of the inlet and outlet filling module is as follows:提取边界顶点:获取每个边界的顶点索引loopIdx,并从全局顶点集合V_final中提取边界顶点的坐标loopVerts;Extract boundary vertices: Get the vertex index loopIdx of each boundary and extract the coordinates loopVerts of the boundary vertex from the global vertex set V_final;计算最佳拟合平面:通过计算边界顶点的质心,并使用主成分分析计算平面的主方向,确定平面内的方向向量和法向量;Calculate the best-fit plane: Determine the direction vector and normal vector within the plane by calculating the centroid of the boundary vertices and using principal component analysis to calculate the main directions of the plane;将三维顶点投影到平面内:将每个边界顶点相对于平面投影,计算其二维坐标,并生成二维坐标集uv;Project the 3D vertices into the plane: Project each boundary vertex relative to the plane, calculate its 2D coordinates, and generate a 2D coordinate set uv;进行Delaunay三角剖分并映射回全局坐标:对二维投影点集进行约束性Delaunay三角剖分,筛选有效三角形后,将二维三角形的顶点索引映射回全局顶点坐标V_final,得到新的面片并填充多边形;Perform Delaunay triangulation and map back to global coordinates: Perform constrained Delaunay triangulation on the two-dimensional projected point set, filter out valid triangles, and then map the vertex indices of the two-dimensional triangles back to the global vertex coordinates V_final to obtain a new face and fill the polygon;合并填充面片与原始网格:将每个边界对应的填充面片存储到F_patch,并与原始网格的面片合并,生成新的面片集合F_new;Merge the filled patches with the original mesh: store the filled patches corresponding to each boundary into F_patch and merge them with the patches of the original mesh to generate a new patch set F_new;显示结果:使用图形界面展示填充后的网格。Display results: Use a graphical interface to display the filled grid.10.根据权利要求1所述的一种基于CTA图像的颈动脉管腔几何模型构建系统,其特征在于,所述STL文件导出模块的工作流程为:10. The system for constructing a carotid artery lumen geometric model based on CTA images according to claim 1, wherein the workflow of the STL file export module is as follows:打开文件并写入头部信息:使用fopen打开默认路径的STL文件filled_model.stl,并写入文件头部solidmodel,标志着文件开始;Open the file and write header information: Use fopen to open the STL file filled_model.stl in the default path and write the file header solidmodel to mark the beginning of the file;遍历三角形面片并写入数据:对每个三角形面片,获取该面片对应的三个顶点坐标,这些顶点的索引通过F_new与V_final相对应;对于每个三角形,提取其三个顶点的三维坐标(v1,v2,v3),计算法向量,并使用fprintf写入每个三角形的法向量和顶点数据;Traverse the triangle patch and write data: For each triangle patch, get the coordinates of the three vertices corresponding to the patch. The indices of these vertices correspond to V_final through F_new; for each triangle, extract the three-dimensional coordinates of its three vertices (v1, v2, v3), calculate the normal vector, and use fprintf to write the normal vector and vertex data of each triangle;写入尾部并关闭文件:在文件尾部写入endsolid model,标志STL文件结束,然后使用fclose关闭文件。Write to the end and close the file: Write endsolid model at the end of the file to mark the end of the STL file, and then use fclose to close the file.
CN202510240289.2A2025-03-032025-03-03Neck artery lumen geometric model construction system based on CTA imageActiveCN120086916B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202510240289.2ACN120086916B (en)2025-03-032025-03-03Neck artery lumen geometric model construction system based on CTA image

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202510240289.2ACN120086916B (en)2025-03-032025-03-03Neck artery lumen geometric model construction system based on CTA image

Publications (2)

Publication NumberPublication Date
CN120086916A CN120086916A (en)2025-06-03
CN120086916Btrue CN120086916B (en)2025-08-19

Family

ID=95853981

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202510240289.2AActiveCN120086916B (en)2025-03-032025-03-03Neck artery lumen geometric model construction system based on CTA image

Country Status (1)

CountryLink
CN (1)CN120086916B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107330888A (en)*2017-07-112017-11-07中国人民解放军第三军医大学Each chamber dividing method of dynamic heart based on CTA images
CN108765363A (en)*2018-03-242018-11-06语坤(北京)网络科技有限公司A kind of automatic after-treatment systems of coronary artery CTA based on artificial intelligence

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP7678479B2 (en)*2019-11-222025-05-16ザ・リージェンツ・オブ・ザ・ユニバーシティ・オブ・ミシガン Anatomical and functional assessment of coronary artery disease using machine learning
CN110910374A (en)*2019-11-252020-03-24华中科技大学同济医学院附属协和医院 Aortic image intelligent processing system and method
CN116934938A (en)*2023-07-142023-10-24阿里巴巴达摩院(杭州)科技有限公司Three-dimensional model texture processing method, apparatus and storage medium
CN118710812A (en)*2024-06-282024-09-27南京工业大学 A 3D reconstruction method for neurosurgical images based on surface rendering

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107330888A (en)*2017-07-112017-11-07中国人民解放军第三军医大学Each chamber dividing method of dynamic heart based on CTA images
CN108765363A (en)*2018-03-242018-11-06语坤(北京)网络科技有限公司A kind of automatic after-treatment systems of coronary artery CTA based on artificial intelligence

Also Published As

Publication numberPublication date
CN120086916A (en)2025-06-03

Similar Documents

PublicationPublication DateTitle
Owada et al.A sketching interface for modeling the internal structures of 3d shapes
US7613539B2 (en)System and method for mesh and body hybrid modeling using 3D scan data
Ji et al.Easy mesh cutting
Turquin et al.A sketch-based interface for clothing virtual characters
KR101955035B1 (en)Method for designing a geometrical three-dimensional modeled object
Massarwi et al.Papercraft models using generalized cylinders
US10867435B2 (en)System and method for generating planar section 3D shape representations
CN109685914A (en)Cutting profile based on triangle grid model mends face algorithm automatically
CN108711194B (en)Three-dimensional grid model splicing method based on cubic B spline interpolation
WO2021068061A1 (en)System and method for generating 3d models from specification documents
CN111462306A (en) 3D hair parametric model method based on sparse localized decomposition of volume vector field
CN101082985A (en)Decompounding method for three-dimensional object shapes based on user easy interaction
CN120086916B (en)Neck artery lumen geometric model construction system based on CTA image
CN112819108B (en)Slice fusion method and system of multi-source heterogeneous model and storage medium
BrownInteractive part selection for mesh and point models using hierarchical graph-cut partitioning
Wang et al.Progressive sketching with instant previewing
Ponciano et al.Graph-based interactive volume exploration
Kaplan et al.Producing Models From Drawings of Curved Surfaces.
CN103460252B (en)A method for reconstructing a 3d surface from a 2d sketch
JP2006277713A (en) Feature ridge line extraction device, program, and method for three-dimensional mesh model
CA2864700A1 (en)System and method for generating planar section 3d shape representations
Bendels et al.Image and 3D-Object Editing with Precisely Specified Editing Regions.
BurlaImproved normal estimation from cross-section drawings
CN117635749A (en)2D clothing template generation method, generation system, electronic equipment and storage medium
Wang et al.Enhancing sketching and sculpting for shape modeling

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp