A method for establishing standard pulmonary function images based on ventilation and perfusion weights
Through image processing methods based on 4D-CT and PET/CT, a lung function matrix reflecting lung ventilation and blood flow perfusion was generated, which solved the problem of inaccurate lung function images in the prior art, and achieved more efficient lung function evaluation and visualization.
Patent Information
- Application Number
- CN202411723037.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The existing lung function imaging methods cannot consider both lung ventilation and blood flow perfusion capabilities, resulting in inconsistent evaluation results, and there are problems such as poor image stability, additional scans increase patient burden and economic costs.
The ventilation-blood flow perfusion weight establishment method based on 4D-CT and PET/CT images was used to generate a lung function matrix reflecting the joint influence of lung ventilation and blood flow perfusion through image preprocessing, registration and reclassification, and image processing and visualization were performed using Python and 3Dslicer.
It realizes a more accurate reflection of lung function, reduces the need for additional scans, improves the accuracy and visualization of lung function images, supports the creation of deep learning models, and promotes and applications.
Smart Images

Figure CN119650013B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pulmonary function assessment, and in particular to a method for establishing a standard pulmonary function image based on ventilation and blood perfusion weights. Background Art
[0002] Pulmonary function refers to the various functions of the lungs, including respiration, defense, and metabolism. Clinically, the ability of alveolar ventilation and the exchange of oxygen and carbon dioxide with the blood flow in the surrounding capillaries are usually used as standards for evaluating and measuring lung function. Pulmonary function imaging technology uses different imaging technologies to evaluate the structure and functional status of the lungs, which can achieve quantitative analysis of lung function and functional area division on the image. The advantage of using pulmonary function imaging in radiotherapy is that it can realize the individualized design of treatment plans, allowing radiation to pass through areas of lung tissue with poor gas exchange function and reach the tumor location, thereby reducing the possibility of good lung tissue being damaged after radiotherapy. In addition, pulmonary function imaging can make a more accurate and timely assessment of lung damage, and even monitor lung function in real time, which is used in the diagnosis and prognosis of acute or chronic lung diseases.
[0003] Currently, three lung function imaging methods exist: computed tomography (CT)-based lung ventilation imaging, positron emission tomography (PET)-based blood perfusion imaging, and magnetic resonance imaging (MRI)-based blood perfusion imaging. Based on the changes in the acquired relevant images, including changes in volume and grayscale, traditional image processing techniques, deep learning technologies, and other technologies are used to construct models and perform statistics to calculate and predict functional parameters and segment different functional areas of the image.
[0004] However, the inventors of this application have found through research that the currently used pulmonary function imaging methods all have certain deficiencies and cannot accurately reflect the functional status of the lungs, which are specifically manifested in the following three aspects: (1) In principle, the evaluation of pulmonary function involves pulmonary ventilation capacity and peripheral blood perfusion capacity, but the currently used functional imaging methods do not take both into account at the same time. Therefore, the results obtained, although related, are not completely consistent. For example, the ventilation function based on CT only considers the ability of alveolar ventilation and does not consider blood perfusion, while the functional imaging based on PET and MRI only considers blood perfusion and does not fully consider the ventilation capacity. (2) From a technical point of view, CT ventilation function imaging has poor stability. The process involves image registration, and ventilation images are sensitive to the choice of algorithms, resulting in low repeatability of ventilation models or limitations in the selection of grayscale areas of images. There is no clear indicator for the definition of functional lungs obtained by PET and MRI. At the same time, due to the low resolution of the images obtained, artifacts often appear, and the use of radionuclides will produce radiation to the human body, the application of pulmonary function imaging based on blood perfusion in clinical practice is also limited. (3) Considering the economic cost, in radiotherapy, ventilation functional imaging based on CT does not require additional scanning, but functional imaging based on PET and MRI of inhaled gases is necessary. Additional scanning will increase the economic burden on patients. In addition, inhaled gases such as 3He require expensive gas generators, which also limits the promotion and application of this technology. Summary of the Invention
[0005] In view of the technical problem that the existing pulmonary function imaging methods all have certain shortcomings and cannot accurately reflect the pulmonary function status, the present invention provides a method for establishing a standard pulmonary function image based on ventilation and blood perfusion weights.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] A method for establishing a standard lung function image based on ventilation and perfusion weights comprises the following steps:
[0008] S1. Use Python and 3Dslicer to obtain the deformation field matrix and grayscale value matrix:
[0009] S11. Image preprocessing: The original DICOM formats of the three types of images, namely, the end-inspiratory and end-expiratory images based on 4D-CT and the PET / CT images, are converted and saved in Nii format. The images in Nii format are preprocessed by calling the nibabel and torch modules of Python to obtain chest images that retain the entire lung. The preprocessing includes normalization, resampling, and cropping. To obtain lung tissue, the cropped images are binarized to obtain a mask region of the lung, which is then used to obtain the lung tissue region of interest. This step results in three sets of Nii images of the same size.
[0010] S12. Use 3Dslicer to register the Nii image: Call the Elastix registration model of 3Dslicer to perform image deformation registration on the Nii image to obtain the deformation field matrix and the grayscale image after PET registration; use SimpleITK to read the grayscale image after PET registration and convert it to Numpy format to obtain the grayscale value matrix reflecting the SUV value of the PET image;
[0011] S2. Reclassify the deformation field matrix and the gray value matrix:
[0012] S21. Use Python's SITK and Numpy modules to perform Jacobi algorithm dimensionality reduction on the deformation field matrix to obtain the Jacobi matrix reflecting the deformation variable of each pixel. The formula is expressed as:
[0013]
[0014] Among them, D x (x,y,z0,D y (x,y,z),D z (x, y, z) represent the displacement components of the pixel on the x, y, and z axes, respectively; (p) between 0 and 1 indicates that the voxel volume is reduced, (p) = 1 indicates that the voxel volume has not changed, and (p) > 1 indicates that the voxel volume is expanded; the value of the Jacobian matrix is normalized to between 0 and 1 to obtain the volume change matrix, which is further divided into five equal parts, and the grayscale values less than or equal to 0 are set to 0, the grayscale values greater than 0 and less than or equal to the one-fifth digit are set to 1, the grayscale values greater than the one-fifth digit and less than or equal to the median of two-fifths are set to 2, the grayscale values greater than two-fifths and less than or equal to the three-fifths digit are set to 3, the grayscale values greater than three-fifths and less than or equal to the four-fifths digit are set to 4, and the grayscale values greater than the four-fifths digit are set to 5. A total of 6 levels are divided and the labeled volume change matrix is re-saved;
[0015] S22. Classify the grayscale value matrix of the PET image: Use Python to read the grayscale value range of the PET lung region and normalize the values to between 0 and 1 to obtain a grayscale change matrix. Further divide the matrix into five equal parts, mark it according to the marking method of step S21, and then save the marked grayscale value change matrix.
[0016] S3. Reclassify according to the graded volume change matrix and gray value change matrix:
[0017] Using Python's Numpy module, the volume change matrix and the grayscale value change matrix were multiplied to obtain a new matrix with values between 0 and 1. The values in the new matrix reflect the lung function under the combined influence of lung ventilation and blood perfusion. Based on this, the new matrix was given different levels of functional scores. The larger the score, the higher the level, indicating that the voxel has a higher lung function level. The above functional scores were performed on each voxel to obtain a new lung function matrix.
[0018] S4. Visualization results:
[0019] The new lung function matrix was visualized using Python's Matplotlib and divided into regions according to different functional levels, ultimately obtaining functional images based on ventilation-perfusion data.
[0020] Furthermore, in step S11, the original sizes of the three types of images are 512*512*512 mm, the resampled sizes are 1*1*1 mm, and the sizes of the three groups of Nii images finally obtained are 332*205*242 mm.
[0021] Furthermore, in step S12, the 4D-CT end-expiratory image is selected as the fixed image, the 4D-CT end-inspiratory and PET images are selected as floating images, and other parameters remain unchanged to perform image deformation registration.
[0022] Furthermore, in step S3, the new matrix is scored according to six equal-grade functions, and the new matrix is divided into six scoring levels: 0, 1, 2, 3, 4, and 5.
[0023] Furthermore, in step S4, corresponding to the six scoring level values divided by the new matrix, the colors corresponding to the functional images finally obtained based on ventilation-perfusion data are set to black, green, blue, yellow, orange and red respectively, and the larger the value, the better the lung function.
[0024] Compared with the existing technology, the method provided by the present invention for establishing standard lung function images based on ventilation-perfusion weights is a quantitative analysis method for establishing lung function image segmentation based on the ventilation-perfusion weights of 4D-CT and PET / CT images. This method simultaneously takes into account the ventilation capacity and blood perfusion capacity of the lungs, makes up for the conceptual defects in existing research, and can more accurately reflect the imaging conditions of different lung function areas. Furthermore, deep learning-based labeled functional imaging can be used to create a prediction model, create a correlation between conventional CT and the lung function image, reduce the conditions for generating lung function images, and be more conducive to application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of the method for establishing standard lung function images based on ventilation and blood perfusion weights provided by the present invention.
[0026] Figure 2 This is a schematic diagram of the deformation field matrix obtained by deformation registration using 4D-CT end-expiratory images and end-inspiratory images, as provided by the present invention.
[0027] Figure 3 This is a schematic diagram of a new lung function matrix reflecting ventilation function and blood perfusion function provided by the present invention.
[0028] Figure 4 It is a schematic diagram of functional imaging based on ventilation change data (volume change matrix), blood perfusion data (gray value change matrix) and ventilation-blood perfusion data (new lung function matrix) provided by the present invention. DETAILED DESCRIPTION
[0029] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below with reference to specific illustrations.
[0030] Please refer to Figure 1 As shown, the present invention provides a method for establishing a standard lung function image based on ventilation and blood perfusion weights, comprising the following steps:
[0031] S1. Use Python and 3Dslicer to obtain the deformation field matrix and grayscale value matrix:
[0032] S11. Image preprocessing: The original DICOM format of the three types of images, namely the end-inspiratory and end-expiratory images based on 4D-CT and the PET / CT images, are converted and saved in Nii format (i.e., the image format is converted from DICOM to Nii). The nibabel and torch modules of Python are called to preprocess the images in Nii format to obtain chest images that retain the entire lung. The preprocessing includes standardization, resampling and cropping. The specific standardization, resampling and cropping are existing technologies well known to those skilled in the art. In order to obtain lung tissue, the cropped image is binarized to obtain a mask area of the lung, i.e., the mask area, and further obtain the lung tissue area of interest. This step obtains three groups of Nii images of the same size, which are the processed 4D-CT images and PET / CT images at the end of expiration and inspiration.
[0033] As a specific embodiment, the original sizes of the three types of images in step S1 are 512*512*512 mm, the resampled sizes are 1*1*1 mm, and the sizes of the three groups of Nii images finally obtained are 332*205*242 mm.
[0034] S12. Use 3Dslicer to register the Nii image: Call the Elastix registration model of 3Dslicer to perform image deformation registration on the Nii image to obtain the deformation field matrix and the grayscale image after PET registration; use SimpleITK to read the grayscale image after PET registration and convert it to Numpy format to obtain the grayscale value matrix reflecting the SUV value of the PET image.
[0035] As a specific embodiment, in step S12, the 4D-CT end-expiratory image is selected as the fixed image, the 4D-CT end-inspiratory and PET images are selected as the floating images, and other parameters remain unchanged, and image deformation registration is performed to obtain the following: Figure 2 The deformation field matrix and the grayscale image after PET registration are shown.
[0036] S2. Reclassify the deformation field matrix and the gray value matrix:
[0037] S21. Use Python's SITK and Numpy modules to perform Jacobi algorithm dimensionality reduction on the deformation field matrix to obtain the Jacobi matrix reflecting the deformation variable of each pixel. The formula is expressed as:
[0038]
[0039] Among them, D x (x,y,z),D y (x,y,z),D z(x, y, z) represent the displacement components of the pixel on the x, y, and z axes, respectively; (p) between 0 and 1 indicates that the voxel volume is reduced, (p) = 1 indicates that the voxel volume has not changed, and (p) > 1 indicates that the voxel volume is expanded, and the ventilation function of this part is the best; the value of the Jacobian matrix is normalized to between 0 and 1 to obtain the volume change matrix, which is further divided into five equal parts, and the grayscale values less than or equal to 0 are set to 0, the grayscale values greater than 0 and less than or equal to the one-fifth digit are set to 1, the grayscale values greater than the one-fifth digit and less than or equal to the median of two-fifths are set to 2, the grayscale values greater than two-fifths and less than or equal to the three-fifths digit are set to 3, the grayscale values greater than three-fifths and less than or equal to the four-fifths digit are set to 4, and the grayscale values greater than the four-fifths digit are set to 5, for a total of 6 levels, and the labeled volume change matrix is re-saved.
[0040] S22. Classify the grayscale value matrix of the PET image: Use Python to read the grayscale value range of the PET lung region and normalize the values to between 0 and 1 to obtain a grayscale change matrix. This matrix is then divided into five equal parts. After labeling according to the labeling method in step S21, the labeled grayscale change matrix is saved. In this step, the grayscale value represents the PET perfusion capacity, with a grayscale value of 0 being the worst and a grayscale value of 5 being the best.
[0041] S3. Reclassify according to the graded volume change matrix and gray value change matrix:
[0042] Using Python's Numpy module, multiply the volume change matrix and the grayscale value change matrix to obtain a new matrix. The value of the new matrix is between 0 and 1. For the specific process, please refer to Figure 3 As shown; the values in the new matrix reflect the lung function under the combined influence of lung ventilation and blood perfusion. Based on this, the new matrix can be given different levels of functional scores according to the needs in actual applications. For example, the values of the new matrix are divided into five equal parts, and the marking method is as shown in step S21; wherein, the larger the score value, the higher the level, indicating that the lung function level of the voxel is higher. The above-mentioned functional score is performed on each voxel to obtain a new lung function matrix.
[0043] As a specific embodiment, in step S3, the new matrix is graded into six equal levels: 0, 1, 2, 3, 4, and 5 (e.g. Figure 3 When the score is 0, it is defined as the lowest functional area, and other scores gradually increase the mark value according to the corresponding ventilation function and gray value.
[0044] S4. Visualization results:
[0045] The new lung function matrix is visualized using Python's Matplotlib and divided into regions according to different functional levels, and finally a functional image based on ventilation-perfusion data is obtained. As a specific embodiment, Figure 4 As shown, in this step, the six scoring levels corresponding to the new matrix division are 0, 1, 2, 3, 4, and 5, and the colors corresponding to the functional images based on ventilation change data (volume change matrix), blood perfusion data (gray value change matrix), and ventilation-blood perfusion data (new lung function matrix) are set to black, green, blue, yellow, orange, and red, respectively. The larger the value, the better the lung function.
[0046] As a specific example, those skilled in the art will appreciate that the 4D-CT-based image acquisition method can also be extended to CT images acquired during deep inspiration and deep expiration breath-hold, or other CT images acquired during different respiratory periods. Furthermore, the image processing process in step S1 based on 3Dslicer and Python can be replaced solely by Python or Matlab.
[0047] Compared with the existing technology, the method provided by the present invention for establishing standard lung function images based on ventilation-perfusion weights is a quantitative analysis method for establishing lung function image segmentation based on the ventilation-perfusion weights of 4D-CT and PET / CT images. This method simultaneously takes into account the ventilation capacity and blood perfusion capacity of the lungs, makes up for the conceptual defects in existing research, and can more accurately reflect the imaging conditions of different lung function areas. Furthermore, deep learning-based labeled functional imaging can be used to create a prediction model, create a correlation between conventional CT and the lung function image, reduce the conditions for generating lung function images, and be more conducive to application and promotion.
[0048] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for establishing a standard lung function image based on ventilation and perfusion weights, characterized in that: The following steps are involved: S1. Use Python and 3Dslicer to obtain the deformation field matrix and grayscale value matrix: S11. Image preprocessing: The original DICOM formats of the three types of images, namely, the end-inspiratory and end-expiratory images based on 4D-CT and the PET / CT images, are converted and saved in Nii format. The images in Nii format are preprocessed by calling the nibabel and torch modules of Python to obtain chest images that retain the entire lung. The preprocessing includes normalization, resampling, and cropping. To obtain lung tissue, the cropped images are binarized to obtain a mask region of the lung, which is then used to obtain the lung tissue region of interest. This step results in three sets of Nii images of the same size. S12. Use 3Dslicer to register the Nii image: Call the Elastix registration model of 3Dslicer to perform image deformation registration on the Nii image to obtain the deformation field matrix and the grayscale image after PET registration; use SimpleITK to read the grayscale image after PET registration and convert it to Numpy format to obtain the grayscale value matrix reflecting the SUV value of the PET image; S2. Reclassify the deformation field matrix and the gray value matrix: S21. Use Python's SITK and Numpy modules to perform Jacobi algorithm dimensionality reduction on the deformation field matrix to obtain the Jacobi matrix reflecting the deformation variable of each pixel. The formula is expressed as: Among them, D x (x,y,z),D y (x,y,z),D z (x, y, z) represent the displacement components of the pixel on the x, y, and z axes respectively; (p) between 0 and 1 indicates that the voxel volume is reduced, (p) = 1 indicates that the voxel volume has not changed, and (p) > 1 indicates that the voxel volume is expanded; the value of the Jacobian matrix is normalized to between 0 and 1 to obtain the volume change matrix, which is further divided into five equal parts, and the grayscale values less than or equal to 0 are set to 0, the grayscale values greater than 0 and less than or equal to the one-fifth digit are set to 1, the grayscale values greater than the one-fifth digit and less than or equal to the median of two-fifths are set to 2, the grayscale values greater than two-fifths and less than or equal to the three-fifths digit are set to 3, the grayscale values greater than three-fifths and less than or equal to the four-fifths digit are set to 4, and the grayscale values greater than the four-fifths digit are set to 5. A total of 6 levels are divided and the labeled volume change matrix is re-saved; S22. Classify the grayscale value matrix of the PET image: Use Python to read the grayscale value range of the PET lung region and normalize the values to between 0 and 1 to obtain a grayscale change matrix. Further divide the matrix into five equal parts, mark it according to the marking method of step S21, and then save the marked grayscale value change matrix. S3. Reclassify according to the graded volume change matrix and gray value change matrix: Using Python's Numpy module, the volume change matrix and the grayscale value change matrix were multiplied to obtain a new matrix with values between 0 and 1. The values in the new matrix reflect the lung function under the combined influence of lung ventilation and blood perfusion. Based on this, the new matrix was given different levels of functional scores. The larger the score, the higher the level, indicating that the voxel has a higher lung function level. The above functional scores were performed on each voxel to obtain a new lung function matrix. S4. Visualization results: The new lung function matrix was visualized using Python's Matplotlib and divided into regions according to different functional levels, ultimately obtaining functional images based on ventilation-perfusion data.
2. The method for establishing a standard lung function image based on ventilation and perfusion weights according to claim 1, characterized in that: The original sizes of the three types of images in step S11 are 512*512*512 mm, and the resampled sizes are 1*1*1 mm. Finally, the sizes of the three groups of Nii images obtained are 332*205*242 mm.
3. The method for establishing a standard lung function image based on ventilation and perfusion weights according to claim 1, characterized in that: In step S12, the 4D-CT end-expiratory image is selected as the fixed image, the 4D-CT end-inspiratory and PET images are selected as the floating images, and other parameters remain unchanged to perform image deformation registration.
4. The method for establishing a standard lung function image based on ventilation and perfusion weights according to claim 1, characterized in that: In step S3, the new matrix is scored by six equal-grade functions, and the new matrix is divided into six scoring levels: 0, 1, 2, 3, 4, and 5.
5. The method for establishing a standard lung function image based on ventilation and perfusion weights according to claim 4, characterized in that: In step S4, corresponding to the six scoring level values divided by the new matrix, the colors corresponding to the functional images finally obtained based on the ventilation-perfusion data are set to black, green, blue, yellow, orange and red respectively, and the larger the value, the better the lung function.
Citation Information
Patent Citations
Spinal deformation crowd recognition method and device, computer equipment and storage medium
CN111666890A
Local pulmonary ventilation evaluation system based on different respiratory phase lung CT image registration
CN118429395A