Voxel-level segmentation method based on three-dimensional medical image
By converting three-dimensional medical image data into spherical coordinate systems and building curvature voxel space, voxel clustering is performed based on curvature similarity, the problem of inaccuracy in the traditional Chinese medicine image segmentation in the prior art is solved, and higher segmentation accuracy and real-time performance are achieved.
Patent Information
- Application Number
- CN202510292610.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-27
AI Technical Summary
Existing medical image segmentation methods are difficult to accurately capture details when processing medical images with complex anatomical structures and irregular boundaries, resulting in inaccurate segmentation results.
By converting the voxel coordinates under the three-dimensional rectangular coordinate system into coordinates under the spherical coordinate system, the curvature voxel space is constructed, and voxel clustering is performed based on the curvature similarity of neighborhoods, and the voxel size and shape are dynamically adjusted to adapt to the characteristics of different regions.
Improves the ability to capture irregular boundaries, improves the segmentation accuracy and real-timeness of sparse or fuzzy areas.
Smart Images

Figure CN120219418A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image segmentation, and particularly to a voxel-level segmentation method based on three-dimensional medical images. Background Art
[0002] In the field of medical image analysis, traditional medical image segmentation methods, such as those based on thresholding, region growing, graph theory, or machine learning, although achieving certain effects in specific application scenarios, often have difficulty accurately capturing details when dealing with medical images having complex anatomical structures and irregular boundaries, resulting in inaccurate segmentation results; most of the medical image segmentation methods in the prior art perform segmentation based on a fixed voxel size, which ignores the radial distribution characteristics of medical image data; in medical images, the density and contrast of different tissues and organs often vary in the radial distance, so using voxels of a fixed size for segmentation will lead to inaccurate segmentation in sparse or blurred regions;
[0003] Therefore, in view of the above problems, a voxel-level segmentation method based on three-dimensional medical images is proposed herein. By converting the voxel coordinates in a three-dimensional Cartesian coordinate system into coordinates in a spherical coordinate system, a curvature voxel space is constructed, and voxel clustering is performed based on neighborhood curvature similarity, thereby achieving accurate segmentation of medical images. Summary of the Invention
[0004] In order to overcome the problem that in the process of using the medical image segmentation method of the prior art in daily use, the density and contrast of different tissues and organs vary in the radial distance, and using voxels of a fixed size for segmentation will lead to inaccurate segmentation in sparse or blurred regions.
[0005] The technical solution of the present invention is as follows: A voxel-level segmentation method based on three-dimensional medical images, comprising the following steps:
[0006] S1: Input three-dimensional medical image data, and convert the voxel coordinates in a three-dimensional Cartesian coordinate system into coordinates in a spherical coordinate system;
[0007] S2: Dynamically define the size and shape of curvature voxels according to the radial distribution characteristics of the medical image, and construct a curvature voxel grid for the entire image space in the spherical coordinate system;
[0008] S3: Through a hash-based sparse voxel management mechanism, map each voxel to a unique hash key according to its spherical coordinate position, and establish a neighborhood index;
[0009] S4: Calculate the curvature similarity between each voxel and its neighborhood voxels, and merge similar voxels into larger clustering units according to the curvature similarity;
[0010] S5: Refine the initially obtained clustering results and output the final voxel-level segmentation results.
[0011] Preferably, the three-dimensional medical image data in step S1 includes data represented in voxel form of CT and MRI. The coordinate transformation step in step S1 is specifically: converting the voxel coordinates (x, y, z) in the three-dimensional rectangular coordinate system to the coordinates (r, θ, φ) in the spherical coordinate system, where r is the radial distance, θ is the azimuth angle, and φ is the polar angle. The conversion formula is:
[0012]
[0013]
[0014]
[0015] Preferably, in step S2, the size of the curvature voxels is dynamically adjusted according to the radial distance r and the preset scale factors α and β. The calculation formula is: voxel size = α · r^β.
[0016] Preferably, in step S2, the specific steps for constructing the curvature voxel grid of the entire image space are:
[0017] S201: Based on the maximum radial distance r max of the image data, the range of the azimuth angle θ, and the range of the polar angle φ, determine the range of the image space in the spherical coordinate system and initialize an empty curvature voxel grid structure;
[0018] S202: For each (r, θ, φ) coordinate point in the image space, calculate the size of the curvature voxel at this point using the formula "voxel size = α · r^β" according to the preset scale factors α and β, where r is the radial distance of the current point, and α and β are parameters controlling the rate of change of the voxel size with the radial distance;
[0019] S203: Discretize the continuous coordinate space into a voxel grid. The position of each voxel is represented by the coordinates (r, θ, φ) of its center point. Based on the calculated voxel size, determine the specific position of each voxel in the spherical coordinate system;
[0020] S204: Fill the determined voxel information into the initialized curvature voxel grid structure. The voxel information includes the position and size. Allocate storage space for each voxel and record its adjacency relationship and voxel attributes.
[0021] Preferably, in step S3, through a hash-based sparse voxel management mechanism, map each voxel to a unique hash key according to its spherical coordinate position and establish a neighborhood index. The specific steps are:
[0022] S301: For each voxel, construct a hash function according to its spherical coordinate position (r, θ, φ) to generate a unique hash key;
[0023] S302: Create a hash table to store the mapping relationship between voxel information and its hash key. Insert the hash key of each voxel as the key and the voxel information as the value into the hash table;
[0024] S303: Define the range of neighboring voxels according to the spherical coordinate position of the voxel. Among them, the neighboring voxels are located in the radial, azimuthal, and polar angle directions near the current voxel;
[0025] S304: For each voxel, calculate the spherical coordinate positions of all its neighboring voxels and generate corresponding hash keys;
[0026] S305: Look up the hash keys of these neighboring voxels in the hash table to establish an index relationship between the current voxel and its neighboring voxels;
[0027] Among them, in the step S301, the specific hash function H is expressed as:
[0028] H(r, θ, φ) = (r * P1 + θ * P2 + φ * P3) mod M; where r, θ, φ are the radial distance, azimuth angle, and polar angle of the voxel respectively; P1, P2, P3 are large prime numbers; M is the size of the hash table, and mod represents the modulo operation.
[0029] Preferably, in the step S304, calculating the spherical coordinate positions of all its neighboring voxels and generating corresponding hash keys, the specific steps are:
[0030] S3041: Set a radial offset Δr, which represents the number of voxels moved forward and backward in the radial direction, set an azimuthal offset Δθ, which represents the number of voxels moved left and right in the azimuthal direction, and set a polar angle offset Δφ, which represents the number of voxels moved up and down in the polar angle direction;
[0031] S3042: For each voxel with spherical coordinates (r, θ, φ), traverse all possible combinations of neighboring offsets. For the radial offset, calculate the new radial coordinate r' = r ± Δr. For the azimuthal offset, calculate the new azimuthal coordinate θ' = θ ± Δθ. For the polar angle offset, calculate the new polar angle coordinate φ' = φ ± Δφ;
[0032] S3043: For each calculated spherical coordinate position (r', θ', φ') of the neighboring voxel, use the hash function H(r, θ, φ) = (r * P1 + θ * P2 + φ * P3) mod M to generate the corresponding hash key. Substitute the spherical coordinate position of the neighboring voxel into the hash function to obtain the hash key H(r', θ', φ');
[0033] S3044: Store the generated neighborhood voxel hash key together with the hash key of the current voxel.
[0034] Preferably, in the step S4, the curvature similarity is defined based on the change in gray value between voxels and the geometric feature of the gradient direction, and the curvature similarity calculation formula is:
[0035]
[0036] where I1 and I2 are the gray values of two voxels, and σ is the standard deviation parameter for similarity calculation.
[0037] Preferably, in the step S4, calculate the curvature similarity between each voxel and its neighborhood voxels, and merge similar voxels into larger clustering units according to the curvature similarity. The specific steps are as follows:
[0038] S401: Create a matrix to store the curvature similarity between each voxel and its neighborhood voxels. The size of the matrix is N×K, where N is the total number of voxels and K is the number of neighborhood voxels of each voxel;
[0039] S402: For each voxel in the image space, obtain all the neighborhood voxels of the current voxel according to the neighborhood index established in step S3;
[0040] S403: Calculate the gray value difference between the current voxel and each neighborhood voxel by subtracting the gray values, obtain the gradient direction by calculating the gradient vector of each voxel, and measure the gradient direction difference between the current voxel and each neighborhood voxel by calculating the angular difference of the vectors;
[0041] S404: Use the formula to calculate the curvature similarity between the current voxel and each neighborhood voxel;
[0042] S405: Set a similarity threshold T according to the characteristics of the medical image data and the segmentation requirements;
[0043] S406: Compare the similarity values for each element in the similarity matrix. If the similarity value between the current voxel and a neighborhood voxel is greater than or equal to the threshold T, then these two voxels are considered similar;
[0044] S407: Merge the similar voxels into the same clustering unit;
[0045] S408: Update the merged similarity matrix;
[0046] S409: Repeat steps S402 - S408 until no more voxels can be merged into the existing clustering units based on the current threshold T.
[0047] Preferably, the condition for merging similar voxels in steps S406 - S407 is that the similarity exceeds a threshold T, that is, if the similarity > T, then the voxels are merged.
[0048] Preferably, in step S5, the initially obtained clustering result is refined, and the refined clustering result is output as the result of voxel - level segmentation, where the refinement process includes removing isolated voxels and merging smaller clustering units into the nearest larger clustering unit. The specific steps are as follows:
[0049] S501: Traverse all voxels, check the neighborhood of each voxel. If there are no other voxels belonging to the same clustering unit in the neighborhood of a voxel, then it is regarded as an isolated voxel and removed;
[0050] S502: Set a minimum clustering size threshold Smin;
[0051] S503: Traverse all clustering units, calculate the size of each clustering unit. For clustering units with a size less than Smin, find the nearest larger clustering unit and merge them;
[0052] S504: Save the refined clustering information as a database record and output the final segmentation result.
[0053] Advantages of the present invention:
[0054] By converting three - dimensional coordinates into a spherical coordinate system, constructing a curvature voxel space, and combining the radial distribution characteristics of medical images through curvature voxel primitives, the present invention dynamically adjusts the shape and size of voxels to adapt to regions with different distances and densities. In the clustering stage, voxels are merged through neighborhood curvature similarity, improving the ability to capture irregular boundaries; thus, through adaptive curvature voxel clustering and sparse optimization, the segmentation accuracy and real - time performance for sparse or fuzzy regions are improved. Brief Description of the Drawings
[0055] Figure 1 Shown is a schematic flow chart of the steps of the voxel - level segmentation method based on three - dimensional medical images of the present invention;
[0056] Figure 2 Shown is a schematic diagram of the steps for constructing a curvature voxel grid of the image space in the voxel - level segmentation method based on three - dimensional medical images of the present invention. Detailed Embodiments
[0057] The present invention will be further described below in conjunction with the drawings and embodiments.
[0058] Please refer to Figure 1 - Figure 2, the present invention provides an embodiment: a voxel-level segmentation method based on three-dimensional medical images, comprising the following steps:
[0059] S1: Input three-dimensional medical image data, and convert the voxel coordinates in the three-dimensional Cartesian coordinate system into coordinates in the spherical coordinate system;
[0060] S2: Dynamically define the size and shape of curvature voxels according to the radial distribution characteristics of the medical image, and construct a curvature voxel grid for the entire image space in the spherical coordinate system;
[0061] S3: Through a hash-based sparse voxel management mechanism, map each voxel to a unique hash key according to its spherical coordinate position, and establish a neighborhood index;
[0062] S4: Calculate the curvature similarity between each voxel and its neighboring voxels, and merge similar voxels into larger clustering units according to the curvature similarity;
[0063] S5: Refine the initially obtained clustering result and output the final voxel-level segmentation result.
[0064] Preferably, the three-dimensional medical image data in step S1 includes data represented in voxel form of CT and MRI. The coordinate conversion step in step S1 is specifically: converting the voxel coordinates (x, y, z) in the three-dimensional Cartesian coordinate system into coordinates (r, θ, φ) in the spherical coordinate system, where r is the radial distance, θ is the azimuth angle, and φ is the polar angle. The conversion formula is:
[0065]
[0066]
[0067]
[0068] Preferably, in step S2, the size of the curvature voxel is dynamically adjusted according to the radial distance r and preset scale factors α and β. The calculation formula is: voxel size = α · r^β.
[0069] Preferably, in step S2, the specific steps for constructing the curvature voxel grid for the entire image space are:
[0070] S201: Based on the maximum radial distance r max of the image data, the range of the azimuth angle θ, and the range of the polar angle φ, determine the range of the image space in the spherical coordinate system, and initialize an empty curvature voxel grid structure;
[0071] S202: For each (r, θ, φ) coordinate point in the image space, according to the preset scale factors α and β, use the formula "voxel size = α·r^β" to calculate the curvature voxel size of this point, where r is the radial distance of the current point, and α and β are parameters that control the rate of change of the voxel size with the radial distance;
[0072] S203: Discretize the continuous coordinate space into a voxel grid. The position of each voxel is represented by the coordinates (r, θ, φ) of its center point. Based on the calculated voxel size, determine the specific position of each voxel in the spherical coordinate system;
[0073] S204: Fill the determined voxel information into the initialized curvature voxel grid structure. The voxel information includes the position and size. Allocate storage space for each voxel and record its adjacency relationship and voxel attributes.
[0074] Preferably, in step S3, through a hash-based sparse voxel management mechanism, map each voxel to a unique hash key according to its spherical coordinate position, and establish a neighborhood index. The specific steps are as follows:
[0075] S301: For each voxel, construct a hash function based on its spherical coordinate position (r, θ, φ) to generate a unique hash key;
[0076] S302: Create a hash table for storing the mapping relationship between voxel information and its hash key. Insert the hash key of each voxel as the key and the voxel information as the value into the hash table;
[0077] S303: Define the range of its neighboring voxels according to the spherical coordinate position of the voxel. Among them, the neighboring voxels are located in the radial, azimuthal, and polar angle directions near the current voxel;
[0078] S304: For each voxel, calculate the spherical coordinate positions of all its neighboring voxels and generate the corresponding hash keys;
[0079] S305: Look up the hash keys of these neighboring voxels in the hash table and establish the index relationship between the current voxel and its neighboring voxels;
[0080] Among them, in step S301, the specific hash function H is expressed as:
[0081] H(r, θ, φ) = (r*P1 + θ*P2 + φ*P3) mod M; where r, θ, and φ are the radial distance, azimuthal angle, and polar angle of the voxel respectively; P1, P2, and P3 are large prime numbers; M is the size of the hash table, and mod represents the modulo operation.
[0082] Preferably, in step S304, calculate the spherical coordinate positions of all its neighboring voxels and generate corresponding hash keys. The specific steps are as follows:
[0083] S3041: Set a radial offset Δr, which represents the number of voxels moved forward and backward in the radial direction. Set an azimuthal offset Δθ, which represents the number of voxels moved left and right in the azimuthal direction. Set a polar angle offset Δφ, which represents the number of voxels moved up and down in the polar angle direction.
[0084] S3042: For each voxel with spherical coordinates (r, θ, φ), traverse all possible combinations of neighborhood offsets. For the radial offset, calculate the new radial coordinate r' = r ± Δr. For the azimuthal offset, calculate the new azimuthal coordinate θ' = θ ± Δθ. For the polar angle offset, calculate the new polar angle coordinate φ' = φ ± Δφ.
[0085] S3043: For each calculated spherical coordinate position (r', θ', φ') of the neighboring voxel, use the hash function H(r, θ, φ) = (r * P1 + θ * P2 + φ * P3) mod M to generate the corresponding hash key. Substitute the spherical coordinate position of the neighboring voxel into the hash function to obtain the hash key H(r', θ', φ').
[0086] S3044: Store the generated hash keys of the neighboring voxels together with the hash key of the current voxel.
[0087] Preferably, in step S4, the curvature similarity is defined based on the gray value change and the geometric feature of the gradient direction between voxels. The curvature similarity calculation formula is:
[0088]
[0089] where I1 and I2 are the gray values of two voxels, and σ is the standard deviation parameter for similarity calculation.
[0090] Preferably, in step S4, calculate the curvature similarity between each voxel and its neighboring voxels, and merge similar voxels into larger clustering units according to the curvature similarity. The specific steps are as follows:
[0091] S401: Create a matrix to store the curvature similarity between each voxel and its neighboring voxels. The size of the matrix is N × K, where N is the total number of voxels and K is the number of neighboring voxels of each voxel.
[0092] S402: For each voxel in the image space, obtain all the neighboring voxels of the current voxel according to the neighborhood index established in step S3.
[0093] S403: Calculate the grayscale value difference between the current voxel and each neighboring voxel by subtracting the grayscale values, obtain the gradient direction by calculating the gradient vector of each voxel, and measure the gradient direction difference between the current voxel and each neighboring voxel by calculating the angular difference of the vectors;
[0094] S404: Use the formula to calculate the curvature similarity between the current voxel and each neighboring voxel;
[0095] S405: Set a similarity threshold T according to the characteristics of the medical image data and the segmentation requirements;
[0096] S406: Compare the similarity values for each element in the similarity matrix. If the similarity value between the current voxel and a neighboring voxel is greater than or equal to the threshold T, then these two voxels are considered similar;
[0097] S407: Merge the similar voxels into the same clustering unit;
[0098] S408: Update the similarity matrix after merging;
[0099] S409: Repeat steps S402 - S408 until no more voxels can be merged into the existing clustering units based on the current threshold T.
[0100] Preferably, the condition for merging similar voxels in steps S406 - S407 is that the similarity exceeds the threshold T, that is, if the similarity > T, then merge the voxels.
[0101] Preferably, in step S5, refine the initially obtained clustering result and output the refined clustering result as the result of voxel - level segmentation. The refinement process includes removing isolated voxels and merging smaller clustering units into the nearest larger clustering unit. The specific steps are as follows:
[0102] S501: Traverse all voxels, check the neighborhood of each voxel. If there are no other voxels belonging to the same clustering unit in the neighborhood of a voxel, then regard it as an isolated voxel and remove it;
[0103] S502: Set a minimum clustering size threshold Smin;
[0104] S503: Traverse all clustering units, calculate the size of each clustering unit. For clustering units with a size less than Smin, find the nearest larger clustering unit and merge them;
[0105] S504: Save the refined clustering information as a database record and output the final segmentation result.
[0106] Embodiment
[0107] Optionally, set a certain hospital where a doctor needs to precisely segment the brain CT images of a patient for better analysis of the lesion area. Traditional medical image segmentation methods often have difficulty accurately capturing details when dealing with brain images with complex anatomical structures and irregular boundaries. Therefore, the doctor decides to adopt the voxel-level segmentation method based on three-dimensional medical images proposed in the present invention.
[0108] The specific implementation steps are as follows:
[0109] A1: Input three-dimensional medical image data: Input the brain CT image data of the patient into the system, and the image data is represented in voxel form.
[0110] A2: Coordinate transformation: Convert the voxel coordinates in the three-dimensional rectangular coordinate system to the coordinates in the spherical coordinate system to better adapt to the radial distribution characteristics of the brain image.
[0111] A3: Construct a curvature voxel grid: Dynamically define the size and shape of the curvature voxels according to the radial distribution characteristics of the image data, and construct a curvature voxel grid for the entire image space in the spherical coordinate system.
[0112] A4: Establish a neighborhood index: Through a hash-based sparse voxel management mechanism, map each voxel to a unique hash key according to its spherical coordinate position, and establish a neighborhood index for quickly finding neighboring voxels.
[0113] A5: Calculate curvature similarity and merge voxels: Calculate the curvature similarity between each voxel and its neighboring voxels, and merge similar voxels into larger clustering units according to the curvature similarity.
[0114] A6: Refinement processing and output results: Refine the initially obtained clustering results, including removing isolated voxels and merging smaller clustering units into the nearest larger clustering units, and finally output the final voxel-level segmentation results.
[0115] The following are the comparison data between the method of the present invention and traditional medical image segmentation methods in the brain CT image segmentation task:
[0116] Segmentation method Segmentation accuracy rate (%) Segmentation time (seconds) Traditional method (based on threshold) 82.5 120 Traditional method (based on region growing) 85.0 120 Traditional method (based on graph theory) 87.0 180 Method of the present invention 92.0 90
[0117] The following analysis results are obtained through the above embodiments:
[0118] 1. The segmentation accuracy rate of the method of the present invention reaches 92.0%, which is much higher than 82.5%, 85.0% and 87.0% of the traditional methods. This shows that the method of the present invention can more accurately capture details and improve the segmentation accuracy when dealing with brain images with complex anatomical structures and irregular boundaries.
[0119] 2. The segmentation time of the method of the present invention is 90 seconds, which is much lower than 120 seconds, 150 seconds and 180 seconds of the traditional methods; this indicates that the method of the present invention improves the segmentation efficiency and reduces the processing time by optimizing the algorithm and data structure.
[0120] The embodiments of the present invention have been described in detail above in conjunction with the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made without departing from the gist of the present invention within the scope of knowledge possessed by those skilled in the art.
Claims
1. A voxel-level segmentation method based on three-dimensional medical images, characterized in that: The following steps are involved: S1: input three-dimensional medical image data and convert voxel coordinates in a three-dimensional rectangular coordinate system into coordinates in a spherical coordinate system; S2: According to the radial distribution characteristics of medical images, the size and shape of the curvature voxel are dynamically defined, and the curvature voxel grid of the entire image space is constructed in the spherical coordinate system; S3: Through the hash-based sparse voxel management mechanism, each voxel is mapped to a unique hash key according to its spherical coordinate position, and a neighborhood index is established; S4: Calculate the curvature similarity between each voxel and its neighboring voxels, and merge similar voxels into larger clustering units based on the curvature similarity; S5: Refine the preliminary clustering results and output the final voxel-level segmentation results.
2. The voxel-level segmentation method based on three-dimensional medical images according to claim 1, characterized in that: The three-dimensional medical image data in step S1 includes data represented in the form of voxels of CT and MRI. The coordinate conversion step in step S1 is specifically: converting the voxel coordinates (x, y, z) in the three-dimensional rectangular coordinate system into coordinates (r, θ, φ) in the spherical coordinate system, where r is the radial distance, θ is the azimuth angle, and φ is the polar angle. The conversion formula is:
3. The voxel-level segmentation method based on three-dimensional medical images according to claim 1, characterized in that: In step S2, the size of the curvature voxel is dynamically adjusted according to the radial distance r and the preset scale factors α and β, and the calculation formula is: voxel size = α·r^β.
4. The voxel-level segmentation method based on three-dimensional medical images according to claim 1, characterized in that: In step S2, the specific steps of constructing the curvature voxel grid of the entire image space are: S201: Maximum radial distance r based on image data max , the range of the azimuth angle θ and the range of the polar angle φ, determine the range of the image space in the spherical coordinate system, and initialize an empty curvature voxel grid structure; S202: For each (r, θ, φ) coordinate point in the image space, the curvature voxel size of the point is calculated according to the preset scale factors α and β using the formula "voxel size = α·r^β", where r is the radial distance of the current point, and α and β are parameters that control the rate at which the voxel size changes with the radial distance; S203: discretizing the continuous coordinate space into a voxel grid, wherein the position of each voxel is represented by the coordinates (r, θ, φ) of its center point, and determining the specific position of each voxel in the spherical coordinate system based on the calculated voxel size; S204: Fill the determined voxel information into the initialized curvature voxel grid structure, the voxel information including position and size, allocate storage space for each voxel, and record its adjacency relationship and voxel attributes.
5. The voxel-level segmentation method based on three-dimensional medical images according to claim 1, characterized in that: In step S3, a hash-based sparse voxel management mechanism is used to map each voxel to a unique hash key according to its spherical coordinate position, and a neighborhood index is established. The specific steps are as follows: S301: For each voxel, construct a hash function to generate a unique hash key according to its spherical coordinate position (r, θ, φ); S302: Create a hash table for storing the mapping relationship between voxel information and its hash key, and insert the hash key of each voxel as the key and the voxel information as the value into the hash table; S303: defining the range of its neighboring voxels according to the spherical coordinate position of the voxel, wherein the neighboring voxels are located in radial, azimuthal and polar directions near the current voxel; S304: For each voxel, calculate the spherical coordinate positions of all its neighboring voxels and generate corresponding hash keys; S305: searching the hash keys of these neighboring voxels in the hash table, and establishing an index relationship between the current voxel and its neighboring voxels; Wherein, in step S301, the specific hash function H is expressed as: H(r,θ,φ)=(r*P1+θ*P2+φ*P3)modM; where r, θ, and φ are the radial distance, azimuth, and polar angle of the voxel, respectively; P1, P2, and P3 are large prime numbers; M is the size of the hash table, and mod represents the modulo operation.
6. The voxel-level segmentation method based on three-dimensional medical images according to claim 5, characterized in that: In step S304, the spherical coordinate positions of all neighboring voxels are calculated and corresponding hash keys are generated. The specific steps are as follows: S3041: setting a radial offset Δr, which indicates the number of voxels moving forward and backward in the radial direction, setting an azimuth offset Δθ, which indicates the number of voxels moving left and right in the azimuth direction, and setting a polar offset Δφ, which indicates the number of voxels moving up and down in the polar direction; S3042: For each voxel, whose spherical coordinates are (r, θ, φ), traverse all possible neighborhood offset combinations, for radial offset, calculate a new radial coordinate r'=r±Δr, for azimuth offset, calculate a new azimuth coordinate θ'=θ±Δθ, for polar offset, calculate a new polar coordinate φ'=φ±Δφ; S3043: For each calculated spherical coordinate position (r', θ', φ') of the neighboring voxel, a hash function H(r, θ, φ) = (r*P1+θ*P2+φ*P3) mod M is used to generate a corresponding hash key, and the spherical coordinate position of the neighboring voxel is substituted into the hash function to obtain a hash key H(r', θ', φ'); S3044: Store the generated neighborhood voxel hash key together with the hash key of the current voxel.
7. The voxel-level segmentation method based on three-dimensional medical images according to claim 1, characterized in that: In step S4, the curvature similarity is defined based on the geometric features of the gray value change and gradient direction between voxels, and the curvature similarity calculation formula is: Where I1 and I2 are the grayscale values of the two voxels, and σ is the standard deviation parameter for similarity calculation.
8. The voxel-level segmentation method based on three-dimensional medical images according to claim 7, characterized in that: In step S4, the curvature similarity between each voxel and its neighboring voxels is calculated, and similar voxels are merged into larger clustering units according to the curvature similarity. The specific steps are: S401: Create a matrix to store the curvature similarity between each voxel and its neighboring voxels, the size of the matrix is N×K, where N is the total number of voxels and K is the number of neighboring voxels of each voxel; S402: For each voxel in the image space, according to the neighborhood index established in step S3, all neighboring voxels of the current voxel are obtained; S403: calculating the gray value difference between the current voxel and each neighboring voxel by gray value subtraction, obtaining the gradient direction by calculating the gradient vector of each voxel, and calculating the gradient direction difference between the current voxel and each neighboring voxel by measuring the angle difference of the vector; S404: Using formula Calculate the curvature similarity between the current voxel and each neighboring voxel; S405: setting a similarity threshold T according to the characteristics of the medical image data and the segmentation requirements; S406: comparing similarity values for each element in the similarity matrix, if the similarity value between the current voxel and a neighboring voxel is greater than or equal to a threshold T, the two voxels are considered to be similar; S407: merging similar voxels into the same clustering unit; S408: Update the merged similarity matrix; S409: Repeat steps S402-S408 until no more voxels can be merged into the existing clustering unit based on the current threshold T.
9. The voxel-level segmentation method based on three-dimensional medical images according to claim 8, characterized in that: The condition for merging similar voxels in steps S406-S407 is that the similarity exceeds a threshold value T, that is, if the similarity>T, the voxels are merged.
10. The voxel-level segmentation method based on three-dimensional medical images according to claim 1, characterized in that: In step S5, the clustering result obtained initially is refined, and the refined clustering result is output as the result of voxel-level segmentation, wherein the refinement includes removing isolated voxels and merging smaller clustering units into the nearest larger clustering unit, and the specific steps are as follows: S501: traverse all voxels and check the neighborhood of each voxel. If there is no other voxel belonging to the same clustering unit in the neighborhood of a voxel, it is regarded as an isolated voxel and removed; S502: Setting a minimum cluster size threshold Smin; S503: traverse all clustering units, calculate the size of each clustering unit, and for a clustering unit whose size is smaller than Smin, find its nearest larger clustering unit and merge them; S504: Save the refined clustering information as a database record and output the final segmentation result.
Citation Information
Cited By
Three-dimensional heart image reconstruction system
CN121120982A
Three-dimensional medical image data segmentation and reconstruction method and system
CN122066896A