A streak artifact suppression method and system for mass spectrometry imaging
By combining digital domain instrument modeling and anatomical topological constraints with scan line smoothing, non-stationary stripe artifacts in mass spectrometry imaging are adaptively suppressed, solving the problems of insufficient stripe suppression capability and process fragmentation in existing technologies, and achieving efficient and reliable MSI data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAMEN UNIV
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-19
Smart Images

Figure CN122243797A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of bioinformatics data processing and medical image analysis, specifically to a method and system for suppressing stripe artifacts in mass spectrometry imaging (MSI). More specifically, this invention provides an adaptive destriating algorithm that integrates physics-driven modeling, topological manifold constraints, and scan line smoothing, along with a complete system that implements containerized data import, interactive parameter adjustment, and efficient storage management. This system is suitable for improving the quality and standardizing the processing of large-scale, high-resolution MSI data. Background Technology
[0002] Spatial metabolomics, by studying the in-situ distribution of metabolites in tissues, provides crucial evidence for tumor heterogeneity analysis, drug mechanism research, and visualization of neurometabolism. Mass spectrometry (MSI), as an important technology in this field, has advantages such as high throughput and label-free operation, and can acquire spatial distribution information of thousands to tens of thousands of molecules at once, realizing the correspondence between chemical information and morphological structure.
[0003] However, in large-area, high-resolution, and long-term acquisition, MSI data is susceptible to interference from instrument status and the environment, often exhibiting non-periodic horizontal stripe artifacts along the scan line direction, which drift slowly over time. These artifacts manifest as narrow-band energy concentrations along specific axes in the frequency domain. If not suppressed, they severely interfere with the contrast and texture of the true signal, affecting subsequent segmentation, co-localization, and differential metabolite screening analyses.
[0004] Currently, common MSI stripe suppression methods mainly rely on empirical parameters or fixed models. For example, row and column normalization methods correct based on statistics of entire rows or columns, but assume that stripe intensity is constant within a row, making them unsuitable for non-stationary drift. Polynomial fitting or baseline correction methods remove low-frequency components by fitting background trends, which can easily over-smooth the real biological signal. Furthermore, frequency domain filtering methods (such as notch filtering) manually set the stopband range, which has limited effectiveness in suppressing non-periodic, slowly varying stripes and is prone to spectral leakage. Additionally, while anisotropic smoothing methods can preserve edges, they struggle to distinguish stripes from real tissue texture, especially in weak signal regions, leading to detail loss. Most of these methods are based on the ideal assumption of "stationary stripes and fixed frequencies," failing to fully consider the slow drift characteristics of instrument gain and the spatial topology of biological samples during actual acquisition. Therefore, they often face a trade-off between stripe removal and detail loss, and rely on repeated parameter tuning by the user, lacking automation and adaptability.
[0005] Besides algorithmic limitations, the current MSI data processing workflow also has significant shortcomings in engineering implementation and data management: First, data formats are fragmented, with imzML, Analyze 7.5, and various vendors' proprietary formats coexisting, resulting in inconsistent read / write interfaces and metadata fields, making it difficult to establish a traceable quality control chain; second, the processing workflow is fragmented, with most preprocessing tools existing as independent scripts or graphics plugins, lacking a unified workflow orchestration and parameter persistence mechanism, making cross-platform and cross-batch reproduction difficult; finally, with the increase in spatial resolution and imaging area, the amount of MSI data is growing exponentially, and the traditional method of loading all data into memory leads to high I / O overhead and memory pressure, limiting the processing scale and interactive response speed, creating an efficiency bottleneck in big data scenarios.
[0006] Therefore, there is an urgent need for an integrated solution that can adaptively suppress non-stationary fringes at the algorithm level and achieve standardized process management at the system level. This method should physically conform to the instrument imaging model, mathematically embed the spatial topological priors of biological tissues, and engineeringally support efficient data access and human-machine collaborative parameter tuning, thereby comprehensively improving the reliability, efficiency, and reproducibility of MSI data processing. Summary of the Invention
[0007] This invention addresses the shortcomings of existing mass spectrometry (MSI) stripe suppression methods, such as insufficient adaptability, fragmented workflows, and low efficiency in large-scale data processing. It proposes a stripe artifact suppression method and system for MSI, aiming to achieve adaptive suppression of non-stationary stripes by combining digital-domain instrument modeling, anatomical topological constraints, and scan line smoothing. This significantly improves the suppression capability for drifting non-stationary scan lines, while effectively protecting tissue edges and weak texture details. Furthermore, through containerized storage and interactive optimization, a standardized and efficient processing workflow is constructed.
[0008] The technical solution adopted by this invention to solve its technical problem is:
[0009] On the one hand, a method for suppressing stripe artifacts in mass spectrometry imaging includes the following steps:
[0010] S1, Data import and preprocessing steps: Receive the imported mass spectrometry imaging data, establish the mass-to-charge ratio m / z channel mapping, and filter the original two-dimensional ion images according to the target m / z range; load the original two-dimensional ion images sequentially and store them in the three-dimensional data matrix, and generate a basic mask matrix based on the effective pixel intensity threshold of all loaded original two-dimensional ion images.
[0011] S2, the destriating steps of the M-PGMD manifold decomposition method based on artificial physics, include:
[0012] S201 performs a logarithmic domain transformation on the original two-dimensional ion image of each channel, decomposing it into an observation image that includes the real biological signal image to be recovered, the additive fringe component that varies along the scan line direction, and Gaussian noise.
[0013] S202, construct a clean comprehensive map based on a three-dimensional data matrix; the clean comprehensive map is an average ion map, a total ion current map (TIC), or a first principal component (PC1);
[0014] S203, construct a K-nearest neighbor graph based on the clean composite graph, calculate the adjacency weights based on pixel intensity similarity, and construct a graph Laplacian matrix based on the adjacency weights and their degree matrix;
[0015] S204, a horizontal finite gradient obtained by smoothing the additive fringe components along the scan line direction;
[0016] S205. An optimization objective function is established, including the graph Laplacian matrix, smoothing intensity adjustment regularization coefficient, and horizontal finite gradient constraint term. The alternating direction multiplier method (ADMM) is used to solve the objective function to obtain the real biological signal image to be recovered.
[0017] S206, perform an inverse logarithmic transformation on the real biological signal image to be recovered, and multiply the inversely transformed image pixel by pixel with the basic mask matrix to obtain the final stripe-reconstructed image.
[0018] Preferably, the method for suppressing stripe artifacts in mass spectrometry imaging further includes: S3, an interactive visualization editing step; specifically as follows:
[0019] The clean composite image, the original two-dimensional ion image, and the stripe-reconstructed image are displayed synchronously in the visualization interface. The clean composite image type, neighborhood size, or smoothing intensity can be adjusted in response to interactive commands, and the reconstruction preview is updated in real time.
[0020] Preferably, the method for suppressing stripe artifacts in mass spectrometry imaging further includes: S4, a result write-back and management step; specifically as follows:
[0021] The reconstruction results are written to container files in merge or split modes, supporting sorting by m / z grouping and lossless compression storage, and maintaining consistency of metadata key names and types.
[0022] Preferably, the mass spectrometry imaging data is a container file in .h5 or .msi format; the basic mask matrix is a binary matrix generated based on the effective pixel intensity threshold of the original two-dimensional ion image, used to identify the effective sample region.
[0023] Preferably, the graph Laplacian matrix is constructed based on the K-nearest neighbor connections of the composite graph, with adjacency weights. The Gaussian kernel function is used for calculation, and the expression is:
[0024] ;
[0025] in, and Each pixel and pixels Pixel intensity value; For scale parameters; Set up a group for neighbors.
[0026] Preferably, the horizontal finite gradient is represented as follows:
[0027] ;
[0028] Where y represents the row coordinate of the image when scanning the column direction. Indicates the column coordinates of the image in the scan row direction; Indicates position The horizontal gradient at that point is finite. Indicates position The fringe component value at the location; Indicates position The fringe component value at that location.
[0029] Preferably, the optimization objective function is expressed as follows:
[0030] ;
[0031] in, The observed image after logarithmic transformation; The image represents the actual biological signals to be recovered. For additive fringe components; and These are the regularization coefficients for manifold smoothing and fringe constraint, respectively; The Frobenius norm of the residual matrix is represented; trace(·) is the trace of the matrix; This represents the L1 norm of a horizontally finite gradient.
[0032] Preferably, the result write-back process supports writing to the container in ascending or descending order of m / z values and uses the gzip lossless compression algorithm for storage; it also includes memory pre-allocation and incremental loading tracking of the three-dimensional data matrix.
[0033] On the other hand, a stripe artifact suppression system for mass spectrometry imaging includes:
[0034] The data import and preprocessing module is used to receive imported mass spectrometry imaging data, establish mass-to-charge ratio m / z channel mapping, and filter the original two-dimensional ion images according to the target m / z range; sequentially load the original two-dimensional ion images and store them in the three-dimensional data matrix, and generate a basic mask matrix based on the effective pixel intensity threshold of all loaded original two-dimensional ion images;
[0035] The stripe removal module includes:
[0036] The logarithmic domain transformation unit is used to perform a logarithmic domain transformation on the original two-dimensional ion image of each channel.
[0037] It is decomposed into an observed image that includes the real biological signal image to be recovered, additive fringe components that vary along the scan line direction, and Gaussian noise.
[0038] A clean synthesis map construction unit is used to construct a clean synthesis map based on a three-dimensional data matrix; the clean synthesis map is an average ion map, a total ion current map (TIC), or a first principal component (PC1).
[0039] The graph Laplacian matrix construction unit is used to construct a K-nearest neighbor graph based on the clean synthetic graph, calculate the adjacency weights based on pixel intensity similarity, and construct the graph Laplacian matrix based on the adjacency weights and their degree matrix.
[0040] The horizontal finite gradient calculation unit is used to smooth the horizontal finite gradient obtained by the additive fringe components along the scan line direction;
[0041] The real biological signal image restoration module is used to establish an optimization objective function that includes the graph Laplacian matrix, smoothing intensity adjustment regularization coefficient, and horizontal finite gradient constraint term. The alternating direction multiplier method (ADMM) is used to solve the real biological signal image to be restored.
[0042] The image reconstruction unit is used to perform an inverse logarithmic domain transformation on the real biological signal image to be recovered, and multiply the inversely transformed image pixel by pixel with the basic mask matrix to obtain the final stripe-reconstructed image.
[0043] An interactive visualization editing module is used to simultaneously display the clean composite image, the original two-dimensional ion image, and the stripe-reconstructed image in a visualization interface. It responds to interactive commands to adjust the clean composite image type, neighborhood size, or smoothing intensity, and updates the reconstruction preview in real time.
[0044] The results write-back and management module is used to write the reconstruction results to container files in merge or split mode. It supports sorting by m / z grouping and lossless compression storage, and maintains the consistency of metadata key names and types.
[0045] In another aspect, an electronic device includes: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the method described in any implementation of the first aspect.
[0046] As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following beneficial effects:
[0047] (1) Adaptive stripe removal capability: By modeling the numerical domain to accurately match the physical characteristics of the instrument, and combining manifold constraints and line smoothing, it effectively suppresses non-stationary and slowly varying scan line drift artifacts, overcoming the limitations of fixed parameter methods.
[0048] (2) Detail preservation performance: Using a clean composite graph as the topological prior, the Laplacian constraint of the graph is used to maintain the consistency of the organizational structure of the restored image, and the edge and weak texture information are preserved to the maximum extent while removing stripes;
[0049] (3) User-friendly human-computer interaction: The interactive interface exposes key algorithm parameters as adjustable controls and combines them with real-time preview, which greatly reduces the difficulty of parameter tuning and trial and error costs, and improves the practicality of the method and the interpretability of the results;
[0050] (4) Efficient and standardized processing flow: Containerized data interface and incremental loading mechanism significantly improve the I / O efficiency and memory controllability of large-scale MSI data; the parameters of the whole process can be saved and reproduced, which enhances the traceability of the research. Attached Figure Description
[0051] Figure 1 This is a flowchart of a method for suppressing stripe artifacts in mass spectrometry imaging according to an embodiment of the present invention;
[0052] Figure 2 The image shows a comparison of the stripe removal effect of the present invention on a typical m / z channel ion image. The left side is the original two-dimensional ion image with non-stationary scan line drift stripes, and the right side is the reconstructed image after processing by the method of the present invention, showing that the stripes are suppressed and the tissue details are preserved.
[0053] Figure 3 This is a schematic diagram illustrating the principle and effect of the M-PGMD (Manual Physics-Guided Manifold Decomposition) destriping strategy in an embodiment of the present invention, including a clean composite image, a manifold constraint diagram, a row smoothing constraint diagram, and the corresponding reconstructed image;
[0054] Figure 4This is a schematic diagram of the interactive visual editing interface provided in the embodiments of the present invention, showing the layout of the clean composite graph, the original image, the reconstructed image preview and the parameter adjustment controls, as well as the interactive adjustment methods for composite graph selection, neighborhood size and smoothing intensity;
[0055] Figure 5 This is a block diagram of a stripe artifact suppression system for mass spectrometry imaging according to an embodiment of the present invention;
[0056] Figure 6 This is a schematic diagram of the structure of a computer device suitable for implementing the electronic device of the present application. Detailed Implementation
[0057] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0058] In the description of this invention, it should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0059] like Figure 1 As shown in the figure, this embodiment presents a method for suppressing stripe artifacts in mass spectrometry imaging, which includes the following steps.
[0060] S1, Data import and preprocessing steps.
[0061] During initialization, the system automatically identifies and loads MSI data containers in .h5 or .msi format. Data within the container is grouped and stored as ion images for each channel in the format "mz_value". Metadata is stored in key-value pairs in the root directory and uniformly identified by the prefix "meta_". The specific steps include the following.
[0062] 1) Metadata reading and channel mapping establishment: Read all metadata key-value pairs and load them into an in-memory dictionary structure. At the same time, traverse all groups in the container that start with "mz_", extract the mass-to-charge ratio value m / z from the group name, and establish an index mapping table from the m / z value to the corresponding HDF5 dataset path.
[0063] 2) Target Range Filtering and Matrix Pre-allocation: Users can set the target m / z range (e.g., mz_min=500, mz_max=1200) through configuration files or the interactive interface. Based on the mapping table, all channels within this range (denoted as the processing list, quantity N) of the original two-dimensional ion images are filtered out. According to the uniform size (height H, width W) of the original two-dimensional ion images, a three-dimensional floating-point data matrix (Data Matrix) with dimensions N×H×W is pre-allocated in memory for subsequent batch operations.
[0064] 3) Incremental Loading and Base Mask Generation: To avoid memory overflow caused by loading all data at once, an incremental loading strategy is adopted: the original two-dimensional ion image of each target channel is read from the container sequentially and stored in the corresponding position of the data matrix. Simultaneously, to generate a robust base mask, the average intensity of all loaded ion images at the corresponding pixel position (x, y) is calculated. Iterate through all pixels, if... If the intensity exceeds a preset global threshold T (i.e., the effective pixel intensity threshold, typically T=0 or adaptively calculated based on the image background noise level), the corresponding position M(x,y) in the base mask matrix Mask (size H×W) is set to 1; otherwise, it is set to 0. This mask will be used for final result fusion to exclude background regions.
[0065] S2, the stripe removal process of the M-PGMD manifold decomposition method based on artificial physics.
[0066] For each original two-dimensional ion image in the Data Matrix (denoted as...) The following core algorithm is executed.
[0067] 1) Logarithmic domain transformation and problem modeling, converting multiplicative gain ripple into additive drift components: Obtain the observed image by performing a logarithmic domain transformation. ,as follows:
[0068] ;
[0069] Transform the model into: .in, The image represents the real biosignals to be recovered. The additive fringe component varies slowly along the scanning line direction. It is Gaussian noise.
[0070] 2) Clean Synthesis Map Construction: The total ion current map (TIC) is used as the clean synthesis map G by default. TIC is obtained by calculating the sum of the intensities of all channels at the same spatial location (x,y) in the data matrix. If the user selects the "Structure-First" mode through the interactive interface, principal component analysis (PCA) is performed on the ion images of all channels in the DataMatrix, and the first principal component (PC1) image with the largest variance contribution is selected as the clean synthesis map G to provide richer anatomical priors.
[0071] 3) Manifold constraint construction based on K-nearest neighbor graph: The clean synthetic graph G is stretched into a one-dimensional vector g. For each pixel in the vector... (Corresponding to a certain spatial location in the original image), calculate its relationship with all other pixels. Euclidean distance (based on its intensity value) , The K nearest pixels (K=20 by default) are selected as its neighbors, forming a neighbor set KNN. Adjacency weights are calculated using a Gaussian kernel function. :like ,but
[0072] ;
[0073] The scaling parameter σ is typically taken as the median distance between all neighbor pairs; otherwise... Based on The weight matrix formed Calculate its degree matrix (diagonal matrix, ), and thus the Graph Laplace matrix is obtained. .
[0074] 4) Applying smoothing constraints in the scan line direction: constraining the additive fringe components. To ensure continuity in the horizontal direction (scan line direction), calculate its horizontal finite gradient (difference). ,in:
[0075] ;
[0076] The L1 norm of this gradient is penalized in the optimization objective to promote... The smooth, sparse variation pattern within the rows suppresses abrupt fine horizontal lines.
[0077] 5) Optimize model construction and solution.
[0078] The joint optimization objective function is established as follows:
[0079] ;
[0080] in, The Frobenius function represents the residual matrix and measures the model's data fitting error. `trace(·)` is the trace of the matrix. and These are regularization hyperparameters that control the manifold smoothing intensity and the sparsity smoothing degree of the fringe components, respectively. The default value can be set to... =0.1, =1.0, which can be adjusted by the user through the interface.
[0081] It should be noted that X and D are both subjected to low-pass filtering through regularization constraints. At the optimal point, the high-frequency energy of X and D is forcibly attenuated, and the Gaussian noise... The high-frequency components are automatically attenuated relative to the original noise, ultimately manifesting as low-frequency background noise rather than high-frequency spikes. Therefore, Gaussian noise does not need to be included in the joint optimization objective function. .
[0082] The difficulty in optimizing the objective function lies in the fact that X and D are entangled in the first term, and D is constrained by the L1 norm (non-differentiable, making gradient descent unsuitable). This embodiment introduces the Alternating Direction Multiplier Method (ADMM) to solve the problem, specifically by introducing Lagrange multipliers. and penalty parameters We construct an augmented Lagrangian function to separate the solutions for X and D.
[0083] The specific process is as follows.
[0084] Input: Observed image ( Clean composite graph G (used for construction) ),parameter , .
[0085] initialization: , Lagrange multipliers Penalty parameters .
[0086] Iterative update (taking the (k+1)th step as an example, where k is greater than or equal to 0):
[0087] (a) Fix D, update (Biosignal recovery), remove items unrelated to X, as follows:
[0088] ;
[0089] To find the extremum of the quadratic programming problem described above, we differentiate with respect to X and set it to 0. After simplification, we obtain a linear equation as follows:
[0090] ;
[0091] The corresponding formula can be obtained from the above formula. And calculate the corresponding .
[0092] (b) Fix X, update (Stripes extraction), will be combined with Remove irrelevant items, as follows:
[0093] ;
[0094] Set residuals The problem then simplifies to:
[0095] ;
[0096] The corresponding solution is obtained by using the accelerated solution method of M-PGMD for the above equation. And calculate the corresponding :
[0097] ;
[0098] This weighted moving average method is equivalent to a strong smoothing constraint in engineering, avoiding pixel-by-pixel iterative solution of TV and significantly reducing computational complexity.
[0099] (c) Based on the calculation of the corresponding and Update multipliers :
[0100] ;
[0101] (d) Stopping condition: When the original residual and duality The process stops when all iterations are less than the preset tolerance (e.g., 1e-4) or when the maximum number of iterations (e.g., 200) is reached. This is the observed image after logarithmic transformation.
[0102] Output: (Restored real biosignal image) (Estimated fringe components).
[0103] The above optimization objective function includes two key hyperparameters: manifold smoothing coefficient. and stripe sparsity coefficient .in, Used to control the smoothness of biological components on the manifold. The larger the value, the stronger the ability to suppress random noise, but the details may become smoother. This value controls the regularity of the stripe components; a higher value results in more consistent stripes. It can adaptively estimate based on the image's signal-to-noise ratio characteristics, or allow users to manually adjust it in the interactive interface to achieve a balance between stripe removal and detail preservation.
[0104] 6) Reconstruction results and mask fusion: This restores the true biological signal image. Perform inverse logarithmic field transformation The inverse-transformed image is multiplied pixel-by-pixel with the base mask matrix Mask to obtain the final destriped reconstructed image: , where ⊙ represents the Hadamard product (element-by-element multiplication). This operation effectively suppresses noise in the background region, ensuring that the final output is focused on the biological tissue region.
[0105] like Figure 2 As shown, a comparison of the destriating effect on typical m / z channel ion images is presented. The left side is the original two-dimensional ion image with non-stationary scan line drift stripes, and the right side is the reconstructed image after processing by the method of this invention, demonstrating that the stripes are suppressed and tissue details are preserved.
[0106] like Figure 3 The diagram illustrates the principle and effect of the M-PGMD destriping strategy in this embodiment, including a clean composite image, a manifold constraint diagram, a row smoothing constraint diagram, and the corresponding reconstructed image.
[0107] S3, interactive visual editing steps.
[0108] The interactive visual interface of this embodiment includes the following core functional areas:
[0109] 1) View presentation: The guided panoramic view, the original ion image window, and the real-time reconstruction preview window are displayed side by side.
[0110] 2) Parameter Control Panel: Provides sliders or input boxes for real-time adjustment of key parameters, including: K-nearest neighbor number K, manifold smoothing coefficient. , stripe sparsity coefficient .
[0111] 3) Real-time Preview: When a user adjusts any parameter, the system automatically focuses on the currently displayed image area (or uses the downsampled full image) and quickly performs a simplified iteration of the ADMM solution (e.g., reducing the number of iterations), updating the results in real time in the "Reconstruction Preview" window. Users can intuitively assess the impact of parameters and achieve fast and accurate optimization.
[0112] like Figure 4As shown, the system provides an integrated parameter tuning interface for interactive visualization, including a guided panoramic view, a raw ion image window, and a real-time reconstruction preview window. The interface abandons the traditional manual editing method of frequency domain masks, instead providing intuitive controls for the PGMD algorithm kernel. Users can select a region of interest (ROI) on the guided image, and the system instantly performs PGMD solving on that ROI and updates the "Reconstruction" and "Fringe Residual" views, facilitating rapid comparison of the effects of different parameter configurations.
[0113] S4, the result is written back to the management steps.
[0114] After processing is complete, perform data persistence and resource statistics operations.
[0115] 1) Write-back mode: Supports "Merge mode" (overwrites the dataset in the original file) or "Split mode" (saves as a new file).
[0116] 2) Compressed storage: When writing to the container, apply gzip lossless compression (compression level can be configured) to the m / z dataset to reduce disk usage.
[0117] 3) Metadata maintenance: Ensure that the metadata key names and types written back are strictly consistent with the original data (e.g., UTF-8 encoded strings and uniform numeric types) to ensure traceability.
[0118] 4) Resource Report: Records the peak and increment of memory usage throughout the entire processing process, and generates a quality report that includes a comparison of images before and after processing.
[0119] In summary, the method of this embodiment includes: importing MSI data in container format, filtering ion images according to the mass-to-charge ratio range, and generating a basic mask matrix; transforming the ion images in the logarithmic domain to convert multiplicative artifacts caused by instrument gain fluctuations into additive drift components; constructing a clean composite map as a structural prior, establishing a K-nearest neighbor graph Laplacian matrix based on this map to form anatomical manifold constraints, ensuring that the restored image maintains topological consistency with the composite map; simultaneously introducing scan line direction smoothing constraints to perform low-pass filtering on the stripe components to simulate slow energy drift and suppress fine horizontal stripe residue; solving the optimization model using the alternating direction multiplier method to obtain the stripe-reconstructed image, which is then fused with the mask matrix to retain effective signals; finally, supporting real-time parameter adjustment and preview through an interactive interface, and writing the processing results back to the container file. By combining logarithmic domain physical modeling, structural manifold constraints, and row direction smoothing, the ability to suppress non-stationary scan line drift stripes is significantly improved, while effectively protecting tissue edges and weak texture details, making it suitable for efficient processing and quality control of large-scale, high-resolution MSI data.
[0120] like Figure 5As shown, this embodiment also discloses a stripe artifact suppression system for mass spectrometry imaging, comprising:
[0121] The data import and preprocessing module 501 is implemented based on the HDF5 library or a dedicated .msi format parsing library. It is responsible for opening, closing, and traversing container files, performing metadata reading, channel filtering, 3D matrix pre-allocation, and incremental data block loading. This module also integrates a mask generation algorithm to provide a basic mask for subsequent processing.
[0122] The stripe removal module 502, as the core computing engine, encapsulates all sub-steps of the physics-driven manifold decomposition algorithm. This module receives single-channel data Y from the data management module. bad The clean synthesis graph G internally calls the logarithmic transformation unit and the graph construction unit (implementing KNN search and Laplacian matrix L) in sequence. G (Calculation), optimization solver (implementing ADMM iterative loop).
[0123] The interactive visual editing module 503 is responsible for rendering the image view, responding to user interface interaction events (such as slider dragging and button clicking), and passing parameter change events to the background stripe removal processing module through a message queue to trigger real-time preview calculations. Finally, it receives and displays the new preview image.
[0124] The result is written back to the management module 504, which is responsible for handling the persistence of the result. It receives the final result from the stripe removal processing module. The matrix, according to the user-selected mode (merge / split), calls the underlying repository API to write data to container files. Simultaneously, it takes system memory snapshots at key process nodes (such as before and after data loading, and after each iteration of calculation), calculates and records memory increments, and finally summarizes them to generate a resource usage report, providing a basis for system optimization and large-scale task scheduling. This module manages compression options and metadata serialization, ensuring file format compliance.
[0125] The specific implementation process of a stripe artifact suppression system for mass spectrometry imaging is basically the same as that in the above-described method embodiments, and will not be repeated here. It should be noted that each functional module in the system corresponds to a specific step in the method embodiments, and those skilled in the art can understand the specific implementation of the system based on the method flow.
[0126] like Figure 6 As shown, it illustrates a structural schematic diagram of a computer device 600 suitable for implementing electronic devices according to embodiments of the present application. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0127] like Figure 6As shown, the computer device 600 includes a central processing unit (CPU) 601 and a graphics processing unit (GPU) 602, which can perform various appropriate actions and processes according to programs stored in read-only memory (ROM) 603 or programs loaded from storage section 609 into random access memory (RAM) 604. The RAM 604 also stores various programs and data required for the operation of the device 600. The CPU 601, GPU 602, ROM 603, and RAM 604 are interconnected via bus 605. An input / output (I / O) interface 606 is also connected to bus 605. The following components are connected to the I / O interface 606: an input section 607 including a keyboard, mouse, etc.; an output section 608 including an LCD, speakers, etc.; a storage section 609 including a hard disk, etc.; and a communication section 610 including a network interface card, such as a LAN card or modem. The communication section 610 performs communication processing via a network such as the Internet. A driver 611 may also be connected to the I / O interface 606 as needed. Removable media 612, such as disks, optical discs, magneto-optical discs, semiconductor memories, etc., are installed on drive 611 as needed so that computer programs read from them can be installed into storage section 609 as needed.
[0128] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 610, and / or installed from removable medium 612. When the computer program is executed by central processing unit (CPU) 601 and graphics processing unit (GPU) 602, the functions defined in the methods of this application are performed.
[0129] It should be noted that the computer-readable medium described in this application can be a computer-readable signal medium, a computer-readable medium, or any combination thereof. A computer-readable medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor device, or any combination thereof. More specific examples of a computer-readable medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution device, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than a computer-readable medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution device, apparatus, or apparatus. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0130] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as "C" or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using dedicated hardware-based means to perform the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0132] The modules described in the embodiments of this application can be implemented in software or hardware. These modules can also be located within a processor.
[0133] The above embodiments illustrate the basic principles and implementation methods of the present invention, aiming to help understand the core concept and key steps of the invention. It should be understood that these embodiments are merely examples and do not limit the scope of application of the present invention. Those skilled in the art, based on their understanding of the concept of the present invention, can make various equivalent improvements to specific steps, parameter configurations, or system structures. These improvements also fall within the protection scope of the present invention, as defined in the appended claims.
Claims
1. A method for suppressing stripe artifacts in mass spectrometry imaging, characterized in that, Includes the following steps: S1, Data import and preprocessing steps: Receive the imported mass spectrometry imaging data, establish the mass-to-charge ratio m / z channel mapping, and filter the original two-dimensional ion images according to the target m / z range; load the original two-dimensional ion images sequentially and store them in the three-dimensional data matrix, and generate a basic mask matrix based on the effective pixel intensity threshold of all loaded original two-dimensional ion images. S2, the destriating steps of the M-PGMD manifold decomposition method based on artificial physics, include: S201 performs a logarithmic domain transformation on the original two-dimensional ion image of each channel, decomposing it into an observation image that includes the real biological signal image to be recovered, the additive fringe component that varies along the scan line direction, and Gaussian noise. S202, construct a clean comprehensive map based on a three-dimensional data matrix; the clean comprehensive map is an average ion map, a total ion current map (TIC), or a first principal component (PC1); S203, construct a K-nearest neighbor graph based on the clean composite graph, calculate the adjacency weights based on pixel intensity similarity, and construct a graph Laplacian matrix based on the adjacency weights and their degree matrix; S204, a horizontal finite gradient obtained by smoothing the additive fringe components along the scan line direction; S205. An optimization objective function is established, including the graph Laplacian matrix, smoothing intensity adjustment regularization coefficient, and horizontal finite gradient constraint term. The alternating direction multiplier method (ADMM) is used to solve the objective function to obtain the real biological signal image to be recovered. S206, perform an inverse logarithmic transformation on the real biological signal image to be recovered, and multiply the inversely transformed image pixel by pixel with the basic mask matrix to obtain the final stripe-reconstructed image.
2. The method for suppressing stripe artifacts in mass spectrometry imaging according to claim 1, characterized in that, Also includes: S3, interactive visual editing steps; details are as follows: The clean composite image, the original two-dimensional ion image, and the stripe-reconstructed image are displayed synchronously in the visualization interface. The clean composite image type, neighborhood size, or smoothing intensity can be adjusted in response to interactive commands, and the reconstruction preview is updated in real time.
3. The method for suppressing stripe artifacts in mass spectrometry imaging according to claim 1, characterized in that, Also includes: S4, the result is written back to the management steps; details are as follows: The reconstruction results are written to container files in merge or split modes, supporting sorting by m / z grouping and lossless compression storage, and maintaining consistency of metadata key names and types.
4. The method for suppressing stripe artifacts in mass spectrometry imaging according to claim 1, characterized in that, The mass spectrometry imaging data is a container file in .h5 or .msi format; the basic mask matrix is a binary matrix generated based on the effective pixel intensity threshold of the original two-dimensional ion image, used to identify the effective sample region.
5. The method for suppressing stripe artifacts in mass spectrometry imaging according to claim 1, characterized in that, The graph Laplacian matrix is constructed based on the K-nearest neighbor connections of the synthetic graph, with adjacency weights. The Gaussian kernel function is used for calculation, and the expression is: ; in, and Each pixel and pixels Pixel intensity value; For scale parameters; Set up a group for neighbors.
6. The method for suppressing stripe artifacts in mass spectrometry imaging according to claim 1, characterized in that, The horizontal finite gradient is represented as follows: ; Where y represents the row coordinate of the image when scanning the column direction. Indicates the column coordinates of the image in the scan row direction; Indicates position The horizontal gradient at that point is finite. Indicates position The fringe component value at the location; Indicates position The fringe component value at that location.
7. The method for suppressing stripe artifacts in mass spectrometry imaging according to claim 1, characterized in that, The optimization objective function is expressed as follows: ; in, The observed image after logarithmic transformation; The image represents the actual biological signals to be recovered. For additive fringe components; and These are the regularization coefficients for manifold smoothing and fringe constraint, respectively; The Frobenius norm of the residual matrix is represented; trace(·) is the trace of the matrix; This represents the L1 norm of a horizontally finite gradient.
8. The method for suppressing stripe artifacts in mass spectrometry imaging according to claim 3, characterized in that, The write-back process supports writing data to containers in ascending or descending order of m / z values and uses the gzip lossless compression algorithm for storage; it also includes memory pre-allocation and incremental loading tracking of the three-dimensional data matrix.
9. A stripe artifact suppression system for mass spectrometry imaging, characterized in that, include: The data import and preprocessing module is used to receive imported mass spectrometry imaging data, establish mass-to-charge ratio m / z channel mapping, and filter the original two-dimensional ion images according to the target m / z range. The original two-dimensional ion images are loaded sequentially and stored in the three-dimensional data matrix. A basic mask matrix is generated based on the effective pixel intensity threshold of all loaded original two-dimensional ion images. The stripe removal module includes: The logarithmic domain transformation unit is used to perform a logarithmic domain transformation on the original two-dimensional ion image of each channel. It is decomposed into an observed image that includes the real biological signal image to be recovered, additive fringe components that vary along the scan line direction, and Gaussian noise. A clean synthesis map construction unit is used to construct a clean synthesis map based on a three-dimensional data matrix; the clean synthesis map is an average ion map, a total ion current map (TIC), or a first principal component (PC1). The graph Laplacian matrix construction unit is used to construct a K-nearest neighbor graph based on the clean synthetic graph, calculate the adjacency weights based on pixel intensity similarity, and construct the graph Laplacian matrix based on the adjacency weights and their degree matrix. The horizontal finite gradient calculation unit is used to smooth the horizontal finite gradient obtained by the additive fringe components along the scan line direction; The real biological signal image restoration module is used to establish an optimization objective function that includes the graph Laplacian matrix, smoothing intensity adjustment regularization coefficient, and horizontal finite gradient constraint term. The alternating direction multiplier method (ADMM) is used to solve the real biological signal image to be restored. The image reconstruction unit is used to perform an inverse logarithmic domain transformation on the real biological signal image to be recovered, and multiply the inversely transformed image pixel by pixel with the basic mask matrix to obtain the final stripe-reconstructed image. An interactive visualization editing module is used to simultaneously display the clean composite image, the original two-dimensional ion image, and the stripe-reconstructed image in a visualization interface. It responds to interactive commands to adjust the clean composite image type, neighborhood size, or smoothing intensity, and updates the reconstruction preview in real time. The results write-back and management module is used to write the reconstruction results to container files in merge or split mode. It supports sorting by m / z grouping and lossless compression storage, and maintains the consistency of metadata key names and types.
10. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-8.