Tomographic-based 3D printing prototyping method
By using a tomographic scanning-based 3D printing prototype construction method, layer image data is directly acquired and laser scanning paths are generated, solving the problems of STL file accuracy loss and low data processing efficiency in existing technologies, and realizing efficient and accurate 3D printing prototype construction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU YIJIA 3D ADDITIVE TECH CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-07-07
Smart Images

Figure CN121946853B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D printing technology, and more specifically to a method for constructing 3D printed prototypes based on tomographic scanning. Background Technology
[0002] With the development of additive manufacturing technology, additive manufacturing based on physical model replication has become an important means of prototyping and small-batch production. In existing technologies, additive manufacturing replication of physical models mainly relies on two technical paths: one is physical model construction based on 3D scanning, which generates point cloud data by scanning the physical entity, and then drives the printing equipment after STL model reconstruction, model repair, and slice filling; the other is physical model construction based on computed tomography (CT) scans, which obtains tomographic data through CT scanning, converts it into STL file format after 3D reconstruction, and then drives the printing equipment after model repair and slice filling.
[0003] However, existing technologies have the following drawbacks: 1) STL files, as an intermediate format, result in precision loss. When triangular facets approximate curved surfaces, step-like distortion occurs, especially for complex internal cavity structures, where internal details are lost; 2) Data processing efficiency is low. STL files, due to their non-shared vertex structure, generate data redundancy, and parsing large files is time-consuming, extending the manufacturing cycle; 3) Process redundancy: Regardless of the technology used, existing technologies require a fixed workflow chain of STL conversion, model repair, and slicing, resulting in a waste of computational resources. Although CT scans have advantages in analyzing internal structures and can directly obtain tomographic data of objects, the current technological framework still requires 3D reconstruction, STL conversion, and slicing, presenting a trade-off between precision and efficiency.
[0004] To address the aforementioned issues, this invention proposes a 3D printing prototype construction method based on tomographic scanning, which integrates tomographic data acquisition and printing. Addressing the traditional process of 3D reconstruction and STL slicing of tomographic data, this invention employs parallel hardware and software co-design to reduce computational resources and time while ensuring printing accuracy, providing an integrated solution for replicating complex internal structures. Summary of the Invention
[0005] To address the problems existing in the prior art, this invention provides a 3D printing prototype construction method based on tomographic scanning. By performing multi-layer image pre-scanning on the sample to be replicated and introducing an artifact suppression pre-calibration mechanism based on multiple artifact judgment indicators, layer-by-layer image processing, contour extraction, and laser scanning path generation are completed on this basis, thereby improving the accuracy and consistency of layer image data and achieving high-precision, high-efficiency, and stable construction of 3D printed prototypes.
[0006] Specifically, the present invention provides a method for constructing a 3D printing prototype based on tomographic scanning, which includes the following steps:
[0007] S1. Load the sample to be copied, measure the external dimensions of the sample, and set the image acquisition and laser scanning parameters;
[0008] S2. Pre-acquire multiple layer images within the height range of the external dimensions, and perform grayscale normalization and size standardization processing on the pre-acquired layer images and artifact calibration images.
[0009] S3. Determine whether artifacts appear in each layer of the processed image. If yes, execute S1; otherwise, execute S4.
[0010] The artifacts include motion artifacts for characterizing interlayer stability, metal artifacts for characterizing high absorption anomalies, ring artifacts for characterizing radial consistency, and beam hardening artifacts for characterizing nonlinear attenuation characteristics.
[0011] S4. Perform actual acquisition of images of each layer of the sample and preprocess the acquired layer images;
[0012] S5. Extract contours from each layer of the preprocessed image using edge detection and contour tracking algorithms.
[0013] S6. Write the contour point data extracted from each layer and the height data of the scanned layer into the current slice data of the sample.
[0014] S7. Read the slice data and generate laser scanning path data for each layer according to the set laser scanning parameters;
[0015] S8. The printer reads the printing position, printing quantity, and laser scanning path data of each layer of the sample, and prints layer by layer according to the laser scanning path to construct a 3D printed prototype of the sample.
[0016] Furthermore, step S1 specifically involves the following steps:
[0017] S11. Load the sample to be copied onto the clamping stage in the scanning chamber;
[0018] S12. Initialize the layer image acquisition module in the sample image processing system;
[0019] S13. Activate the laser rangefinder on the top of the scanning chamber to measure and record the external dimensions of the sample;
[0020] S14. The acquired sample's external dimensions are transmitted to the layer image acquisition module and printing processing module via the communication module in the sample image processing system.
[0021] S15. Based on the material of the sample and the external dimensions of the sample collected, set the initial parameters of the radiation source and detector in the scanning chamber.
[0022] Furthermore, step S2 specifically involves the following steps:
[0023] S21. Map the gray values of the pre-scanned layer image to the range of [0,1] to make the gray range of the layer image consistent with that of the artifact calibration image;
[0024] S22. Adjust the layer image obtained from the pre-scan to the same size as the artifact calibration image.
[0025] Furthermore, step S3 specifically involves the following steps:
[0026] S31. Compare the current layer image of the sample with its adjacent layer images and calculate the motion artifact judgment index. Determine whether the motion artifact judgment index is greater than the preset threshold. If the motion artifact judgment index is greater than the preset threshold, stop the current scanning process, return to step S1, reload and fix the sample; if the motion artifact judgment index is less than the preset threshold, no motion artifacts appear in the current layer image, and proceed to step S32.
[0027] S32. Compare the current layer image with the corresponding artifact calibration image and calculate the metal artifact judgment index. Determine whether the offset of the metal artifact judgment index relative to the corresponding index of the artifact calibration image is greater than a preset threshold. If the offset of the metal artifact judgment index relative to the corresponding index of the artifact calibration image is greater than the preset threshold, stop the current scanning process, return to step S1, reset the initial energy parameters of the radiation source, and perform tomographic scanning again. If the offset of the metal artifact judgment index relative to the corresponding index of the artifact calibration image is less than the preset threshold, then no metal artifacts appear in the current layer image, and proceed to step S33.
[0028] S33. Based on the radial grayscale distribution characteristics of the current layer image with the fault center as the reference, calculate the ring artifact judgment index and determine whether the ring artifact judgment index is greater than the preset threshold. If the ring artifact judgment index is greater than the preset threshold, stop the current scanning process, return to step S1, recalibrate the detector and re-scan the tomography; if the ring artifact judgment index is less than the preset threshold, no ring artifact appears in the current layer image, and proceed to step S34.
[0029] S34. Based on the difference in grayscale attenuation between the central and edge regions of the current layer image, calculate the beam hardening artifact judgment index, and determine whether the change in the beam hardening artifact judgment index is greater than a preset threshold. If the change in the beam hardening artifact judgment index is greater than the preset threshold, stop the current scanning process, return to step S1, reset the initial parameters of the radiation source, and perform tomographic scanning again. If the change in the beam hardening artifact judgment index is less than the preset threshold, then no beam hardening artifact appears in the current layer image, and proceed to step S35.
[0030] S35. If no motion artifacts, metal artifacts, ring artifacts, or beam hardening artifacts are detected in the current layer image, compare the next layer image of the sample with the corresponding artifact calibration image, and repeat steps S31 to S34. When it is determined that no artifacts appear in any layer image of the sample, end the artifact suppression pre-calibration process, enter the sample printing and scanning stage, and execute S4.
[0031] Furthermore, in step S4, image denoising processing is performed on the acquired layer image. The specific steps are as follows:
[0032] S411. Perform noise modeling on the acquired image, decomposing each pixel in the acquired image into a superposition of noise-free pixels and noise pixels;
[0033] S412. For each pixel in the acquired image, calculate the similarity between that pixel and other pixels in the local neighborhood;
[0034] S413. Calculate the pixel values of the acquired image after denoising using the weighted average method.
[0035] Furthermore, in step S4, the acquired layer image undergoes contrast enhancement processing, specifically as follows:
[0036] S421. Divide the input image into multiple sub-regions;
[0037] S422. Calculate the pixel values of each sub-region and obtain the grayscale histogram of each sub-region;
[0038] S423. Calculate the cumulative distribution function for each sub-region;
[0039] S424. Introduce a contrast limit parameter, calculate the contrast limit value for each sub-region, and then limit the contrast enhancement of each region.
[0040] S425. For each sub-region, calculate the mapping function based on the cumulative distribution function and contrast limit value of each sub-region;
[0041] S426. Apply a mapping function to the pixels of each sub-region to obtain the enhanced grayscale value.
[0042] Furthermore, step S5 specifically involves the following steps:
[0043] S51. Smooth the edges of the layer image with obvious gray-level changes to eliminate jagged edges of the image;
[0044] S52. Calculate the gray-level gradient magnitude and gradient direction of each pixel in the layer image, and take the direction with the largest change in gray-level gradient intensity as the potential edge direction.
[0045] S53. In the gray-level gradient magnitude map, only retain the local maximum points of gray-level gradient intensity;
[0046] S54. Set a high threshold as a strong judgment of the layer image edge and a low threshold as a weak judgment of the layer image edge. Then, perform a delayed recursive processing on the edges that have been strongly judged and a secondary processing on the edges that have been weakly judged to obtain the binary edge pixel distribution.
[0047] S55. Following the image scanning order, traverse the binary edge map from top to bottom and from left to right, and search for each edge point to obtain the coordinates of points with inner and outer contours containing hierarchical levels.
[0048] S56. Smooth the extracted contours to eliminate jagged edges and short broken lines.
[0049] Furthermore, step S7 specifically involves the following steps:
[0050] S71. Read in the current layer slice data generated by the layer image processing module;
[0051] S72. Call the contents of the user-preset filling process parameter set file;
[0052] S73. Input the parameters from step S72 into the filling algorithm engine to generate the laser scanning path, wherein the filling algorithm engine is implemented using a filling algorithm.
[0053] S74. The generated executable fill file, including the laser scanning path, is transmitted to the printing module via the communication module.
[0054] Furthermore, step S8 specifically involves the following steps:
[0055] S81. The printer reads the print position, print quantity, and laser scanning path data for each layer of the sample from the executable filling file, and prints the sample layer by layer according to the laser scanning path.
[0056] S82. The printing module reads the set printing quantity and printing position parameters, and determines the arrangement of the samples on the printing platform and the corresponding scanning start position of each sample based on the printing quantity and printing position parameters.
[0057] S83. The printing module controls the printing device to perform laser scanning operations layer by layer according to the laser scanning path information of each layer obtained by parsing and the corresponding printing parameters, and switches between layers after each layer is scanned until the sample printing of all layers is completed.
[0058] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0059] 1. The 3D printing prototype construction method based on tomographic scanning provided by this invention obtains layer-by-layer images by performing tomographic scanning on the sample to be copied. A layer image refers to the image of the entire tomographic section. A laser scanning path is directly generated based on the layer image data to achieve rapid replication of the 3D printing prototype. Through the integrated scanning and printing architecture, scanning and printing can be carried out simultaneously, shortening the overall time from data acquisition to physical replication.
[0060] 2. The 3D printing prototype construction method based on tomography provided by this invention skips the three-dimensional mesh reconstruction and STL file generation and slicing steps, and directly completes contour extraction and printing path generation based on layer images, reducing the geometric errors caused by triangular mesh approximation, while simplifying the data processing flow and reducing the impact of intermediate data conversion on printing accuracy.
[0061] 3. The 3D printing prototype construction method based on tomography provided by this invention adopts an integrated operation process, which unifies the control of sample loading, tomography, image processing, path generation and printing process, reduces manual switching operations between different processing stages, and makes the printing process more centralized and continuous.
[0062] 4. The 3D printing prototype construction method based on tomography provided by this invention directly utilizes layer image data to complete contour extraction and laser scanning path generation, avoiding the need for complete 3D reconstruction and STL model processing of the sample, thereby reducing the amount of computation required for 3D reconstruction calculation, mesh processing and slicing operation. Attached Figure Description
[0063] Figure 1 This is a flowchart of the 3D printing prototype construction method based on tomography according to the present invention;
[0064] Figure 2 This is a flowchart of step S3 in the 3D printing prototype construction method based on tomography of the present invention;
[0065] Figure 3 This is a basic schematic diagram of the 3D printing prototype construction method based on tomography of the present invention.
[0066] Figure 4 This is a system composition diagram of the 3D printing prototype construction method based on tomography of the present invention;
[0067] Figure 5 This is a diagram showing the contents of a user-preset infill process parameter set file, which is an embodiment of the 3D printing prototype construction method based on tomography of the present invention.
[0068] Figure 6 This diagram illustrates the principle and laser scanning path generation of the 3D printing prototype construction method based on tomography of the present invention.
[0069] Key reference numerals:
[0070] 1. Mounting stage; 2. Radiation source; 3. Detector; 4. Sample to be copied; 5. Guide rail; 6. Laser rangefinder; 7. Printing platform; 8. Copying and printing sample; 9. Galvanometer; 10. Powder spreading roller; 100. Scanning chamber; 200. Forming chamber; 300. Computer. Detailed Implementation
[0071] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
[0072] This invention provides a method for constructing a 3D printed prototype based on tomographic scanning, such as... Figure 1 As shown, it includes the following steps:
[0073] S1. Load the sample to be copied, measure the sample's external dimensions, and set the image acquisition and laser scanning parameters. The specific steps are as follows:
[0074] S11. Load the sample to be replicated for 3D printing onto the clamping stage in the scanning chamber 100, close the lead protective door, and start the system. The clamping stage is equipped with a modular fixture kit for easy and quick assembly and adaptation to workpieces of various shapes, ensuring stability and repeatability; the lead-lined protective chamber ensures that the leakage dose is ≤1μSv / h, and the access control and emergency stop are linked. Any door opening or emergency stop command during scanning will instantly shut down the high voltage and safely stop the machine to meet safety requirements.
[0075] S12. Initialize the layer image acquisition module in the sample image processing system.
[0076] S13. Activate the laser rangefinder on top of the scanning chamber 100 to measure and record the external dimensions of the sample to be replicated. .
[0077] S14. The acquired external dimensions of the sample to be copied are transmitted to the layer image acquisition module and the printing processing module through the communication module in the sample image processing system.
[0078] S15. Based on the material of the sample to be replicated and the external dimensions of the sample collected, set the initial parameters of the radiation source and detector in the scanning chamber 100.
[0079] Specifically, the X-ray source parameters include energy level and spot mode selection, with an energy range of 20KV-450KV to meet the penetration requirements from plastics to heavy metals. The X-ray spot has two options: micro-focus and medium-focus, with the focal diameter being less than 80μm to balance high resolution and high penetration.
[0080] Specifically, the detector parameters mainly include scan layer height and pixel pitch settings. The scan layer height setting is used to set the height of each printing layer during printing, and the pixel pitch can be set from 0.2mm to 0.8mm. The detector itself consists of a 16-bit linear array detector with a dynamic range greater than 16000:1 and a bandwidth greater than or equal to 1GB / s. Continuous high-speed readout is supported through real-time preprocessing by FPGA and DDR3 cache. The detector is shielded with a lead or tungsten alloy shell to minimize the impact of scattered radiation on the detector.
[0081] S2. Pre-acquire multiple layer images within the height range of the external dimensions, and perform grayscale normalization and size standardization processing on the pre-acquired layer images and artifact calibration images.
[0082] Multi-layer image acquisition and pre-scanning are performed within the height range of the sample to be replicated. The pre-scanned layer images are then compared with the artifact calibration images in the calibration artifact image library for grayscale normalization and size standardization. The specific steps are as follows:
[0083] S21. Map the grayscale values of the pre-scanned layer image to the range of [0,1] to ensure that the grayscale range of the layer image is consistent with that of the artifact calibration image.
[0084] S22. Adjust the layer image obtained from the pre-scan to the same size as the artifact calibration image.
[0085] S3. Determine whether artifacts appear in each layer of the processed image. If yes, execute S1; otherwise, execute S4.
[0086] like Figure 2 As shown, the purpose of this step is to perform artifact suppression pre-calibration based on layer images. Specifically, it includes: calculating motion artifact criteria (characterizing interlayer stability), metal artifact criteria (characterizing high absorption anomalies), ring artifact criteria (characterizing radial consistency), and beam hardening artifact criteria (characterizing nonlinear attenuation characteristics) based on the layer images of the sample to be replicated obtained from tomographic scanning. Each artifact criterion is compared with its corresponding threshold or with the corresponding criterion in the artifact calibration image to determine whether motion artifacts, metal artifacts, ring artifacts, or beam hardening artifacts appear in the current layer image. Based on the determination result, corresponding correction steps are performed, specifically including:
[0087] S31. Compare the current layer image of the sample to be copied with its adjacent layer images. Calculate the motion artifact judgment index to characterize the interlayer stability based on the grayscale change amplitude between adjacent layer images. Determine whether the motion artifact judgment index is greater than a preset threshold. If the motion artifact judgment index is greater than the preset threshold, it is determined that there is motion artifact in the current layer image caused by the relative displacement of the sample. Control the operating system to stop the current scanning process, return to step S1, reload and fix the sample to be copied; if the motion artifact judgment index is less than the preset threshold, there is no motion artifact in the current layer image, and proceed to step S32.
[0088] Specifically, let the first The pixel set of the layered image is , This indicates the first image layer. Line 1 The pixels in the column, whose adjacent uppermost image is By calculating the average grayscale difference between the two image layers at corresponding pixel locations, a motion artifact detection index is constructed:
[0089] ;
[0090] in, The effective pixel region of the current layer image. This represents the total number of pixels in the region. This represents the value indicating the presence of motion artifacts. Assume the motion artifact threshold is... ,when There are no motion artifacts if the time condition is met; otherwise, motion artifacts will be present.
[0091] If motion artifacts appear in the layer image, it indicates that the sample to be copied has undergone relative movement or vibration during the tomographic scanning process. In this case, the system should be stopped, and the process should return to step S1 to re-clamp and fix the sample to be copied.
[0092] S32. Compare the current layer image with the corresponding artifact calibration image. Calculate the metal artifact determination index to characterize high absorption anomalies based on the high grayscale pixel distribution characteristics in the current layer image. Determine whether the offset of the metal artifact determination index relative to the corresponding index in the artifact calibration image is greater than a preset threshold. If the offset of the metal artifact determination index relative to the corresponding index in the artifact calibration image is greater than the preset threshold, it is determined that there is a metal artifact in the current layer image. Control the operating system to stop the current scanning process, return to step S1, reset the initial energy parameters of the radiation source, and perform a tomographic scan again. If the offset of the metal artifact determination index relative to the corresponding index in the artifact calibration image is less than the preset threshold, then no metal artifact appears in the current layer image, and proceed to step S33.
[0093] Specifically, a metal artifact detection index is constructed by analyzing the distribution ratio of high grayscale pixels in the current layer image.
[0094] Let the maximum grayscale value of the current layer image be... Let the metal artifact threshold be... Select a high grayscale threshold:
[0095] ;
[0096] in, This is the proportionality coefficient. The threshold is set to high grayscale. The criterion for determining metal artifacts is defined as follows:
[0097] ;
[0098] ;
[0099] in, It is a binary judgment function. As an indicator for judging metal artifacts, if Greater than If a metal artifact is detected in the slice image, it indicates that the X-ray source is excessively absorbed by metal. In this case, the source tube voltage should be increased to improve the X-ray penetration capability, and the artifact suppression pre-calibration should be performed again.
[0100] S33. Based on the radial grayscale distribution characteristics of the current layer image with the fault center as the reference, calculate the ring artifact judgment index used to characterize radial consistency, and determine whether the ring artifact judgment index is greater than the preset threshold. If the ring artifact judgment index is greater than the preset threshold, it is determined that there is a ring artifact in the current layer image caused by the inconsistency of the detector response. Control the operating system to stop the current scanning process, return to step S1, recalibrate the detector, and re-scan the tomography. If the ring artifact judgment index is less than the preset threshold, no ring artifact appears in the current layer image, and proceed to step S34.
[0101] Specifically, using the geometric center of the layer image as a reference, we analyze the grayscale changes of the image along the radial direction.
[0102] Let the geometric center coordinates of the layer image be... Let the threshold for detecting ring artifacts be... The image is divided into multiple radial intervals. Calculate the average gray value of each radial interval and construct an index for judging annular artifacts:
[0103] ;
[0104] ;
[0105] in, The radial distance between adjacent pixels. For the division of radial intervals, The pixel grayscale value that belongs to the Mth interval is... Let be the average grayscale value of the pixels in the Mth interval, where M is the number of intervals, m is the first interval, and R is the grayscale radial consistency deviation index, which is also the criterion for determining ring artifacts. If R is greater than 1... If so, then a ring artifact is determined to have occurred.
[0106] S34. Based on the difference in grayscale attenuation between the central and edge regions of the current layer image, calculate the beam hardening artifact determination index to characterize the nonlinear attenuation characteristics, and compare this index with the corresponding index of the artifact calibration image. Determine whether the change in the beam hardening artifact determination index is greater than a preset threshold. If the change in the beam hardening artifact determination index is greater than the preset threshold, it is determined that there is a beam hardening artifact in the current layer image. Control the operating system to stop the current scanning process, return to step S1, reset the initial parameters of the radiation source, and perform a tomographic scan again. If the change in the beam hardening artifact determination index is less than the preset threshold, there is no beam hardening artifact in the current layer image, and proceed to step S35.
[0107] Specifically, the current layer image is divided into a central region and an edge region, and their average gray values are calculated separately. Assuming the beam hardening artifact threshold is... And construct a beam hardening artifact judgment index:
[0108] ;
[0109] in, This is the value for judging beam hardening artifacts. The average gray value of the central area. This represents the average gray value of the edge region. Greater than When this occurs, it is determined that the current layer image contains beam hardening artifacts.
[0110] If beam hardening artifacts appear in the layer image, it indicates that the X-ray source has insufficient penetration capability. In this case, the X-ray source tube voltage should be increased to improve the X-ray source tube current in order to enhance the X-ray penetration capability, and the artifact suppression pre-calibration should be performed again.
[0111] S35. If no motion artifacts, metal artifacts, ring artifacts, or beam hardening artifacts are detected in the current layer image, compare the next layer image of the sample to be copied with the corresponding artifact calibration image, and repeat steps S31 to S34. When it is determined that no artifacts appear in any layer image of the sample to be copied, end the artifact suppression pre-calibration process, enter the sample printing and scanning stage, and execute S4.
[0112] S4. Perform actual acquisition of images of each layer of the sample and preprocess the acquired layer images.
[0113] Based on the layer height of the sample to be replicated, images are acquired layer by layer. The acquired layer images undergo preprocessing including image denoising and contrast enhancement. The specific steps are as follows:
[0114] S41. Perform image denoising processing on the acquired layer images. The specific steps are as follows:
[0115] S411. Perform noise modeling on the acquired image, decomposing each pixel in the acquired image into a superposition of noise-free pixels and noise pixels.
[0116] Assuming each pixel in the image is captured From original noise-free pixels and noise pixels The composition consists of Gaussian noise with a mean of zero and a variance of . ,but:
[0117] .
[0118] S412. For each pixel in the acquired image, calculate the similarity between that pixel and other pixels in the local neighborhood;
[0119] For each pixel in the acquired image Independent processing is performed to achieve image denoising by calculating the similarity between the pixel and other pixels in the local neighborhood. The similarity calculation is based on the gray value difference of the local neighboring image patches, and Euclidean distance is used to measure the similarity between two image patches. The calculation expression is as follows:
[0120] ;
[0121] In the formula, For pixels The coordinate position on the image, i.e., the first row and number List; For pixels The coordinate position on the image, i.e., the first row and number List; and They are in pixels respectively and The pixel block centered on; It is a pixel block and The similarity between them; It is the Euclidean distance between two pixel blocks; It is a smoothing parameter used to adjust the scale of similarity calculation.
[0122] S413. Calculate the pixel values of the acquired image after denoising using the weighted average method;
[0123] The specific expression is:
[0124] ;
[0125] In the formula, These are the pixel values after noise reduction; These are the pixel values in the original image; It is a normalization constant, ensuring that the sum of the weights is 1; It is a local neighborhood window, usually 3*3 or 5*5.
[0126] S42. Perform contrast enhancement processing on the acquired layer images. The specific steps are as follows:
[0127] S421. Divide the input image into multiple sub-regions.
[0128] Divide the input image into There are 1 sub-regions, each of which is assumed to be 1. The specific value is determined based on the image size.
[0129] S422. Calculate the pixel values of each sub-region and obtain the grayscale histogram of each sub-region.
[0130] For each sub-region For each sub-region pixel value Statistical analysis and obtaining its grayscale histogram , Its grayscale level, with a value range of 100%. .
[0131] S423. Calculate the cumulative distribution function for each sub-region.
[0132] For each sub-region Calculate its cumulative distribution function The expression is:
[0133] ;
[0134] In the formula, Represents grayscale level The following cumulative probabilities; Grayscale These are pixel coordinates; The sub-region number; This is the grayscale histogram of the sub-region.
[0135] S424. Introduce a contrast limit parameter, calculate the contrast limit value for each sub-region, and then limit the contrast enhancement of each region.
[0136] To prevent excessive enhancement from amplifying noise, a contrast limiting parameter is introduced. The contrast limiting value for each sub-region is calculated using the following expression:
[0137] ;
[0138] In the formula, Contrast limit value for each sub-region; This is the preset maximum contrast limit.
[0139] S425. For each sub-region, calculate the mapping function based on the cumulative distribution function and contrast limit value of each sub-region. The expression is as follows:
[0140] ;
[0141] In the formula, To map the original grayscale to the enhanced grayscale function.
[0142] S426. Apply a mapping function to the pixels of each sub-region to obtain the enhanced grayscale value.
[0143] The expression is:
[0144] ;
[0145] In the formula, This is the enhanced grayscale value.
[0146] S5. Extract contours from each layer of the preprocessed image using edge detection and contour tracking algorithms. The specific steps are as follows:
[0147] S51, Gaussian Smoothing: Smooths the edges of the layer image with obvious gray-level changes, eliminating jagged edges of the image;
[0148] Image after grayscale enhancement Process and The specific expression for performing a two-dimensional convolution is:
[0149] ;
[0150] ;
[0151] In the formula, These are the smoothed pixel values; and These represent relative to the current position. On the go and column Offset on; The radius of the convolution window; For convolution kernel; The standard deviation is Gaussian.
[0152] S52. Calculate the gray-level gradient magnitude and gradient direction of each pixel in the image, and take the direction with the largest change in gray-level gradient intensity as the potential edge direction.
[0153] Its expression is:
[0154] ;
[0155] ;
[0156] In the formula, To smooth the pixel values in Gradient of direction; To smooth the pixel values in Gradient of direction; , They are respectively Gradient operator for direction; These are the local coordinates of the operator.
[0157] S53. In the gray-level gradient magnitude map, only retain the local maximum points of gray-level gradient intensity.
[0158] The amplitude is calculated as follows:
[0159] ;
[0160] The direction is calculated as follows:
[0161] ;
[0162] For each pixel According to its direction Discretize the neighborhood to four angles (0°, 45°, 90°, 135°) and compare the gradient magnitude of the pixel with the gradient magnitude of the two adjacent pixels. If the gradient magnitude of the pixel is less than the gradient magnitude of either side, set it to zero; otherwise, retain it.
[0163] S54, Dual Threshold Segmentation and Lag Tracking: Set a high threshold as a strong judgment of the layer image edge and a low threshold as a weak judgment of the layer image edge. Then, perform lag recursive processing on the edges that have been strongly judged and perform secondary processing on the edges that have been weakly judged to obtain the binary edge pixel distribution.
[0164] Set low threshold High threshold .when It is denoted as a strong edge; when It is denoted as a weak edge; when It is denoted as non-edge.
[0165] Lag tracking: Starting from all strong edges, recursively mark weak edge points connected to their neighborhoods as edges as well, and set the remaining weak edges as non-edges. Output a binary edge map. , where 1 represents an edge pixel.
[0166] S55. Following the image scanning order, traverse the binary edge map from top to bottom and from left to right, and search for each edge point to obtain the coordinates of points with inner and outer contours containing layers.
[0167] Set the starting direction: Set the upper left as the starting point and record the current contour number n.
[0168] Search for the next boundary point: Search for the next edge point in 8 neighborhood directions in a clockwise order. Once found, record it as the second contour point and record the direction code.
[0169] Update search start and direction: Update the leading direction and start to avoid duplicate detection.
[0170] Loop to Closure: Repeat the neighborhood search and chain code recording above until you return to the starting point and the next direction points to the starting point, then determine that the current contour is closed.
[0171] Output contour hierarchy: Output the coordinates of the corresponding points of the searched contours according to their hierarchical relationship.
[0172] When the current pixel is detected When a pixel is an edge pixel and has not yet been assigned to any contour, a new contour tracking process is initiated.
[0173] S56. Smooth the extracted contours to eliminate jagged edges and avoid a large number of short broken lines on the contour edges, which would affect print quality.
[0174] Assume the contour points are ,in .
[0175] For adjacent point pairs Insert two points to divide:
[0176] ;
[0177] This will Amplification of points to A midpoint.
[0178] Finally, the expanded point set The average value [1 / 2, 1, 2] is used to further suppress sharp corners.
[0179] Repeated Segmentation and Average After this, the jagged edges are basically eliminated, and the output point set is... .
[0180] S6. Input the contour point data extracted from each layer and the height data of the scanned layer into the current slice data.
[0181] S7. Read the slice data and generate laser scanning path data for each layer according to the set laser scanning parameters. The specific steps are as follows:
[0182] S71. Read in the current layer slice data generated by the layer image processing module.
[0183] S72. Call the contents of the user-preset filling process parameter set file.
[0184] As an example of implementation, the content of the user-preset filling process parameter set file is attached. Figure 5 As shown.
[0185] S73. Input the parameters from step S72 into the filling algorithm engine to generate the laser scanning path. The filling algorithm engine is implemented using a filling algorithm.
[0186] S74. The generated executable fill file is transmitted to the printing module through the communication module.
[0187] S8. The printer reads the printing position, printing quantity, and laser scanning path data for each layer of the sample, and prints layer by layer according to the generated laser scanning path to construct a 3D printed prototype of the sample. The specific steps are as follows:
[0188] S81. The printer reads the printing position, printing quantity, and laser scanning path data of each layer of the sample, and prints the sample layer by layer according to the laser scanning path.
[0189] S82. The printing module reads the set printing quantity and printing position parameters, and determines the arrangement of the samples on the printing platform and the corresponding scanning start position of each sample based on the printing quantity and printing position parameters.
[0190] S83. The printing module controls the printing equipment to perform laser scanning operations layer by layer according to the laser scanning path information of each layer obtained by parsing and the corresponding printing parameters. After each layer is scanned, the module switches between layers until all layers are printed, thus constructing a 3D printed prototype of the sample.
[0191] This invention provides a rapid prototyping system for 3D printing based on tomography, such as... Figure 3 and Figure 4As shown, it includes a scanning chamber 100, a forming chamber 200, and a sample image processing system, i.e., a computer 300, that communicates with the scanning chamber 100 and the forming chamber 200. The scanning chamber 100 is equipped with a clamping stage 1, on which a sample 4 to be copied is mounted. A radiation source 2 is located at the first end of the scanning chamber 100, which can move vertically. A detector 3 is located at the second end of the scanning chamber 100, and a guide rail 5 is located on the top of the scanning chamber 100, on which a laser rangefinder 6 slides. A galvanometer 9 is located on the top of the forming chamber 200, and a printing platform 7 is located on the forming chamber 200. A powder spreading roller 10 is located on the printing platform 7, which can then print out a copy of the sample 8.
[0192] The sample image processing system includes a tomographic data acquisition module, a communication module, a layer image processing module, a filling processing module, and a printing module. The tomographic data acquisition module, through the integration of radiation source, detection, positioning, and safety subsystems, achieves high-fidelity acquisition of the physical sample's external dimensions and layer images. Its core features are: a dual-focus X-ray source-high dynamic detector collaborative architecture ensuring wide material adaptability (20KV-450KV energy coverage / >16000:1 dynamic range); a precision positioning system (repeatability ≤5μm); and an integrated dimensional measurement unit ensuring consistency between scanning and printing space. The communication module's main function is to transmit data between the modules, primarily including the following four types of data transmission: tomographic data transmission, acquisition action signal transmission, slice layer data transmission, and printed layer data transmission. The layer image processing module receives raw layer image data from the image acquisition module in the acquisition sequence. Its core functions mainly include the following two points: first, artifact detection and command feedback, analyzing whether there are artifacts in the layer image and returning data acquisition action signals to the acquisition module; second, tomographic data conversion, converting the raw tomographic data into printable slice layer data. The infill processing module drives the infill algorithm through user-preset process parameters, converting the input slice layer geometric data into executable printing layer command data. This module mainly includes the following four steps: data reading, parameter loading, path planning, and data output. The printing module is the printer printing execution module. After reading the slice data of each layer, the printing module drives the printer to print the model in the area to be printed.
[0193] As attached Figure 6As shown, this invention acquires layer-by-layer images of the sample to be replicated through tomographic scanning, adjusts relevant parameters based on artifact detection, and generates a laser scanning path based on the layer image data, achieving rapid replication of the 3D printed prototype. Through an integrated scanning and printing architecture, it enables simultaneous scanning and printing, shortening the overall time from data acquisition to physical replication. Simultaneously, by skipping the 3D mesh reconstruction, STL file generation, and slicing stages, it directly completes contour extraction and printing path generation based on layer images, reducing geometric errors caused by triangular mesh approximation and simplifying the data processing flow, thus minimizing the impact of intermediate data conversion on printing accuracy. Furthermore, the integrated operation process unifies the control of sample loading, tomographic scanning, image processing, path generation, and printing, reducing manual switching between different processing stages and making the printing process more centralized and continuous. Finally, by directly utilizing layer image data to complete contour extraction and laser scanning path generation, it avoids complete 3D reconstruction and STL model processing of the sample, thereby reducing the computational load required for 3D reconstruction calculations, mesh processing, and slicing operations.
[0194] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A method for constructing a 3D printing prototype based on tomographic scanning, characterized in that: It includes the following steps: S1. Load the sample to be copied, measure the external dimensions of the sample, and set the image acquisition and laser scanning parameters; S2. Pre-acquire multiple layer images within the height range of the external dimensions, and perform grayscale normalization and size standardization processing on the pre-acquired layer images and artifact calibration images. S3. Determine whether artifacts appear in each layer of the processed image. If yes, execute S1; otherwise, execute S4. The artifacts include motion artifacts for characterizing interlayer stability, metal artifacts for characterizing high absorption anomalies, ring artifacts for characterizing radial consistency, and beam hardening artifacts for characterizing nonlinear attenuation characteristics. The specific steps are as follows: S31. Compare the current layer image of the sample with its adjacent layer images and calculate the motion artifact judgment index. Determine whether the motion artifact judgment index is greater than the preset threshold. If the motion artifact judgment index is greater than the preset threshold, stop the current scanning process, return to step S1, reload and fix the sample; if the motion artifact judgment index is less than the preset threshold, no motion artifacts appear in the current layer image, and proceed to step S32. The motion artifact determination index is: ; in, For the existence value of motion artifacts, This indicates the first image layer. Line 1 Column of pixels, The effective pixel region of the current layer image. This represents the total number of pixels in the region. For the first A collection of pixels in a layered image. For the first The set of pixels of the image layer adjacent to the previous layer; S32. Compare the current layer image with the corresponding artifact calibration image and calculate the metal artifact judgment index. Determine whether the offset of the metal artifact judgment index relative to the corresponding index of the artifact calibration image is greater than a preset threshold. If the offset of the metal artifact judgment index relative to the corresponding index of the artifact calibration image is greater than the preset threshold, stop the current scanning process, return to step S1, reset the initial energy parameters of the radiation source, and perform tomographic scanning again. If the offset of the metal artifact judgment index relative to the corresponding index of the artifact calibration image is less than the preset threshold, then no metal artifacts appear in the current layer image, and proceed to step S33. The metal artifact determination index is: ; ; in, As an indicator for judging metal artifacts, It is a binary judgment function. For the first A collection of pixels in a layered image. High grayscale threshold; S33. Based on the radial grayscale distribution characteristics of the current layer image with the fault center as the reference, calculate the ring artifact judgment index and determine whether the ring artifact judgment index is greater than the preset threshold. If the ring artifact judgment index is greater than the preset threshold, stop the current scanning process, return to step S1, recalibrate the detector and re-scan the tomography; if the ring artifact judgment index is less than the preset threshold, no ring artifact appears in the current layer image, and proceed to step S34. The index for determining ring artifacts is: ; ; Where R is the criterion for determining ring artifacts; The radial distance between adjacent pixels. For the division of radial intervals, The pixel grayscale value that belongs to the Mth interval is... Let m be the average grayscale value of the pixels in the M-th interval, where M is the number of intervals and m is the first interval. For radial intervals; S34. Based on the difference in grayscale attenuation between the central and edge regions of the current layer image, calculate the beam hardening artifact judgment index, and determine whether the change in the beam hardening artifact judgment index is greater than a preset threshold. If the change in the beam hardening artifact judgment index is greater than the preset threshold, stop the current scanning process, return to step S1, reset the initial parameters of the radiation source, and perform tomographic scanning again. If the change in the beam hardening artifact judgment index is less than the preset threshold, then no beam hardening artifact appears in the current layer image, and proceed to step S35. The beam hardening artifact determination index is: ; in, This is the value for judging beam hardening artifacts. The average gray value of the central area. The average gray value of the edge region; S35. If no motion artifacts, metal artifacts, ring artifacts, or beam hardening artifacts are detected in the current layer image, compare the next layer image of the sample with the corresponding artifact calibration image, and repeat steps S31 to S34. When it is determined that no artifacts appear in any layer image of the sample, end the artifact suppression pre-calibration process, enter the sample printing and scanning stage, and execute S4. S4. Perform actual acquisition of images of each layer of the sample and preprocess the acquired layer images; S5. Extract contours from each layer of the preprocessed image using edge detection and contour tracking algorithms. S6. Write the contour point data extracted from each layer and the height data of the scanned layer into the current slice data of the sample. S7. Read the slice data and generate laser scanning path data for each layer according to the set laser scanning parameters; S8. The printer reads the printing position, printing quantity, and laser scanning path data of each layer of the sample, and prints layer by layer according to the laser scanning path to construct a 3D printed prototype of the sample.
2. The 3D printing prototype construction method based on tomography according to claim 1, characterized in that: The specific steps of step S1 are as follows: S11. Load the sample to be copied onto the clamping stage in the scanning chamber; S12. Initialize the layer image acquisition module in the sample image processing system; S13. Activate the laser rangefinder on the top of the scanning chamber to measure and record the external dimensions of the sample; S14. The acquired sample's external dimensions are transmitted to the layer image acquisition module and printing processing module via the communication module in the sample image processing system. S15. Based on the material of the sample and the external dimensions of the sample collected, set the initial parameters of the radiation source and detector in the scanning chamber.
3. The method for constructing 3D printed prototypes based on tomography according to claim 2, characterized in that: The specific steps of step S2 are as follows: S21. Map the gray values of the pre-scanned layer image to the range of [0,1] to make the gray range of the layer image consistent with that of the artifact calibration image; S22. Adjust the layer image obtained from the pre-scan to the same size as the artifact calibration image.
4. The 3D printing prototype construction method based on tomography according to claim 3, characterized in that: In step S4, image denoising processing is performed on the acquired layer images. The specific steps are as follows: S411. Perform noise modeling on the acquired image, decomposing each pixel in the acquired image into a superposition of noise-free pixels and noise pixels; S412. For each pixel in the acquired image, calculate the similarity between that pixel and other pixels in the local neighborhood; S413. Calculate the pixel values of the acquired image after denoising using the weighted average method.
5. The 3D printing prototype construction method based on tomography according to claim 4, characterized in that: Step S4 involves contrast enhancement processing on the acquired layer image. The specific steps are as follows: S421. Divide the input image into multiple sub-regions; S422. Calculate the pixel values of each sub-region and obtain the grayscale histogram of each sub-region; S423. Calculate the cumulative distribution function for each sub-region; S424. Introduce a contrast limit parameter, calculate the contrast limit value for each sub-region, and then limit the contrast enhancement of each region. S425. For each sub-region, calculate the mapping function based on the cumulative distribution function and contrast limit value of each sub-region; S426. Apply a mapping function to the pixels of each sub-region to obtain the enhanced grayscale value.
6. The 3D printing prototype construction method based on tomography according to claim 5, characterized in that: Step S5 is as follows: S51. Smooth the edges of the layer image with obvious gray-level changes to eliminate jagged edges of the image; S52. Calculate the gray-level gradient magnitude and gradient direction of each pixel in the layer image, and take the direction with the largest change in gray-level gradient intensity as the potential edge direction. S53. In the gray-level gradient magnitude map, only retain the local maximum points of gray-level gradient intensity; S54. Set a high threshold as a strong judgment of the layer image edge and a low threshold as a weak judgment of the layer image edge. Then, perform a delayed recursive processing on the edges that have been strongly judged and a secondary processing on the edges that have been weakly judged to obtain the binary edge pixel distribution. S55. Following the image scanning order, traverse the binary edge map from top to bottom and from left to right, and search for each edge point to obtain the coordinates of points with inner and outer contours containing hierarchical levels. S56. Smooth the extracted contours to eliminate jagged edges and short broken lines.
7. The 3D printing prototype construction method based on tomography according to claim 6, characterized in that: Step S7 is as follows: S71. Read in the current layer slice data generated by the layer image processing module; S72. Call the contents of the user-preset filling process parameter set file; S73. Input the parameters from step S72 into the filling algorithm engine to generate the laser scanning path, wherein the filling algorithm engine is implemented using a filling algorithm. S74. The generated executable fill file, including the laser scanning path, is transmitted to the printing module via the communication module.
8. The 3D printing prototype construction method based on tomography according to claim 7, characterized in that: Step S8 is as follows: S81. The printer reads the print position, print quantity, and laser scanning path data for each layer of the sample from the executable filling file, and prints the sample layer by layer according to the laser scanning path. S82. The printing module reads the set printing quantity and printing position parameters, and determines the arrangement of the samples on the printing platform and the corresponding scanning start position of each sample based on the printing quantity and printing position parameters. S83. The printing module controls the printing device to perform laser scanning operations layer by layer according to the laser scanning path information of each layer obtained by parsing and the corresponding printing parameters, and switches between layers after each layer is scanned until the sample printing of all layers is completed.