The present application Claims for the priority benefit of the Chinese Patent Application CN 202010005911.9 with the Application Date of Jan. 3, 2020. The present application makes reference to the full text of the Chinese Patent Application above.
BACKGROUND OF THE INVENTION
Technical Field
The present invention relates to a computer technology, in particular to a perforation information processing method and device for a bone scaffold model.
Description of Related Art
In bone defect repair treatment, to repair the damaged bone structure, a bone scaffold needs to be designed and surgically implanted into the patient’s body. With the progress of research, it has been found that a bone scaffold with a porous structure can be combined with the host bone in a biological form, and the porosity, the pore size and the pore pattern of the porous structure of the bone scaffold all affect the combination in the biological form.
In the related art, methods of material science are mostly used to manufacture bone scaffolds with a porous structure through a special process, but the internal structures of the porous bone scaffolds generated by this method are uncertain.
Many researchers use computer-aided modeling methods to design bone scaffolds with a porous structure, and some of them use the three-dimensional model Boolean operation method to cut infarctate bone scaffold models by using a long cylinder or long rectangle from all directions. However, these methods require a large quantity of computation and are difficult to parallelize.
BRIEF SUMMARY OF THE INVENTION
An objective of the present invention is to overcome the defects in the related art, thereby providing a perforation information processing method and device for a bone scaffold model.
The objective of the present invention can be implemented by using the following technical solutions:
A perforation information processing method for a bone scaffold model includes:
- step S1: importing a nonporous-bone-scaffold initial model;
- step S2: segmenting the nonporous-bone-scaffold initial model into a plurality of unit lattices according to an input signal; and
- step S3: perforating each of the unit lattices, to obtain a porous bone scaffold model.
For a single unit lattice, step S3 specifically includes:
- step S31: drawing a first quantity of short girders in the unit lattice, to form a porous lattice template, wherein the first quantity is received from an input device;
- step S32: generating equidistant sampling points according to a specified sampling pitch in a model space in which the nonporous-bone-scaffold initial model is located;
- step S33: calculating shortest distances between each of the sampling points and all the short girders; and
- step S34: extracting, according to the generated sampling points, an isosurface according to a specified short girder cylinder radius by using an isosurface extraction algorithm, to perforate the unit lattices.
Step S31 specifically includes:
- step S311: selecting a plurality of key points in a cube range from coordinates (0, 0, 0) to (1, 1, 1);
- step S312: creating line segments between the generated key points, to form the short girders in the unit lattice; and
- step S313: checking whether there is a key point, of which a connectivity is still 1 after the lattices are laid densely, among the key points generated in step S21 in the structural diagram of the line segments generated in step S22, and returning to step S21 to regenerate key points if there is, otherwise, performing step S32.
Step S33 specifically includes:
- step S331: scaling a dimension of the unit lattice to a specified dimension, and densely filling the scaled unit lattices in the model space;
- step S332: assigning an initial value +∞ to distances of all the sampling points generated in step S32 in a distance field;
- step S333: traversing all lattices that are filled in step S331 and that possibly contribute to the shortest distances of the sampling points generated in step S3 in the distance field; and
- step S334: traversing short girders in all the lattices traversed in step S333, if the short girder is completely inside the nonporous-bone-scaffold initial model, updating shortest distance values of sampling points in a specified range near the short girder, if a part of the short girder is inside the nonporous-bone-scaffold initial model, calculating the part of the short girder inside the nonporous-bone-scaffold initial model, and updating the shortest distance values of the sampling points in a specific range nearby the part for the part.
Values in each region in step S334 are updated concurrently and independently.
A perforation information processing device for a bone scaffold model, includes a processor, a memory a program stored in the memory and performed by the processor, where when performing the program, the processor performs the following steps:
- step S1: importing a nonporous-bone-scaffold initial model;
- step S2: segmenting the nonporous-bone-scaffold initial model into a plurality of unit lattices according to an input signal; and
- step S3: perforating each of the unit lattices, to obtain a porous bone scaffold model.
Compared with the related art, the present invention has at least one of the following advantages.
- 1) Users have great autonomy in design and can completely customize the lattice structure.
- 2) The core computation steps can be highly parallelizable, which can greatly reduce the time required for computation.
BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS
The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.
FIG. 1 is a schematic flowchart of main steps of a method according to the present invention;
FIG. 2 is a schematic diagram of a nonporous bone scaffold model;
FIG. 3 is a structural diagram of a lattice in a porous bone scaffold; and
FIG. 4 is a specific structural diagram of a custom lattice.
DETAILED DESCRIPTION OF THE INVENTION
The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented on the premise of the technical solution of the present invention, and provides detailed implementations and a specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
As shown in FIG. 1, a perforation information processing method for a bone scaffold model is implemented in a manner of computer software, including:
- step S1: Import a nonporous-bone-scaffold initial model, shown in FIG. 2, with a following coordinate range: X: [-463,-315],Y: [189441].8: [428,70.1;
- step S2: segmenting the nonporous-bone-scaffold initial model into a plurality of unit lattices according to an input signal; and
- step S3: perforating each of the unit lattices, to obtain a porous bone scaffold model.
For a single unit lattice, step S3 specifically includes the following steps:
step S31: Draw a first quantity of short girders in the unit lattice, to form a porous lattice template, where the first quantity is received from an input device. Step S31 specifically includes:
- step S311: Select a plurality of key points in a cube range from coordinates (0, 0, 0 to 1, 1, 1), where 14 key points are specified as follows in this embodiment;
- step S312: Create line segments between the generated key points, to form the short girders in the unit lattice, where 16 line segments are created as follows in this embodiment; and
- step S313: Check whether there is a key point, of which a connectivity is still 1 after the lattices are laid densely, among the key points generated in step S21 in the structural diagram of the line segments generated in step S22, and return to step S21 to regenerate key points if there is, otherwise, perform step S32.
Step S32: Generate equidistant sampling points according to a specified sampling pitch in a model space in which the nonporous-bone-scaffold initial model is located;
In this embodiment, the sampling pitch ΔL = 0.1 is determined according to the model dimension ΔX = 15.4, ΔY = 25.2, ΔZ = 27.3 of the nonporous-bone-scaffold initial model, a specified lattice dimension LLattier = 2.5, and a specified short girder radius RGorder = 0.3
Then, according to the determined sampling pitch ΔL = 0.1, a total of N = 13867104 sampling points are created in a sampling range X: [-47.9,- 30.5], Y: [17.9,45.1], Z: [41.8, 71.1] of the model space where the nonporous-bone-scaffold initial model is located.
Step S33: Calculate shortest distances between each of the sampling points and all the short girders. Step S33 specifically includes:
- step S331: Scale a dimension of the unit lattice to a specified dimension, where in this embodiment, the dimension is enlarged from 1 × 1 × 1 to 2.5 × 2.5 × 2.5, and densely fill the scaled unit lattices in the model space;
- step S332: Assign an initial value +∞ to distances DN,Y,Z of the N sampling points generated in step S32 in a distance field;
- step S333: traversing all lattices that are filled in step S331 and that possibly contribute to the shortest distances of the sampling points generated in step S3 in the distance field; and
- step S334: Traverse short girders in all the lattices traversed in step S333, use an OBBTree data structure to speed up a determination of a positional relationship between the short girder and the non-porous model designed in step S1, if the short girder is completely inside the nonporous-bone-scaffold initial model, update shortest distance values of sampling points in a specified range near the short girder, if a part of the short girder is inside the nonporous-bone-scaffold initial model, calculate the part of the short girder inside the nonporous-bone-scaffold initial model, and update the shortest distance values DX,Y,Z of the sampling points in a specific range nearby the part for the part.
Values in each region in step S334 are updated concurrently and independently.
Step S34: Use a Marching-Cubes algorithm to extract an isosurface of which a value is RGender = 0.3 in the shortest distance values DX,Y,Z,that is, to obtain a final porous-bone-scaffold initial model.