Disclosure of Invention
The technical problem to be solved by the invention is to provide a radiographic image processing method and a radiographic image processing device based on respiratory motion, which can reduce PET image respiratory artifacts after PET image reconstruction by utilizing CT images.
In order to achieve the purpose, the invention adopts the following technical scheme:
a radiographic image processing method based on respiratory motion comprises the following steps:
acquiring a correction image and PET scanning data;
obtaining a first respiratory motion curve and a second respiratory motion curve according to diaphragm image data in the chest X-ray image;
fitting the first respiratory motion curve and the second respiratory motion curve to obtain a respiratory motion fitting curve;
according to the corrected image, the PET scanning data and the respiratory motion fitting curve, matching frame PET data corresponding to the phase information of the corrected image are searched in the PET scanning data;
and carrying out attenuation correction on the matched frame PET data according to the corrected image.
Preferably, the obtaining of the first respiratory motion profile and the second respiratory motion profile includes:
extracting diaphragm image data in a chest X-ray image;
performing time domain analysis on the diaphragm image data to obtain a first analysis result;
performing frequency domain analysis on the diaphragm image data to obtain a second analysis result;
generating a first respiratory motion curve according to the first analysis result;
and generating a second respiratory motion curve according to the second analysis result.
Preferably, the extracting diaphragm image data in the chest X-ray image includes:
reading pixel points of each row of pixel points of the chest X-ray image from bottom to top;
when the gray value of the continuous preset number of pixel points is greater than the second gray value threshold, and the gray value of the next continuous preset number of pixel points is less than the second gray value threshold and greater than the first gray value threshold, determining diaphragm pixel points in each row of pixel points;
and sequentially reading diaphragm pixel points in each row of pixel points from left to right to obtain diaphragm image data in the chest X-ray image.
Preferably, the performing time-domain analysis on the diaphragm image data to obtain a first analysis includes:
calculating the slope between any two adjacent pixel points in the diaphragm image data;
calculating the average of all slopes;
calculating the variance according to the slope and the average number;
judging whether the variance is larger than a first preset threshold value or not, if so, confirming that the diaphragm image is fuzzy and the patient has respiratory motion when shooting an X-ray image; otherwise, the diaphragm image is confirmed to be clear, and the patient does not have respiratory motion when taking the X-ray image.
Preferably, the performing frequency domain analysis on the diaphragm image data to obtain a second analysis result includes:
converting the diaphragm image data into diaphragm frequency domain signal data;
acquiring a low-frequency signal in diaphragm frequency domain signal data;
judging whether the number of the low-frequency signals is larger than a second preset threshold value or not, if so, confirming that the diaphragm image is fuzzy and the patient has respiratory motion when shooting an X-ray image; otherwise, the diaphragm image is confirmed to be clear, and the patient does not have respiratory motion when taking the X-ray image.
Preferably, the searching, according to the corrected image, the PET scan data, and the fitted curve of respiratory motion, the PET scan data corresponding to the phase information of the corrected image in the PET scan data, and using the PET scan data as the PET data of the matched frame includes:
acquiring correction data of a correction image;
obtaining phase information of the correction data in the respiratory motion fitting curve according to the correction data and the respiratory motion fitting curve;
and searching PET scanning data matched with the phase information in the PET scanning data according to the phase information, the respiratory motion fitting curve and the PET scanning data, and taking the PET scanning data as matching frame PET data.
Preferably, the searching for the PET scan data matched with the phase information in the PET scan data according to the phase information, the fitting curve of respiratory motion, and the PET scan data as the matching frame PET data includes:
according to the phase information and a first respiratory motion fitting curve, searching a plurality of time point information corresponding to the phase information in the first respiratory fitting curve;
and searching PET scanning data matched with the plurality of time point information in a second respiration fitting curve according to the plurality of time point information and the second respiration fitting curve, and taking the PET scanning data as matched frame PET data.
The present invention also provides a radiographic image processing apparatus based on respiratory motion, comprising:
the acquisition module is used for acquiring a correction image and PET scanning data;
the processing module is used for obtaining a first respiratory motion curve and a second respiratory motion curve according to diaphragm image data in the chest X-ray image;
the fitting module is used for fitting the first respiratory motion curve and the second respiratory motion curve to obtain a respiratory motion fitting curve;
the matching module is used for searching the matching frame PET data corresponding to the phase information of the correction image in the PET scanning data according to the correction image, the PET scanning data and the respiratory motion fitting curve;
and the correction module is used for carrying out attenuation correction on the matched frame PET data according to the corrected image.
Preferably, the processing module comprises:
the diaphragm extraction unit is used for extracting diaphragm image data in the chest X-ray image;
the time domain calculating unit is used for performing time domain analysis on the diaphragm image data to obtain a first analysis result;
the frequency domain calculating unit is used for carrying out frequency domain analysis on the diaphragm muscle image data to obtain a second analysis result;
the first generation unit is used for generating a first respiratory motion curve according to the first analysis result;
and the second generation unit is used for generating a second respiratory motion curve according to the second analysis result.
Preferably, the time domain calculating unit includes:
the slope calculation component is used for calculating the slope between any two adjacent pixel points in the diaphragm image data;
an average calculating component for calculating an average of all slopes;
the variance calculation component is used for calculating the variance according to the slope and the average number;
the first judgment component is used for judging whether the variance is larger than a first pre-examination threshold value or not, if so, determining that the diaphragm image is fuzzy, and the patient has respiratory motion when shooting an X-ray image; otherwise, the diaphragm image is confirmed to be clear, and the patient does not have respiratory motion when the X-ray image is shot;
the frequency domain calculating module includes:
the conversion component is used for converting the diaphragm image data into diaphragm frequency domain signal data;
the acquisition component is used for acquiring a low-frequency signal in diaphragm frequency domain signal data;
the second judgment component is used for judging whether the number of the low-frequency signals is larger than a second preset threshold value or not, if so, the diaphragm image is determined to be fuzzy, and the patient has respiratory motion when the X-ray image is shot; otherwise, the diaphragm image is confirmed to be clear, and the patient does not have respiratory motion when taking the X-ray image.
According to the invention, a respiratory motion fitting curve is obtained by fitting the first respiratory motion curve and the second respiratory motion curve; extracting diaphragm image data in a chest X-ray image, and then obtaining chest respiratory motion curves (a first respiratory motion curve and a second respiratory motion curve) by adopting a time domain analysis and frequency domain analysis method; and then the corrected image, the PET scanning data and the respiratory motion fitting curve are used for searching the PET scanning data for the matching frame PET data corresponding to the phase information of the corrected image. Finally, attenuation correction is carried out on the matched frame PET data according to the corrected image. And searching the PET data of the matched frame corresponding to the phase information of the corrected image in the PET scanning data by mapping the corrected image to a respiratory motion fitting curve. Performing attenuation correction on the matched frame PET scanning data according to the corrected image so as to obtain a PET attenuation correction reconstructed image without breathing artifacts; furthermore, the chest respiratory motion curve is obtained by extracting diaphragm image data in the chest X-ray image and then adopting a time domain analysis method and a frequency domain analysis method, and after an X-ray plain film is shot, the image is detected in real time, so that the respiratory motion of the patient is effectively identified.
Detailed Description
As shown in fig. 1, the present invention discloses a radiographic image processing method based on respiratory motion, comprising:
acquiring a correction image and PET scanning data;
obtaining a first respiratory motion curve and a second respiratory motion curve according to diaphragm image data in the chest X-ray image;
fitting the first respiratory motion curve and the second respiratory motion curve to obtain a respiratory motion fitting curve;
according to the corrected image, the PET scanning data and the respiratory motion fitting curve, matching frame PET data corresponding to the phase information of the corrected image are searched in the PET scanning data;
and carrying out attenuation correction on the matched frame PET data according to the corrected image.
Further, obtaining a first respiratory motion curve and a second respiratory motion curve includes:
extracting diaphragm image data in a chest X-ray image;
performing time domain analysis on the diaphragm image data to obtain a first analysis result;
performing frequency domain analysis on the diaphragm image data to obtain a second analysis result;
generating a first respiratory motion curve according to the first analysis result;
and generating a second respiratory motion curve according to the second analysis result.
Further, extracting diaphragm image data in the chest X-ray image, specifically: adopting a segmentation method based on a pixel gray threshold value to segment different tissues in the chest X-ray image; the method comprises the following steps:
reading pixel points of each row of pixel points of the chest X-ray image from bottom to top;
when the gray value of the continuous preset number of pixel points is greater than the second gray value threshold, and the gray value of the next continuous preset number of pixel points is less than the second gray value threshold and greater than the first gray value threshold, determining diaphragm pixel points in each row of pixel points;
and sequentially reading diaphragm pixel points in each row of pixel points from left to right to obtain diaphragm image data in the chest X-ray image.
This example first extracts the diaphragm portion of the lung tissue. By selecting a pixel gray threshold, tissues of different levels of the chest X-ray image are divided. T1< f (x, y) < T2 can classify the pixel as lung tissue, and T3< f (x, y) < T4 can classify it as other soft tissues and bones of the chest.
Specifically, a certain row of pixel points of the chest X-ray image is read from bottom to top, and if the gray value f (X, y) of 20 continuous points is greater than the T2 threshold, and the gray value f (X, y) of the next 21 st to 40 th points is less than the T2 threshold and greater than the T1 threshold, the 21 st point is determined as the diaphragm in the row of data, and the coordinates (XN, YN) of the diaphragm are recorded, where N is 1, 2, 3, … …. For the whole chest X-ray image, reading each line of data of the chest X-ray image from left to right in sequence, recording the point coordinates meeting the above conditions, and connecting to form the diaphragm of the chest plain.
Further, the time domain analysis of the diaphragm image data to obtain a first analysis includes:
calculating the slope between any two adjacent pixel points in the diaphragm image data;
calculating the average of all slopes;
calculating the variance according to the slope and the average number;
judging whether the variance is larger than a first preset threshold value or not, if so, confirming that the diaphragm image is fuzzy and the patient has respiratory motion when shooting an X-ray image; otherwise, the diaphragm image is confirmed to be clear, and the patient does not have respiratory motion when taking the X-ray image.
Specifically, when respiratory motion exists, the coordinate of the pixel point of the diaphragm in the Y-axis direction can obviously fluctuate, and the slope change is large. Calculating slopes of two adjacent pixel points of the diaphragm, counting a variance result D, and when the variance D is larger than S, considering that the diaphragm is fuzzy, wherein respiratory motion exists in the patient during shooting; when the variance D is smaller than S, the diaphragm is considered to be clear, and the patient does not have respiratory motion at the time of photographing.
Further, the performing frequency domain analysis on the diaphragm image data to obtain a second analysis result includes:
converting the diaphragm image data into diaphragm frequency domain signal data;
acquiring a low-frequency signal in diaphragm frequency domain signal data;
judging whether the number of the low-frequency signals is larger than a second preset threshold value or not, if so, confirming that the diaphragm image is fuzzy and the patient has respiratory motion when shooting an X-ray image; otherwise, the diaphragm image is confirmed to be clear, and the patient does not have respiratory motion when taking the X-ray image.
Specifically, when respiratory motion exists, the coordinate of the pixel point of the diaphragm in the Y-axis direction is changed like a burr, and when the data is converted into a frequency domain signal for analysis, the data is represented as a large number of low-frequency signals (the signals lower than 100 hz are regarded as the low-frequency signals). When the number of the low-frequency signals is larger than K, the diaphragm is considered to be fuzzy, and the patient has respiratory motion during shooting; when the number of the low-frequency signals is smaller than K, the diaphragm is considered to be clear, and the patient does not have respiratory motion during shooting.
Further, acquiring correction data of the correction image, and obtaining phase information of the correction data in the respiratory motion fitting curve according to the correction data and the respiratory motion fitting curve. And searching the matching frame PET data matched with the phase information in the PET scanning data according to the phase information, the respiratory motion fitting curve and the PET scanning data. Obtaining phase information of the correction data in the respiratory motion fitting curve according to the correction data and the respiratory motion fitting curve comprises: and according to the correction data and the first respiratory motion fitting curve, phase information of the correction data in the first respiratory motion fitting curve is obtained, and then according to the phase information and the first respiratory motion fitting curve, a plurality of time point information corresponding to the phase information are searched in the first respiratory fitting curve. And searching matched frame PET data matched with the plurality of time point information in a second respiration fitting curve according to the plurality of time point information and the second respiration fitting curve.
In this embodiment, the correction data for correcting the image is data acquired by CT scan, and image reconstruction is performed using the correction data. And acquiring the starting time of CT scanning through the correction data, and searching the respiratory time phase corresponding to the corresponding starting time on the respiratory motion fitting curve according to the starting time. Specifically, according to the known starting time of the CT scan, a corresponding respiratory phase is searched in the CT scan period in the first respiratory motion fitting curve, and then a plurality of corresponding time points corresponding to the respiratory phase are searched in the PET scan period in the first respiratory motion fitting curve through the respiratory phase. And then acquiring a plurality of matched frame PET data matched with the breathing time phase of the correction image according to the obtained mapping relation between the plurality of breathing time points and the second breathing motion fitting curve.
Further, attenuation correction is carried out on the matched frame PET data according to the corrected image; in the embodiment, the matching frame PET data is an original image at the same respiratory phase or the same respiratory amplitude as the corrected image, and the PET attenuation correction reconstructed image without the respiratory artifact is obtained by performing attenuation correction on the matching frame PET data and the corrected image. The doctor can comprehensively and accurately judge the diseases through the PET attenuation correction reconstruction image without the breathing artifact. In the image attenuation correction, a correction image, PET scanning data, a first breathing motion curve and a second breathing motion curve are obtained, the first breathing motion curve and the second breathing motion curve are fitted to obtain a breathing motion fitting curve, and then the PET scanning data and the breathing motion fitting curve are searched for matching frame PET data corresponding to the correction image phase information in the PET scanning data. And finally, performing attenuation correction on the matched frame image according to the corrected image. The corrected image is mapped into a breathing motion fitting curve, and the first breathing motion curve is used for finding matched frame PET data which is consistent with the breathing phase of the corrected image. And then carrying out attenuation correction on the PET data of the matched frame according to the corrected image so as to obtain a PET attenuation correction reconstruction image without breathing artifacts. The doctor can comprehensively and accurately judge the diseases through the PET attenuation correction reconstruction image without the breathing artifact.
The present invention also provides a radiographic image processing apparatus based on respiratory motion, comprising:
the acquisition module is used for acquiring a correction image and PET scanning data;
the processing module is used for obtaining a first respiratory motion curve and a second respiratory motion curve according to diaphragm image data in the chest X-ray image;
the fitting module is used for fitting the first respiratory motion curve and the second respiratory motion curve to obtain a respiratory motion fitting curve;
the matching module is used for searching the matching frame PET data corresponding to the phase information of the correction image in the PET scanning data according to the correction image, the PET scanning data and the respiratory motion fitting curve;
and the correction module is used for carrying out attenuation correction on the matched frame PET data according to the corrected image.
Preferably, the processing module comprises:
the diaphragm extraction unit is used for extracting diaphragm image data in the chest X-ray image;
the time domain calculating unit is used for performing time domain analysis on the diaphragm image data to obtain a first analysis result;
the frequency domain calculating unit is used for carrying out frequency domain analysis on the diaphragm muscle image data to obtain a second analysis result;
the first generation unit is used for generating a first respiratory motion curve according to the first analysis result;
and the second generation unit is used for generating a second respiratory motion curve according to the second analysis result.
Preferably, the time domain calculating unit includes:
the slope calculation component is used for calculating the slope between any two adjacent pixel points in the diaphragm image data;
an average calculating component for calculating an average of all slopes;
the variance calculation component is used for calculating the variance according to the slope and the average number;
the first judgment component is used for judging whether the variance is larger than a first preset threshold value or not, if so, the diaphragm image is confirmed to be fuzzy, and the patient has respiratory motion when an X-ray image is shot; otherwise, the diaphragm image is confirmed to be clear, and the patient does not have respiratory motion when the X-ray image is shot;
the frequency domain calculating module includes:
the conversion component is used for converting the diaphragm image data into diaphragm frequency domain signal data;
the acquisition component is used for acquiring a low-frequency signal in diaphragm frequency domain signal data;
the second judgment component is used for judging whether the number of the low-frequency signals is larger than a second preset threshold value or not, if so, the diaphragm image is determined to be fuzzy, and the patient has respiratory motion when the X-ray image is shot; otherwise, the diaphragm image is confirmed to be clear, and the patient does not have respiratory motion when taking the X-ray image.
According to the method, a correction image, PET scanning data, a first respiratory motion curve and a second respiratory motion curve are obtained (wherein diaphragm image data in a chest X-ray image are extracted, time domain analysis and frequency domain analysis are adopted to obtain chest respiratory motion curves, namely a first respiratory motion curve and a second respiratory motion curve), the first respiratory motion curve and the second respiratory motion curve are fitted to obtain a respiratory motion fitting curve, and then the correction image, the PET scanning data and the respiratory motion fitting curve are used for searching the PET scanning data for the matching frame PET data corresponding to the phase information of the correction image. Finally, attenuation correction is carried out on the matched frame PET data according to the corrected image. And searching the PET data of the matched frame corresponding to the phase information of the corrected image in the PET scanning data by mapping the corrected image to a respiratory motion fitting curve. Performing attenuation correction on the matched frame PET scanning data according to the corrected image so as to obtain a PET attenuation correction reconstructed image without breathing artifacts; furthermore, the chest respiratory motion curve is obtained by extracting diaphragm image data in the chest X-ray image and then adopting a time domain analysis method and a frequency domain analysis method, and the image can be detected in real time after the X-ray plain film is shot, so that the respiratory motion of the patient can be effectively identified.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.