A DRR image generation system and generation method based on dynamic step size
By using a dynamic step size calculation method in the DRR image generation system, the sampling step size is calculated in segments according to the voxel organization relationship, and the problem of high calculation cost in the step size setting in the prior art is solved, and more efficient DRR image generation and better similarity measurement and registration effects are achieved.
Patent Information
- Application Number
- CN202110671990.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-17
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2041-06-17
AI Technical Summary
In the generation of DRR images, the sampling error is large when the calculation step length is longer, and the calculation cost is high when the steps are short, making it difficult to find a balance between accuracy and speed. The similarity measurement and registration effect of DRR and X-ray projection map are not good.
Using a DRR image generation system based on dynamic step size, a preprocessing three-dimensional voxel model is established through the image preprocessing module. The dynamic step size calculation module calculates the segmented sampling step size based on the relative relationship of the voxels to which the projection line passes through or the surrounding voxels, and calculates the projection value of the light on the receiving plate through the light projection calculation module.
While ensuring the calculation accuracy of DRR image generation, the calculation time is accelerated and the similarity measurement and registration effect between DRR and X-ray projection map are improved.
Smart Images

Figure CN113538651B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of perspective imaging, and in particular to a DRR image generation system and a generation method based on dynamic step length. Background Art
[0002] Digitally Reconstructed Radiograph (DRR) is a radiographic reconstruction based on the 3D CT image data acquired by the CT machine, that is, simulating photons passing through the digital image to generate a grayscale image based on the image content. Each pixel on the DRR corresponds to the attenuation of the virtual ray source on the path to the pixel, and this virtual X-ray attenuation process conforms to the law of the optical absorption model.
[0003] The existing technology based on the ray projection algorithm is to calculate the ray projection value from the light source to each pixel of the receiving plate. The number of rays is determined by the horizontal and vertical resolution of the receiving plate, and then a simulated reconstructed DRR two-dimensional image is obtained, which is further compared and registered with the X-ray projection image DR to achieve CT positioning. The existing technology usually uses two methods to calculate the ray step length. One is to obtain the intersection of each projection line through this voxel model and calculate the effective ray length of the projection line through the voxel matrix. This length is subject to the resolution of the CT model. The second method is to use the equal step length method to calculate the CT value of the corresponding step length. When the step length is longer, the sampling error is larger, and when the step length is smaller, the calculation cost is higher. Summary of the invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a DRR image generation system and method based on dynamic step size, which can ensure the calculation accuracy of DRR image generation while speeding up the calculation time, and further improve the similarity measurement and alignment effect between DRR and X-ray projection images.
[0005] Technical solution: The DRR image generation system based on dynamic step size of the present invention includes an image preprocessing module, a dynamic step size calculation module and a light projection calculation module, wherein the image preprocessing module is used to establish a preprocessed three-dimensional voxel model based on the three-dimensional voxel data of the CT image and the relationship between the CT values between the voxels; the dynamic step size calculation module is used to calculate the segmented sampling step size of the ray according to the tissue to which the voxel of the preprocessed three-dimensional voxel model through which the projection line passes belongs or the relative relationship with the tissue to which the surrounding voxels belong; the light projection calculation module is used to calculate the projection value of the light on all pixels of the flat plate receiving point.
[0006] The image preprocessing module takes the CT image as input and converts the original CT image into a preprocessed 3D voxel model according to the CT value characteristics of the 3D voxel data of the CT image. The preprocessed 3D voxel model has the same size as the original CT image.
[0007] The dynamic step length calculation module takes the preprocessed 3D voxel model as input, and calculates the sampling step length passing through the CT image according to the preprocessed 3D voxel data feature segmentation. The segmented sampling step length is calculated on the line segment where the light intersects the CT image.
[0008] The present invention also includes a method for generating a DRR image generation system based on a dynamic step size, comprising the following steps:
[0009] (1) Establish a preprocessed 3D voxel model based on the 3D voxel data of CT images and the relationship between CT values of voxels;
[0010] (2) sending a number of projection lines along the virtual light source to the preprocessed three-dimensional voxel model;
[0011] (3) calculating the intersection of each projection line entering and exiting the voxel model, and calculating the segmented sampling step and the CT value corresponding to the segmented sampling step based on the preprocessed three-dimensional voxel model;
[0012] (4) The CT value corresponding to the sampling step is multiplied by the corresponding sampling step and then accumulated to obtain the projection value of the projection line onto the receiving plate. All projection lines are traversed to obtain the projection values of all pixels on the receiving plate to obtain the DRR image.
[0013] In step (1), each voxel in the three-dimensional voxel data of the CT image is grouped according to the distribution range of the voxel CT value, and the tissue number corresponding to each voxel is determined according to the grouping, or the relationship of each voxel to the tissue to which the surrounding voxels belong is determined.
[0014] In step (2), the number of the projection lines is the same as the number of pixels of the receiving plate.
[0015] In step (3), the segmented sampling step length of the ray is determined according to the tissue to which the three-dimensional voxel through which the projection line passes belongs or its relative relationship with the tissue to which the surrounding voxels belong.
[0016] The calculation methods of the segmented sampling step length include two methods, one is to increase it exponentially according to the initial step length, and the other is to increase it in steps by not less than the minimum value of the voxel model unit voxel in three dimensions.
[0017] When the segmented sampling step length calculation method is adopted in which the initial step length is multiplied, the following steps are included:
[0018] (i) setting an initial step length, calculating the CT value of the CT three-dimensional model voxel corresponding to the midpoint of the initial step length and the CT value of the CT three-dimensional model voxel corresponding to the end point of the initial step length;
[0019] (ii) If the CT values of the two belong to the same tissue range, the step length is increased by 1, and the voxel CT values of the midpoint and end point of the new step length are calculated again and compared, until the voxel CT values corresponding to the end point of the step length do not belong to the same tissue;
[0020] (iii) determining the current segmentation step length and calculating the CT value corresponding to the midpoint of the step length;
[0021] (iv) Calculate the next dynamic step length according to the above steps until the end point of the step length exceeds the CT range; at this time, take the intersection point where the ray exceeds the CT boundary as the end point of the last dynamic step length, and calculate the CT value corresponding to the last dynamic step length.
[0022] When a segmented sampling step length calculation method is adopted that increases the step length by not less than the minimum value of the voxel model unit voxel in three dimensions, the following steps are included:
[0023] (a) Set the initial step length of the projection line and calculate the circle value of the voxel corresponding to the end point of the initial step length;
[0024] (b) If the circle value C is not 0, the dynamic step size of this segment is updated and calculated as d0+C*min{Sx,Sy,Sz}, where Sx, Sy, and Sz are the sizes of the three-dimensional model unit voxel in the three-dimensional directions of x, y, and z respectively;
[0025] (c) The dynamic step size is updated cyclically until C=0, and the step size update is terminated.
[0026] Beneficial effects: Compared with the prior art, the present invention has the following beneficial effects: while ensuring the calculation accuracy of DRR image generation, it speeds up the calculation time and further improves the similarity measurement and registration effect between DRR and X-ray projection images. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0028] The present invention is further described in detail below in conjunction with specific implementation methods and the accompanying drawings.
[0029] The DRR image generation system based on dynamic step length of the present invention comprises an image preprocessing module, a dynamic step length calculation module and a light projection calculation module, wherein the image preprocessing module is used to establish a preprocessing three-dimensional voxel model based on the three-dimensional voxel data of the CT image and the relationship between the CT values between the voxels; the image preprocessing module takes the CT image as input, and converts the original CT image into a preprocessing three-dimensional model according to the CT value characteristics of the three-dimensional voxel data of the CT image, and the preprocessing three-dimensional model has the same size as the original CT image. The dynamic step length calculation module is used to calculate the segmented sampling step length of the ray according to the tissue to which the voxel of the preprocessing three-dimensional voxel model through which the projection line passes belongs or the relative relationship with the tissue to which the surrounding voxels belong; the dynamic step length calculation module takes the preprocessing three-dimensional voxel model as input, and calculates the sampling step length of the CT image according to the characteristics of the preprocessing three-dimensional voxel data, and the sampling step length is calculated on the line segment where the ray intersects with the CT image. The light projection calculation module is used to calculate the projection value of light on all pixels of the flat receiving point; the light projection calculation module takes the segmented sampling step as input, calculates the projection value of light according to the segmented sampling step and its corresponding CT value, and obtains the projection value on all pixels of the flat receiving point as output as DRR image
[0030] like Figure 1 As shown, the present invention also includes a DRR image generation method based on dynamic step size, comprising the following steps:
[0031] (1) establishing a preprocessed 3D voxel model based on the 3D voxel data of the CT image and the relationship between the CT values of the voxels, specifically: grouping each voxel in the 3D voxel data of the CT image according to the distribution range of the voxel CT value, and determining the tissue number corresponding to each voxel or the relationship between each voxel and the tissue to which the surrounding voxels belong based on the grouping;
[0032] The tissue number corresponding to each voxel is determined according to the grouping, and the method is to traverse each voxel and determine the tissue number according to the tissue range to which the voxel CT value belongs, and generate a preprocessed three-dimensional voxel model;
[0033] The relationship of each voxel to the tissue to which the surrounding voxels belong is determined by traversing each voxel of the three-dimensional CT voxel data and marking each voxel with a number called a circle value. When one circle of voxels (up to 26, with less than 26 edge voxels) around a voxel in the three-dimensional voxel model belongs to at least a different tissue from the central voxel, the circle value is determined to be 0; when one circle of voxels around the voxel is within the range of human tissue CT values corresponding to the central voxel, the circle value is determined to be 1; when two circles of voxels (up to 74, with less than 74 edge voxels) around the voxel are within the range of human tissue CT values corresponding to the central voxel, the circle value is determined to be 2, and so on, traversing all voxels to establish a preprocessed three-dimensional voxel model.
[0034] (2) emitting a plurality of projection lines along the virtual light source toward the preprocessed three-dimensional voxel model; wherein the number of the projection lines is the same as the number of pixels of the receiving plate;
[0035] (3) calculating the intersection of each projection line entering and exiting the voxel model, and calculating the segmented sampling step and the CT value corresponding to the segmented sampling step based on the preprocessed three-dimensional voxel model;
[0036] (4) The CT value corresponding to the sampling step is multiplied by the corresponding sampling step and then accumulated to obtain the projection value of the projection line onto the receiving plate. All projection lines are traversed to obtain the projection values of all pixels on the receiving plate to obtain the DRR image.
[0037] When carrying out the preprocessing 3D voxel model step, traverse each voxel to determine the tissue number according to the tissue range to which the voxel CT value belongs. The range of tissue CT values is shown in Table 1, and the preprocessing 3D voxel model is generated. The CT value unit is the Hounsfield unit, expressed as HU, which is the reflection of human tissue on CT, but does not represent the true density of human tissue. The CT value is based on the CT value of water 0. The highest CT value is 1000 for bones, the lowest is -1000 for air, and soft tissue is generally between 40-60; hematoma is between 60-80, fat is between -10 and -30, calcification is between 100-300, and the CT value range is between -1000 and 1000.
[0038] Table 1
[0039]
[0040] The segmented sampling step size is dynamically changed, and the segmented sampling step size of the ray is determined according to the tissue to which the three-dimensional voxel through which the projection line passes belongs or the relative relationship with the tissue to which the surrounding voxels belong; the segmented sampling step size is multiplied according to the initial step size or increased in steps not less than the minimum value of the voxel model unit voxel in three dimensions. The CT value corresponding to the sampling step size is calculated by three-dimensional linear interpolation of the CT values of the eight voxel points adjacent to the midpoint of the sampling step size.
[0041] When the segmented sampling step length calculation method is adopted in which the initial step length is multiplied, the following steps are included:
[0042] (i) setting an initial step length, calculating the CT value of the CT three-dimensional model voxel corresponding to the midpoint of the initial step length and the CT value of the CT three-dimensional model voxel corresponding to the end point of the initial step length;
[0043] (ii) If the CT values of the two belong to the same tissue range, the step length is increased by 1, and the voxel CT values of the midpoint and end point of the new step length are calculated again and compared, until the voxel CT values corresponding to the end point of the step length do not belong to the same tissue;
[0044] (iii) determining the current segmentation step length and calculating the CT value corresponding to the midpoint of the step length;
[0045] (iv) Calculate the next dynamic step length according to the above steps until the end of the step length exceeds the CT range; at this time, take the intersection point where the ray exceeds the CT boundary as the end point of the last dynamic step length, and calculate the CT value corresponding to the last dynamic step length.
[0046] When a segmented sampling step length calculation method is adopted that increases the step length by not less than the minimum value of the voxel model unit voxel in three dimensions, the following steps are included:
[0047] (a) Set the initial step length d0 of the projection line and calculate the circle value C of the voxel corresponding to the end point of the initial step length;
[0048] (b) If the circle value C is not 0, the dynamic step size of this segment is updated and calculated as d0+C*min{Sx,Sy,Sz}, where Sx, Sy, and Sz are the sizes of the three-dimensional model unit voxel in the three-dimensional directions of x, y, and z respectively;
[0049] (c) The dynamic step size is updated cyclically until C=0, and the step size update is terminated.
Claims
1. A DRR image generation system based on dynamic step size, characterized by: It includes an image preprocessing module, a dynamic step length calculation module and a light projection calculation module, wherein the image preprocessing module is used to establish a preprocessed three-dimensional voxel model based on the three-dimensional voxel data of the CT image and the relationship between the CT values of the voxels; the dynamic step length calculation module is used to calculate the segmented sampling step length of the ray according to the tissue to which the voxel of the preprocessed three-dimensional voxel model through which the projection line passes belongs or the relative relationship with the tissue to which the surrounding voxels belong; the light projection calculation module is used to calculate the projection value of the light on all pixels of the flat receiving point; The image preprocessing module takes the CT image as input and converts the original CT image into a preprocessed 3D voxel model according to the CT value characteristics of the 3D voxel data of the CT image. The preprocessed 3D voxel model has the same size as the original CT image. The dynamic step length calculation module takes the preprocessed three-dimensional voxel model as input, and calculates the sampling step length of the CT image according to the preprocessed three-dimensional voxel data feature segmentation, and the segmented sampling step length is calculated on the line segment where the light intersects the CT image; The light projection calculation module takes the segmented sampling step length as input, calculates the projection value of the light according to the segmented sampling step length and its corresponding CT value, and obtains the projection values on all pixels of the flat panel receiving point and outputs them as a DRR image.
2. A DRR image generation method based on dynamic step size, characterized in that: The method is applied to the DRR image generation system based on dynamic step size as described in claim 1, and the method comprises the following steps: (1) Establish a preprocessed 3D voxel model based on the 3D voxel data of CT images and the relationship between CT values of voxels; (2) sending a number of projection lines along the virtual light source to the preprocessed three-dimensional voxel model; (3) calculating the intersection of each projection line entering and exiting the voxel model, and calculating the segmented sampling step and the CT value corresponding to the segmented sampling step based on the preprocessed three-dimensional voxel model; (4) The CT value corresponding to the sampling step is multiplied by the corresponding sampling step and then accumulated to obtain the projection value of the projection line onto the receiving plate. All projection lines are traversed to obtain the projection values of all pixels on the receiving plate to obtain the DRR image.
3. The DRR image generation method based on dynamic step size according to claim 2, characterized in that: In step (1), each voxel in the three-dimensional voxel data of the CT image is grouped according to the distribution range of the voxel CT value, and the tissue number corresponding to each voxel is determined according to the grouping, or the relationship of each voxel to the tissue to which the surrounding voxels belong is determined.
4. The DRR image generation method based on dynamic step size according to claim 2, characterized in that: In step (2), the number of the projection lines is the same as the number of pixels of the receiving plate.
5. The DRR image generation method based on dynamic step size according to claim 2, characterized in that: In step (3), the segmented sampling step length of the ray is determined according to the tissue to which the three-dimensional voxel through which the projection line passes belongs or its relative relationship with the tissue to which the surrounding voxels belong.
6. The DRR image generation method based on dynamic step size according to claim 5, characterized in that: The calculation methods of the segmented sampling step length include two methods, one is to increase it exponentially according to the initial step length, and the other is to increase it in steps by not less than the minimum value of the voxel model unit voxel in three dimensions.
7. The DRR image generation method based on dynamic step size according to claim 6, characterized in that: When the segmented sampling step length calculation method is adopted in which the initial step length is multiplied, the following steps are included: (i) setting an initial step length, calculating the CT value of the CT three-dimensional model voxel corresponding to the midpoint of the initial step length and the CT value of the CT three-dimensional model voxel corresponding to the end point of the initial step length; (ii) If the CT values of the two belong to the same tissue range, the step length is increased by 1, and the voxel CT values of the midpoint and end point of the new step length are calculated again and compared, until the voxel CT values corresponding to the end point of the step length do not belong to the same tissue; (iii) determining the current segmentation step length and calculating the CT value corresponding to the midpoint of the step length; (iv) Calculate the next dynamic step length according to the above steps until the end of the step length exceeds the CT range; at this time, take the intersection point where the ray exceeds the CT boundary as the end point of the last dynamic step length, and calculate the CT value corresponding to the last dynamic step length.
8. The DRR image generation method based on dynamic step size according to claim 6, characterized in that: When a segmented sampling step length calculation method is adopted that increases the step length by not less than the minimum value of the voxel model unit voxel in three dimensions, the following steps are included: (a) Set the initial step length of the projection line and calculate the circle value of the voxel corresponding to the end point of the initial step length; (b) If the circle value C is not 0, the dynamic step size of this segment is updated and calculated as d0+C*min{Sx,Sy,Sz}, where d0 is the initial step size of the projection line, and Sx, Sy, and Sz are the sizes of the three-dimensional model unit voxel in the x, y, and z directions respectively; (c) The dynamic step size is updated cyclically until C=0, and the step size update is terminated.
Citation Information
Patent Citations
Dual-energy CT (Computer Tomography) scan data based detection method for reconstructing projected image
CN103729868A
Method, system and device for obtaining digital image reconstruction image and storage medium
CN111243082A