Plant mass spectrum data image registration method for space metabolic flow analysis
By combining the image preprocessing method of opening operation and contour extraction, and combining the initial transformation method of mass center and geometric center transformation for image registration, the problem of noise influence and information alignment in the prior art is solved, and higher image registration accuracy and reliability of spatial metabolic flow analysis are achieved.
Patent Information
- Application Number
- CN202510108513.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing image registration methods are difficult to effectively remove the influence of noise, and cannot align the information of each spatial position in the spatial mass spectrometry data image, resulting in limited accuracy of spatial metabolic flow analysis.
An image preprocessing method combining open operation and contour extraction, combined with mass center transformation and geometric center transformation as the initial transformation method, image registration is carried out through multiple data adjustments and the application of affine transformation matrix, and the registration effect is evaluated using SSIM values to select the optimal transformation.
It effectively reduces the noise influence in mass spectrometry detection experiments, improves the similarity after image registration, and makes the information of spatial locations at each time point as possible, and improves the accuracy of spatial metabolic flow analysis.
Smart Images

Figure CN119540312A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing applied to spatial metabolomics, and in particular to a plant mass spectrometry data image registration method for spatial metabolic flux analysis. Background Art
[0002] Spatial metabolic flux analysis is of great significance for studying the metabolic activities and metabolic responses of animals or plants in different parts or under different conditions. When analyzing the metabolic flux information of biological tissues such as animals and plants, due to the changes in their metabolic processes and sampling processes, steady-state labeled samples cannot be used, and non-steady-state labeling of samples is required. Dynamic labeling of samples will result in spatial imaging of different tissues. In this case, it is necessary to obtain the isotope labeling kinetic curve at each spatial position in order to obtain the metabolic flux information at different spatial positions of biological tissues. To effectively analyze the characteristics of dynamically labeled samples, it is necessary to have the spatial mass spectrometry data at each time point correspond to the information at the same spatial position as much as possible. Therefore, after the spatial mass spectrometry data of dynamically labeled samples are imaged, a method is needed to align the biological tissue images at different time points as much as possible, so as to obtain the isotope labeling curve at each spatial position of the biological tissue, and then an effective and reliable spatial metabolic flux analysis can be performed.
[0003] Although good results have been achieved in the application fields of image registration, such as multimodal registration of medical CT and MRI images, and multispectral image registration in the field of remote sensing information, the formation of spatial mass spectrometry data images has a complex process, including: experimental samples, peak intensity data, numerical data, thermal images, and the entire process will be affected by noise and the experiment itself. The influence of noise causes the pixel values of the image to change, and the thermal image itself is composed of a large number of pixel blocks, resulting in large differences in the spatial imaging of tissue mass spectrometry data at different time points. Therefore, the pixels of the image have the characteristic of uneven distribution. The commonly used image alignment methods currently use image corners, points and other features for registration, but in the registration of spatial mass spectrometry data images, they cannot effectively remove the influence of noise, nor can they align the information of each spatial position within the contour. Summary of the invention
[0004] To solve the above problems, the present application provides a plant mass spectrometry data image registration method for spatial metabolic flux analysis, comprising the following steps: Obtain a mass spectrum data image group to be analyzed, wherein the mass spectrum data image group is composed of mass spectrum data images at different time points within a time period; the time period is represented by t0 to t n , where n is the number of time points; the mass spectrometry data image is represented by P i , and i <n; Determine the fixed image and the moving image from the mass spectrum data image group; wherein the fixed image is the mass spectrum data image P0 at the starting time, and the moving image is the mass spectrum data image P after the starting time. i ; Preprocess the fixed image and the moving image to generate an initial fixed image and an initial moving image; The initial fixed image and the initial moving image are registered; the registration process refers to taking the initial fixed image as the reference data, taking the initial moving image as the exchange data, and taking the mass center transformation and the geometric center transformation as the initial transformation methods to perform multiple data adjustments on the exchange data to achieve registration, wherein the data adjustment is achieved through the transformation matrix; after the registration is achieved, SSIM is used to evaluate the registration effect of the registered image and the initial fixed image; wherein, the mass center transformation is used as the initial transformation method for image transformation with uneven pixel distribution; and the geometric center transformation is used as the initial transformation method for image transformation with uniform pixel distribution.
[0005] Among them, preprocessing includes: grayscale the mass spectrum data image to generate a first processed image; Binarizing the first processed image to generate a second processed image; Performing image filling on the second processed image to generate a third processed image; Using a morphological opening operation, processing the third processed image into a fourth processed image; Performing an image dilation operation on the fourth processed image to extract the most approximate contour to form a fifth processed image; The fifth processed image is intersected with the mass spectrum data image to generate an initial image; the initial image includes an initial fixed image and an initial moving image.
[0006] Specifically, the registration process includes: Step S1: normalize the initial fixed image and the initial moving image respectively; Step S2: extracting the mass center and geometric center of the initial fixed image and the initial moving image, defining the initial fixed image as the reference data, and defining the initial moving image as the exchange data; Step S3: performing data registration based on grayscale data on the exchanged data, and obtaining a transformation matrix and a corresponding SSIM value whose SSIM value is greater than or equal to a specified parameter; Step S4: Obtain the transformation corresponding to the optimal SSIM value and apply it to the initial moving image to obtain the registered moving image; Step S5: Get the next time point, if the time point >= t n , end the registration process, otherwise execute step S3.
[0007] Among them, performing data registration based on grayscale data on the exchange data includes: configuring an image registration algorithm based on grayscale data, optimizer parameters and metrics, determining the transformation type to be an affine transformation, and determining the initial transformation method of the affine transformation to be a mass center alignment transformation or a geometric center alignment transformation.
[0008] Preferably, the exchange data is subjected to multiple image affine transformations using a nearest neighbor interpolation method; The image affine transformation is expressed as: , Among them, x and y are the coordinate information of the image point in the exchange data, x' and y' are the coordinate information of the transformed point, Δx and Δy are the translation amounts of the x coordinate and y coordinate respectively, a, b, c, d together contain the information of rotation, scaling and shearing transformation, and [00 1] is a fixed value in affine transformation.
[0009] Furthermore, after obtaining the registered moving image, verifying the registration effect includes: converting the registered moving image and the initial fixed image into grayscale images respectively, superimposing the two grayscale images, and using different colors to display the difference between the grayscale images.
[0010] Extracting the center of mass means finding the center of mass independently in the x-direction and the y-direction, including: For the centroid in the x direction, the sum of pixels on the left and right sides of the image is equal; for the centroid in the y direction, the sum of pixels on the top and bottom sides of the image is equal.
[0011] The specific method for extracting the mass center includes: Assume that the coordinate of each pixel in the x direction is x i , the corresponding pixel value is I i,j , the coordinate of the center of mass in the x direction is x; The coordinate of each pixel in the y direction is: j , the corresponding pixel value is I i,j , the coordinate of the center of mass in the y direction is y; Then the center of mass x in the x direction com for: ; The center of mass y in the y direction com for: .
[0012] The present invention combines image processing methods such as opening operation and contour extraction with an image registration method based on grayscale information, which effectively reduces the noise occurring in mass spectrometry detection experiments and can improve the similarity of the registered images; on the other hand, the present invention uses two different initial transformation methods to transform matrix calculations, which can take into account the pixel interpolation effects of various pixel distribution conditions; for different transformation methods, the SSIM value is used for multiple evaluations to find the optimal transformation, which can effectively obtain the optimal registration effect in a complex environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a step diagram of a plant mass spectrometry data image registration method provided in an embodiment of the present invention; Figure 2 is a logical schematic diagram of image registration processing provided according to an embodiment of the present invention; Figure 3 is a schematic diagram of image registration before and after comparison according to an embodiment of the present invention; Figure 4 Schematic diagram of an image preprocessing process provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0014] In the process of plant spatial metabolic flux analysis, the spatial mass spectrum data image can be obtained by performing data analysis after mass spectrometry analysis on the samples after the experiment. The generation process from the sample to the spatial mass spectrum data image includes the processing process of extracting peak intensity data, extracting numerical data, and generating a thermal image. The processing of this process is complicated and will be affected by noise and the experiment itself. Therefore, the spatial mass spectrum data images at different time points in the analysis process need to be aligned before the spatial metabolic flux analysis can be performed. The thermal image itself is composed of a large number of pixel blocks, and the spatial imaging of tissue mass spectrum data at different time points also has large differences. In view of this situation, the present invention provides a technical solution, which pre-processes the mass spectrum data images at different time points, uses different initial transformation methods to predict the transformation matrix for the pre-processed mass spectrum data images, and records the parameters and SSIM values each time, selects the parameters with the best transformation quality through the SSIM value, and applies them to the pre-processed mass spectrum data images to achieve image alignment. Through this solution, in addition to achieving the basic image alignment requirements, the influence of noise can also be removed, and the information of the spatial position of each time point can be aligned as much as possible.
[0015] The specific implementation of the present invention is described in detail below with reference to the accompanying drawings.
[0016] Figure 1 A step diagram of a plant mass spectrometry data image registration method for spatial metabolic flux analysis is provided, including the following steps: Step S100: obtaining a mass spectrum data image group to be analyzed; In the time period of the spatial metabolic flux analysis, the mass spectrum data image group is composed of continuous mass spectrum data images of mass spectrum data images at different time points. Specifically, the time period can be expressed as t0 to t n , where n is the number of time points and the mass spectrometry data image is represented by P i , and i <n。
[0017] Step S110: determining a fixed image and a moving image from mass spectrum data images at different time points in the mass spectrum data image group; The fixed image can be defined as the mass spectrum data image P0 at the starting time, and the moving image is the mass spectrum data image P at each time point after the starting time. i .
[0018] In the subsequent steps, P1 to P n-1 Determine it as the moving image and align it with the mass spectrometry data image of P0.
[0019] Step S120: preprocessing the fixed image and the moving image to generate an initial fixed image and an initial moving image; The specific pre-processing process is as follows: Figure 4 As shown, the following steps are included: Step S402: gray-scale the mass spectrum data image to generate a first processed image; Step S403: using the Otsu method to perform binarization processing on the first processed image to generate a second processed image; Step S404: performing image filling on the second processed image to generate a third processed image; Step S405: using a morphological opening operation to process the third processed image into a fourth processed image; Step S406: performing an image dilation operation on the fourth processed image to extract the most approximate contour to form a fifth processed image; The approximate contour can be extracted based on the binary image of the fourth processed image above, that is, a set of coordinate points that can be connected into a closed area are extracted. This set of coordinate points constitutes a 2*m matrix, where m is the number of points (the number of points in each image is not fixed). A Boolean matrix is generated based on this set of coordinate points (the coordinates of the points in the closed area are assigned 1, otherwise they are 0).
[0020] Step S407: performing an intersection operation on the fixed image and the moving image and the Boolean matrices obtained correspondingly thereto to obtain an image of the original image within its approximate contour, that is, to obtain the preprocessed initial image.
[0021] In this step, preprocessing operations are performed on both the fixed image and the moving image. Therefore, the initial image generated in step S407 includes the initial fixed image and the initial moving image.
[0022] For example, when n=10, one initial fixed image and 10 initial moving images at each time point will be generated after preprocessing; and in subsequent steps, the 10 initial moving images will be registered with the initial fixed image respectively.
[0023] In this step, opening operations and image contour extraction are applied to image preprocessing, which effectively reduces the noise appearing in the mass spectrometry detection experiment. Two different initial transformations are used for image registration, which widens the search range when estimating the transformation matrix and improves the accuracy of image registration. The affine transformation method and the nearest neighbor interpolation method are used to retain the original information of the spatial metabolic flow mass spectrometry data to the greatest extent.
[0024] Step S130: performing registration processing on the initial fixed image and the initial moving image; Registration processing refers to using the initial fixed image as the reference data, the initial moving image as the exchange data, and the image's mass center transformation and geometric center transformation as the initial transformation methods to perform multiple data adjustments on the exchange data to achieve registration, wherein the data adjustment process is implemented through the transformation matrix. After registration, SSIM (Structural Similarity Index) is used to evaluate the registration effect between the registered image and the initial fixed image, and the transformation matrix and the evaluated SSIM value of each adjustment during the multiple data adjustment processes are recorded.
[0025] Specifically, the registration process is as follows: Figure 2 Shown include: Step S1: normalize the initial fixed image and the initial moving image respectively.
[0026] Step S2: extracting the mass center and geometric center of the initial fixed image and the initial moving image, defining the initial fixed image as reference data, and defining the initial moving image as exchange data; When extracting the geometric center, methods such as image moment method and contour center method can be used.
[0027] Among them, extracting the center of mass means finding the center of mass independently in the x direction and the y direction, including: For the centroid in the x direction, the sum of pixels on the left and right sides of the image is equal; for the centroid in the y direction, the sum of pixels on the top and bottom sides of the image is equal.
[0028] The method of extracting the mass center includes: Assume that the coordinate of each pixel in the x direction is x i , the corresponding pixel value is I i,j , the coordinate of the center of mass in the x direction is x; The coordinate of each pixel in the y direction is: j , the corresponding pixel value is I i,j , the coordinate of the center of mass in the y direction is y; Then the center of mass x in the x direction com for: ; The center of mass y in the y direction com for: .
[0029] Step S3: Perform data alignment based on grayscale data on the exchanged data, and obtain the transformation matrix and corresponding SSIM value whose SSIM value is greater than or equal to the specified parameter; for example, define the specified parameter as 0.6, that is, obtain the transformation matrix and corresponding SSIM value whose SSIM value is greater than or equal to 0.6 after alignment with the fixed image.
[0030] Specifically, performing grayscale data-based data registration on the exchanged data includes: configuring a grayscale data-based image registration algorithm, optimizer parameters and metrics, determining the transformation type to be an affine transformation, and determining the initial transformation method of the affine transformation to be a mass center alignment transformation or a geometric center alignment transformation.
[0031] The present invention uses the nearest neighbor interpolation method to perform multiple image affine transformations on the exchange data to obtain the affine transformation matrices between the multiple image affine transformations and the reference data. The image affine transformation is expressed as: , Among them, x and y are the coordinate information of the image point in the exchange data, x' and y' are the coordinate information of the transformed point, Δx and Δy are the translation amounts of the x coordinate and y coordinate respectively, a, b, c, d together contain the information of rotation, scaling and shearing transformation, and [00 1] is a fixed value in affine transformation.
[0032] In this step, affine transformation is performed with different initial transformation methods as conditions. The nearest neighbor interpolation is used as the interpolation method to retain the original information to the greatest extent. During the transformation process, each transformation matrix is recorded and saved. After the transformation is completed, the registered moving image is obtained.
[0033] After obtaining the registered moving image, the present invention provides a verification method for the registration effect, that is, using SSIM to evaluate the similarity of the two images with the fixed image after each registration and recording the similarity value. Specifically, the registered moving image and the fixed image are converted into grayscale images respectively, the two grayscale images are superimposed, and different colors are used to display the difference in the grayscale images. The registered moving image with the smallest difference corresponds to the optimal registration of multiple data adjustments.
[0034] In image processing, for images with uniform pixel distribution, geometric center alignment transformation is used. During the transformation process, the image can be rotated, scaled, translated, etc. with the center of the image contour as the reference point to adjust the image shape and position. For spatial mass spectrum data images affected by noise and having uneven pixel distribution, the present invention also provides a method of using mass center alignment transformation, that is, obtaining the horizontal and vertical pixel centers of the image as reference points, and rotating, scaling, translating, etc. on this basis, the image can be adjusted in shape and position while fully reducing the influence of noise. Without knowing whether the pixel distribution of each image is uniform, the present invention uses geometric center alignment transformation and mass center alignment transformation as the initial transformation method for each image for multiple processing, which can fully consider the multiple registration effects of the plant spatial mass spectrum data image under experimental conditions regardless of whether it is disturbed, and select the best result from the registration results.
[0035] Step S4: Obtain the transformation corresponding to the optimal SSIM value in step S3 and apply it to the initial moving image to obtain the final registered moving image. Each spatial position with metabolic information in the final registered moving image is aligned with the initial fixed image as much as possible.
[0036] The SSIM value mainly considers three key features of the image: brightness, contrast, and structure. Its value range is [0,1], and the calculation process is realized by a universal sliding window: after the sliding window traverses the entire image, the SSIM values of all windows are averaged. In the present invention, both the fixed image and the moving image are generated by means of heat maps, and there are images composed of many large pixel blocks, but they are regular in local structure; and when generating the heat map, the abnormally large and abnormally small values have been removed, and the brightness of the image has a relatively small impact, and the contrast is characterized by the variance after brightness normalization. Therefore, in the present invention, the structural characteristics of the mass spectrometry data image are first considered. Since the sliding window method combined with SSIM can effectively capture local structural features, the SSIM value is used as the evaluation parameter after image registration in the evaluation of mass spectrometry data image registration, which can effectively evaluate the image registration effect under the influence of noise.
[0037] After obtaining the registered moving image, use the imshowpair method in MATLAB to view the registration effect and obtain the transformation matrix with the highest SSIM value. Apply the transformation to the initial moving image, and the registration of the moving image at this time point is completed.
[0038] The registration effect of moving images is as follows Figure 3 As shown: S310 and S320 are the fixed image and the moving image respectively. It can be seen that there are large differences in the contours and color blocks within the contours of the two images; the effect after preprocessing is shown in S311 and S321; after the initial moving image shown in S321 is transformed, the registered moving image S322 is formed, and its contour is close to S312, and the distribution of the color blocks therein is adjusted along with the contour.
[0039] Step S5: Get the next time point, if the time point >= t n , end the registration process, otherwise execute step S3.
[0040] Through the operations of steps S1 to S5, the alignment of all the mass spectrum data images in the mass spectrum data image group within the time period is completed.
[0041] In the present invention, opening operation and image contour extraction are applied to image preprocessing, which effectively reduces the noise occurring in mass spectrometry detection experiments; in the registration process, geometric center transformation and mass center change are used as initial transformation methods for image registration, which widens the search range during transformation matrix estimation and improves the accuracy of image registration; further, the affine transformation method and nearest neighbor interpolation method are used to retain the original information of spatial metabolic flow mass spectrometry data to the greatest extent.
[0042] The above disclosures are only several specific embodiments of the present invention; however, the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. A plant mass spectrometry data image registration method for spatial metabolic flux analysis, characterized in that: The following steps are involved: Obtain a mass spectrum data image group to be analyzed, wherein the mass spectrum data image group is composed of mass spectrum data images at different time points within a time period; the time period is represented by t0 to t n , where n is the number of time points; the mass spectrometry data image is represented by P i , and i <n; A fixed image and a moving image are determined from the mass spectrum data image group; wherein the fixed image is the mass spectrum data image P0 at the starting time, and the moving image is the mass spectrum data image P after the starting time. i ; Preprocessing the fixed image and the moving image to generate an initial fixed image and an initial moving image; The initial fixed image and the initial moving image are registered; the registration process refers to taking the initial fixed image as the reference data, taking the initial moving image as the exchange data, and adjusting the exchange data to achieve registration by using the mass center transformation and the geometric center transformation as the initial transformation methods, wherein the data adjustment is achieved through the transformation matrix; after the registration is achieved, SSIM is used to evaluate the registration effect of the registered image and the initial fixed image; wherein, the mass center transformation is used as the initial transformation method for image transformation with uneven pixel distribution; and the geometric center transformation is used as the initial transformation method for image transformation with uniform pixel distribution.
2. The plant mass spectrometry data image registration method according to claim 1, characterized in that: The pre-processing comprises: gray-scale the mass spectrum data image to generate a first processed image; performing binarization processing on the first processed image to generate a second processed image; performing image filling on the second processed image to generate a third processed image; Using a morphological opening operation, processing the third processed image into a fourth processed image; Performing an image dilation operation on the fourth processed image to extract the most approximate contour to form a fifth processed image; The fifth processed image is intersected with the mass spectrum data image to generate an initial image; the initial image includes an initial fixed image and an initial moving image.
3. The plant mass spectrometry data image registration method according to claim 1, characterized in that: The registration process includes: Step S1: normalize the initial fixed image and the initial moving image respectively; Step S2: extracting the mass center and the geometric center of the initial fixed image and the initial moving image, defining the initial fixed image as reference data, and defining the initial moving image as exchange data; Step S3: performing data registration based on grayscale data on the exchanged data, and obtaining a transformation matrix and a corresponding SSIM value whose SSIM value is greater than or equal to a specified parameter; Step S4: Obtain the transformation corresponding to the optimal SSIM value and apply it to the initial moving image to obtain the registered moving image; Step S5: Get the next time point, if the time point>=t n , end the registration process, otherwise execute step S3.
4. The plant mass spectrometry data image registration method according to claim 3, characterized in that: The grayscale data-based data registration on the exchanged data includes: configuring a grayscale data-based image registration algorithm, optimizer parameters and metrics, determining the transformation type to be an affine transformation, and determining the initial transformation method of the affine transformation to be a mass center alignment transformation or a geometric center alignment transformation.
5. The plant mass spectrometry data image registration method according to claim 4, characterized in that: Performing multiple image affine transformations on the exchange data using a nearest neighbor interpolation method; The image affine transformation is expressed as: , Among them, x and y are the coordinate information of the image point in the exchange data, x' and y' are the coordinate information of the transformed point, Δx and Δy are the translation amounts of the x coordinate and y coordinate respectively, a, b, c, d together contain the information of rotation, scaling and shearing transformation, and [0 01] is a fixed value in affine transformation.
6. The plant mass spectrometry data image registration method according to claim 3, characterized in that: After obtaining the registered moving image, verifying the registration effect includes: converting the registered moving image and the initial fixed image into grayscale images respectively, superimposing the two grayscale images, and using different colors to display the difference between the grayscale images.
7. The plant mass spectrometry data image registration method according to claim 3, characterized in that: Extracting the mass center refers to finding the mass center independently in the x-direction and the y-direction, including: For the centroid in the x direction, the sum of pixels on the left and right sides of the image is equal; for the centroid in the y direction, the sum of pixels on the top and bottom sides of the image is equal.
8. The plant mass spectrometry data image registration method according to claim 7, characterized in that: The method of extracting the mass center includes: Assume that the coordinate of each pixel in the x direction is x i , the corresponding pixel value is I i,j , the coordinate of the center of mass in the x direction is x; The coordinate of each pixel in the y direction is: j , the corresponding pixel value is I i,j , the coordinate of the center of mass in the y direction is y; Then the center of mass x in the x direction com for: ; The center of mass y in the y direction com for: .
Citation Information
Patent Citations
SAR image sequence registering method based on movement platform parameters
CN105551013A
Electronic chart and radar image data fusion method based on deep learning
CN109993692A
Mass spectrum imaging data and full-view pathological section registration method
CN115170627A
Multi-feature and pixel information combined railway infrared and visible light image registration method
CN117495931A