Method for establishing standard lung function image based on ventilation blood perfusion weight
Through a Python and 3Dslicer-based method, combined with 4D-CT and PET/CT images, a ventilated blood flow perfusion weight is established to generate a lung function matrix that reflects the joint impact of lung ventilation and blood flow perfusion, which solves the problem that lung ventilation and blood flow perfusion cannot be considered at the same time in the prior art, and achieves a more accurate lung function assessment and reduces economic costs.
Patent Information
- Application Number
- CN202411723037.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-18
- 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 incomplete consistency of results and problems of poor stability, artifacts and high economic costs.
Using Python and 3Dslicer-based methods, the ventilated blood flow perfusion weight was established through 4D-CT and PET/CT images, and the Jacobian algorithm was used to reduce dimensionality and re-classify the lung function matrix reflecting the joint effects of lung ventilation and blood flow perfusion.
It realizes a more accurate reflection of the lung function condition, makes up for the conceptual defects in the prior art, reduces the conditions for generating lung function images, and improves the application and promotion of the method.
Smart Images

Figure CN119650013A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lung function assessment, and in particular to a method for establishing a standard lung function image based on ventilation and blood perfusion weights. Background Art
[0002] Pulmonary function refers to the various functions of the lungs, including breathing, 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 the standard for evaluating and measuring lung function. Pulmonary function imaging technology uses different imaging techniques 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 rays 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 can be used in the diagnosis and prognosis evaluation of acute or chronic lung diseases.
[0003] At present, there are three types of pulmonary function imaging: pulmonary ventilation function imaging based on computed tomography (CT), blood perfusion imaging based on positron emission tomography (PET), and blood perfusion imaging based on magnetic resonance imaging (MRI). Based on the changes in the acquired related images, including changes in volume, grayscale and other information, traditional image processing technology, deep learning technology, etc., are used to build models and statistics to calculate and predict functional parameters and segment different functional areas of the image.
[0004] However, the inventors of the present application have found through research that the currently used pulmonary function imaging methods 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, the stability of CT ventilation function imaging is poor, the process involves image registration, and the ventilation image is sensitive to the choice of algorithm, resulting in low repeatability of the ventilation model or limitations in the selection of grayscale areas of the image. 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 acquired images, artifacts often appear, and the use of radionuclides will produce radiation to the human body, the clinical application of pulmonary function imaging based on blood perfusion 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 generating devices, 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 blood perfusion weights comprises the following steps:
[0008] S1. Use Python and 3Dslicer to obtain the deformation field matrix and gray value matrix:
[0009] 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 into Nii format, and the nibabel and torch modules of Python are called to preprocess the images in Nii format to obtain chest images retaining the entire lung, wherein the preprocessing includes standardization, resampling and cropping; in order to obtain lung tissue, the cropped image is binarized to obtain the mask area of the lung, i.e., the mask area, and further obtain the lung tissue area of the region of interest. This step obtains 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 into 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 point. 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 a 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, classifying and processing the gray value matrix of the PET image: using Python to read the gray value range of the PET lung region and normalize the value to between 0 and 1 to obtain a gray value change matrix, further dividing it into five equal parts, marking it according to the marking method of step S21, and re-saving the marked gray 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 gray value change matrix are multiplied to obtain a new matrix, the value of which is between 0 and 1; the values in the new matrix reflect the lung function under the combined influence of lung ventilation and blood perfusion, and the new matrix is scored at different levels of function. The larger the score value, the higher the level, indicating that the lung function level of the voxel is higher. The above-mentioned function score is 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 a 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 graded into six equal levels, namely, 0, 1, 2, 3, 4, and 5, for a total of six scoring levels.
[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 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.
[0024] Compared with the prior art, the method for establishing standard pulmonary function images based on ventilation-perfusion weights provided by the present invention is a quantitative analysis method for establishing pulmonary function image segmentation based on 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, making 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 pulmonary function image, reduce the conditions for generating pulmonary function images, and be more conducive to application and promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of a method for establishing a standard lung function image based on ventilation and blood perfusion weights provided by the present invention.
[0026] Figure 2 It is a schematic diagram of the deformation field matrix obtained by deformation registration using 4D-CT end-expiratory images and end-inspiratory images provided by the present invention.
[0027] Figure 3 It 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 easy to understand, the present invention is further described below with reference to specific diagrams.
[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 gray 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), and the nibabel and torch modules of Python are called to preprocess the images in Nii format to obtain chest images retaining the entire lung, wherein the preprocessing includes standardization, resampling and cropping, and the specific standardization, resampling and cropping are prior arts 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., a mask area, and further obtain a 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 inhalation.
[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 a fixed image, the 4D-CT end-inspiratory and PET images are selected as 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 point. 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. A total of 6 levels are divided and the labeled volume change matrix is saved again.
[0040] S22, classify and process the gray value matrix of the PET image: use Python to read the gray value range of the PET lung area and normalize the value to between 0 and 1 to obtain a gray value change matrix, further divide it into five equal parts, mark it according to the marking method of step S21, and re-save the marked gray value change matrix. In this step, the gray value represents the size of the PET perfusion capacity, where the gray value is 0, which is the worst, and the gray value is 5, which is 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 gray 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 pulmonary ventilation and blood perfusion, and 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, and the aforementioned 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 scored in six equal grades, namely, 0, 1, 2, 3, 4, and 5 (for example, Figure 3 When the score is 0, it is defined as the lowest functional area, and other scores gradually increase the marking 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 is 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 embodiment, those skilled in the art should understand that the image acquisition method based on 4D-CT can also be extended to CT images obtained by deep inspiration and deep exhalation breath holding, or CT images of other different respiratory periods. In addition, the image processing process based on 3Dslicer and Python in step S1 can be replaced by Python or Matlab alone.
[0047] Compared with the prior art, the method for establishing standard pulmonary function images based on ventilation-perfusion weights provided by the present invention is a quantitative analysis method for establishing pulmonary function image segmentation based on 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, making 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 pulmonary function image, reduce the conditions for generating pulmonary 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 solution of the present invention rather than to limit it. 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 solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should 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 blood perfusion weights, characterized in that: The following steps are involved: S1. Use Python and 3Dslicer to obtain the deformation field matrix and gray value matrix: 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 into Nii format, and the nibabel and torch modules of Python are called to preprocess the images in Nii format to obtain chest images retaining the entire lung, wherein the preprocessing includes standardization, resampling and cropping; in order to obtain lung tissue, the cropped image is binarized to obtain the mask area of the lung, i.e., the mask area, and further obtain the lung tissue area of the region of interest. This step obtains 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 into 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 point. 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 a 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, classifying and processing the gray value matrix of the PET image: using Python to read the gray value range of the PET lung region and normalize the value to between 0 and 1 to obtain a gray value change matrix, further dividing it into five equal parts, marking it according to the marking method of step S21, and re-saving the marked gray 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 gray value change matrix are multiplied to obtain a new matrix, the value of which is between 0 and 1; the values in the new matrix reflect the lung function under the combined influence of lung ventilation and blood perfusion, and the new matrix is scored at different levels of function. The larger the score value, the higher the level, indicating that the lung function level of the voxel is higher. The above-mentioned function score is 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 blood 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, 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.
3. The method for establishing a standard lung function image based on ventilation and blood perfusion weights according to claim 1, characterized in that: In step S12, the 4D-CT end-expiratory image is selected as a 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.
4. The method for establishing a standard lung function image based on ventilation and blood 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 blood 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
Glioma classification method and device based on twin neural network and radiomics
CN115861716A
Registration method and device applied to lung three-dimensional image processing
CN116934712A
Local pulmonary ventilation evaluation system based on different respiratory phase lung CT image registration
CN118429395A
Systems and methods for image segmentation
US20220301224A1
Cited By
Method and system for determining and diagnosing maximum expiratory first-second expiratory volume and dynamic X-ray camera
CN121242606A