A method and system for tumor detection and identification based on MRI images
By constructing a gradient direction stability matrix and a dynamic boundary framework, and combining it with the morphological consistency matrix partitioning among multiple sequences, the problem of artifact interference in traditional tumor detection methods is solved, and high-precision tumor lesion identification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SICHUAN LILAISI NUO BIOTECHNOLOGY CO LTD
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-17
AI Technical Summary
Traditional tumor detection and identification methods struggle to effectively eliminate artifact interference when faced with signal fluctuations in complex tissue backgrounds, resulting in lesion localization results that are not accurate and robust enough to meet the needs of precise diagnosis.
By constructing a gradient direction stability matrix, contour boundary analysis, and a dynamic boundary framework, combined with morphological consistency matrix partitioning among multiple sequences, artifact interference is automatically eliminated, improving the geometric accuracy and structural integrity of tumor lesion identification.
Under complex imaging conditions, it significantly improves the geometric accuracy and structural integrity of tumor lesion identification and reduces the impact of artifact interference.
Smart Images

Figure CN122089736B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a tumor detection and recognition method and system based on nuclear magnetic resonance images. Background Technology
[0002] Image recognition technology involves using computer vision, image processing, and pattern recognition methods to analyze and understand image information, enabling the detection, classification, and recognition of targets within images. This technology encompasses core aspects such as image acquisition, image preprocessing, feature extraction, classification and recognition, and result output, and is widely applied in various scenarios including medical image analysis, security monitoring, industrial inspection, and traffic monitoring. In the medical image processing branch, image recognition technology is particularly important, often used for disease region localization, tissue structure identification, and automatic lesion detection. It primarily relies on image data acquired by medical imaging equipment, such as CT images, MRI images, and ultrasound images, and utilizes techniques such as grayscale analysis, texture analysis, image segmentation, and statistical modeling to identify target regions.
[0003] Traditional tumor detection and identification methods utilize MRI images as input data. Doctors manually observe the images to identify lesion areas, or computer-aided detection methods are used to locate and determine potential tumor regions in the images. These methods typically use image grayscale thresholding, region growing, edge detection, template matching, or image texture-based clustering to segment lesion areas. The presence of a tumor is then determined based on morphological characteristics such as size, boundary clarity, and signal intensity distribution within the extracted image regions. Some computer-aided systems also use traditional pattern recognition algorithms such as support vector machines, K-nearest neighbors, or Bayesian classifiers to classify and identify extracted features to aid in determining the benign or malignant nature of lesions in the image. These methods rely on specific rule settings and empirical feature selection, and are less adaptable to image noise, signal variations, and differences in lesion morphology.
[0004] Traditional identification methods rely on manually set grayscale thresholds or empirical texture features for region segmentation, and can only perform identification on lesions of specific shapes or high contrast, making it difficult to cope with signal fluctuations in complex tissue backgrounds. This type of operation mode lacks in-depth exploration of the spatial continuity of multi-sequence images, and static feature analysis based solely on a single frame image cannot effectively eliminate artifact interference. When faced with complex clinical scenarios with high image noise or blurred lesion boundaries, a large number of false positives and false negatives will occur due to insufficient feature extraction or rigid discrimination rules, resulting in the accuracy and robustness of the final lesion localization results failing to meet the needs of precision diagnosis. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and propose a tumor detection and identification method and system based on nuclear magnetic resonance imaging.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a tumor detection and identification method based on nuclear magnetic resonance imaging, comprising the following steps:
[0007] S1: Acquire multi-sequence MRI images, calculate the gradient vector angle difference within the sliding window, construct a gradient direction stability matrix based on the gradient vector angle difference and perform stability scoring, and filter out candidate lesion regions;
[0008] S2: Set the isopleth level for the candidate lesion area, calculate the correspondence of boundary points and construct a spatial projection displacement map, determine the gradient direction and position offset of the boundary points, and obtain the isopleth boundary analysis results.
[0009] S3: Based on the contour boundary analysis results, the continuity is determined according to the spatial projection displacement map, gradient direction and position offset, the variation rate is calculated and abrupt points are excluded, and a dynamic boundary framework is constructed.
[0010] S4: Extract regions based on the dynamic boundary framework, calculate boundary overlap and intersection ratio, construct a sequence consistency matrix based on boundary overlap and intersection ratio, divide the sequence consistency matrix into a high consistency layer, an intermediate layer and a low response layer, and obtain the consistency partitioning result;
[0011] S5: Based on the consistency division results, the mean sliding adjustment is performed on the high consistency layer, the edge curvature change rate is calculated for the intermediate layer, the edge curvature change rate is reshaped using the edge variation amount, the region where the edge curvature change rate exceeds the preset morphological mutation judgment threshold is removed, the low response layer is eliminated, and the tumor identification result is generated.
[0012] The present invention is improved in that the candidate lesion region includes a high gradient response pixel index, a regional connectivity mask, and local texture distribution features; the contour boundary analysis results include horizontal relative displacement, vertical relative displacement, and spatial Euclidean distance deviation; the dynamic boundary framework includes effective boundary point spatial coordinates, interlayer connection topology, and three-dimensional fitted surface parameters; the consistency partitioning results include a high-confidence core pixel set, morphological edge transition zone, and irrelevant noise interference area; and the tumor identification results include a fine contour map of the lesion, tumor volume quantification index, and spatial location confidence map.
[0013] The present invention is improved in that the step of obtaining the candidate lesion region specifically includes:
[0014] S111: Acquire multi-sequence NMR images, extract gradient features for pixels within a preset sliding window area, detect the gradient vector angle difference between any two pairs of pixels, and construct a gradient direction stability matrix based on the distribution data of the gradient vector angle difference in multiple discrete directions.
[0015] S112: Call the gradient direction stability matrix, perform eigenvalue decomposition to determine anisotropy indices, obtain the normalized background signal fluctuation amplitude, gradient coherence factor, angular divergence coefficient, and Frobenius norm of the gradient direction stability matrix within a set window, construct a feature space comprehensive modulus based on the normalized background signal fluctuation amplitude and the Frobenius norm of the gradient direction stability matrix, and perform amplitude modulation on the Frobenius norm of the gradient direction stability matrix using anisotropy indices, perform normalization mapping on it based on the feature space comprehensive modulus, extract the basic feature response components, perform weighted transformation on the normalized background signal fluctuation amplitude through the angular divergence coefficient, and calculate the relative ratio feature to quantify the local divergence fluctuation effect in combination with the Frobenius norm of the gradient direction stability matrix, calculate the absolute difference deviation between the gradient coherence factor and the local divergence fluctuation effect, generate a coherence deviation compensation component, perform spatial compensation superposition and fusion processing on the basic feature response component and the coherence deviation compensation component, and calculate and obtain a stability score that characterizes the local structural distribution features of the image region.
[0016] S113: Call the stability score, call the preset average tissue background stability level to filter the stability score, mark the area with the stability score less than the average tissue background stability level as a pseudo-strong response area and perform suppression elimination to generate candidate lesion areas.
[0017] The present invention is improved in that the steps for obtaining the contour line boundary analysis results are specifically as follows:
[0018] S211: For the pixel intensity distribution range in the candidate lesion area, set multiple iso-levels, traverse each iso-level and perform edge detection in the current slice image, extract the iso-signal intensity pixels corresponding to each level, aggregate discrete pixels into continuous contours according to the neighborhood connectivity criterion, record the two-dimensional coordinate data of pixels on the contours, and generate a multi-level iso-line boundary point set.
[0019] S212: Call the multi-level contour line boundary point set, perform nearest neighbor search in the corresponding spatial neighborhood of adjacent continuous slice images, determine the matching point that has spatial association with the current slice boundary point based on the Euclidean distance minimization principle, establish a cross-slice point-to-point mapping index, calculate the vector difference between the projection coordinates of the current boundary point on the adjacent slice plane and the actual matching point coordinates based on the mapping index, and construct a spatial projection displacement map.
[0020] S213: Based on the spatial projection displacement map, analyze the geometric position difference of corresponding boundary points between adjacent slices, calculate the coordinate difference in the horizontal and vertical directions respectively, obtain the position offset, calculate the rate of change of pixel gray value along the slice layer normal vector direction for the associated point pair corresponding to the position offset, determine the signal gradient direction, integrate the data entries of position offset and signal gradient direction, and generate contour boundary analysis results.
[0021] The present invention is improved in that the step of obtaining the dynamic boundary frame is specifically as follows:
[0022] S311: Based on the contour boundary analysis results, extract the signal gradient direction and position offset, calculate the cosine similarity of the gradient vectors of corresponding points in adjacent slices, combine the position offset modulus to quantify the continuity of local structure, perform second-order difference operation on the spatial coordinates of boundary points within a sliding window covering three consecutive slices, evaluate the smoothness of the lesion contour interlayer trajectory, and generate the boundary variation rate of three consecutive slices.
[0023] S312: Call the continuous three slice boundary variation rate, obtain the preset structural mutation judgment threshold, compare the variation rate value of each boundary point with the structural mutation judgment threshold, determine the points that exceed the structural mutation judgment threshold as abnormal mutation points, mark the abnormal mutation points as artifact interference areas and remove them from the point set, filter and retain the remaining pixels, and generate a set of filtered valid boundary points.
[0024] S313: Call the selected set of valid boundary points, perform three-dimensional spatial interpolation on the discretely distributed valid points, fill the gaps between slice layers, establish the topological connection relationship between adjacent layer boundary points, fit and generate a continuous geometric surface model representing the three-dimensional morphology of the lesion, map the vertex data of the geometric surface model back to the original image coordinate system, form a closed contour, and construct a dynamic boundary framework.
[0025] The present invention is improved in that the step of obtaining the consistency partitioning result is specifically as follows:
[0026] S411: Based on the ROI range defined by the dynamic boundary framework, the corresponding anatomical structure region is extracted from each modal data of the multi-sequence MRI images. The intersection-union algorithm is used to calculate the overlap ratio between any two modal regions to determine the area intersection ratio. At the same time, the average distance deviation of the corresponding contour point set in Euclidean space is calculated to determine the degree of boundary overlap and generate morphological difference measurement data between sequences.
[0027] S412: Call the morphological difference measurement data between sequences, extract the area intersection ratio and boundary overlap, perform maximum and minimum value normalization on the two sets of parameters respectively to eliminate the difference in dimensions, set weight coefficients to perform weighted fusion on the normalized parameters, calculate the modal similarity score that represents the geometric similarity between modes, traverse all sequence combinations and fill the corresponding modal similarity scores into a two-dimensional array structure to construct a sequence morphological consistency matrix;
[0028] S413: Invoke the sequence morphological consistency matrix, use the preset confidence level threshold to perform a numerical comparison between the modal similarity score in the matrix and the level threshold, and classify the sequence combination with the modal similarity score higher than the upper threshold into a high consistency layer according to the comparison result, define the sequence combination with the score in the double threshold interval as the middle layer, and mark the sequence combination with the score lower than the lower threshold as the low response layer, integrate the hierarchical classification information, and generate a consistency partitioning result.
[0029] The present invention is improved in that the steps for obtaining the tumor identification result are specifically as follows:
[0030] S511: Based on the consistency partitioning result, lock the voxel set covered by the high consistency layer, define a sliding window including spatial neighborhood information, set the traversal step size parameter, perform a sliding scan along the three dimensions of the voxel matrix, retrieve the pixel intensity values within the window coverage area, calculate the arithmetic mean of the local region intensity, replace the original grayscale data of the central voxel with the mean value, perform mean value update processing on the voxel set to generate the intensity correction core region;
[0031] S512: For the intermediate layer marked by the consistency division result, extract the discrete coordinate points of the structural edge contour, calculate the change in the tangent vector angle of adjacent point pairs on the contour, obtain the curvature parameter, perform discrete differential operation on the curvature parameter distributed along the contour path, determine the curvature change rate of the structural edge fitting, use the preset morphological change judgment threshold, perform numerical comparison between the curvature change rate of the structural edge fitting and the morphological change judgment threshold, screen out the morphologically unstable segments with values exceeding the limit, perform morphological closing operation and spline smoothing fitting according to the edge variation amplitude of the segment, reconstruct the geometric contour line, and generate the reshaped edge transition zone;
[0032] S513: Call the low response layer index data in the consistency partitioning result, construct the corresponding culling mask in the global image matrix and execute zeroing, take the intensity correction core area as the main structure of the lesion, take the reshaped edge transition zone as the external defining contour, perform spatial region fusion through Boolean union operation, construct a continuous and closed three-dimensional lesion voxel model, count the number of voxels and spatial distribution range in the model, and generate tumor recognition results.
[0033] A tumor detection and identification system based on nuclear magnetic resonance (NMR) images, wherein the NMR-based tumor detection and identification system is used to implement the aforementioned tumor detection and identification method based on NMR images, and the system comprises:
[0034] The candidate region identification module acquires multi-sequence MRI images, calculates the gradient vector angle difference within the sliding window, constructs a gradient direction stability matrix based on the gradient vector angle difference and performs stability scoring, and filters out candidate lesion regions.
[0035] The contour analysis module sets contour levels for the candidate lesion area, calculates the correspondence of boundary points and constructs a spatial projection displacement map, determines the gradient direction and position offset of the boundary points, and obtains the contour boundary analysis results.
[0036] The boundary framework construction module, based on the contour boundary analysis results, determines continuity according to the spatial projection displacement map, gradient direction and position offset, calculates the variation rate and eliminates abrupt change points, and constructs a dynamic boundary framework.
[0037] The consistency analysis module extracts regions based on the dynamic boundary framework, calculates the boundary overlap and intersection ratio, constructs a sequence consistency matrix based on the boundary overlap and intersection ratio, and divides the sequence consistency matrix into a high consistency layer, an intermediate layer and a low response layer to obtain the consistency partitioning result.
[0038] The identification result processing module, based on the consistency division result, performs mean sliding adjustment on the high consistency layer, calculates the edge curvature change rate for the intermediate layer, uses the edge variation amount to reshape the region where the edge curvature change rate exceeds the preset morphological mutation judgment threshold, removes the low response layer, and generates tumor identification results.
[0039] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0040] In this invention, by constructing a gradient direction stability matrix and an anisotropy scoring mechanism, the vector angle distribution between pixels is quantitatively evaluated, effectively suppressing background noise and accurately locating candidate regions. Using contour spatial projection displacement maps and boundary variation rate analysis, the structural continuity features between slices are dynamically captured, artifact interference is automatically eliminated, and a high-fidelity dynamic boundary framework is constructed. Combining the morphological consistency matrix between multiple sequences, differentiated levels are divided, and differentiated mean adjustment and edge reshaping are performed for regions with different confidence levels. Under complex imaging conditions, the geometric accuracy and structural integrity of tumor lesion identification are improved. Attached Figure Description
[0041] Figure 1 This is a flowchart of the method of the present invention;
[0042] Figure 2 This is a flowchart illustrating the process of obtaining candidate lesion regions according to the present invention;
[0043] Figure 3 This is a flowchart illustrating the process of obtaining contour boundary analysis results in this invention.
[0044] Figure 4 This is a flowchart illustrating how the dynamic boundary frame is obtained in this invention.
[0045] Figure 5 This is a flowchart illustrating the process of obtaining consistent partitioning results according to the present invention;
[0046] Figure 6 This is a flowchart illustrating how the present invention obtains tumor identification results. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0048] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0049] Please see Figure 1 This invention provides a technical solution: a tumor detection and identification method based on nuclear magnetic resonance imaging, comprising the following steps:
[0050] S1: Acquire multi-sequence MRI images, calculate the gradient vector angle difference between any two pairs of pixels within a set sliding window area, construct a gradient direction stability matrix based on the distribution data of the gradient vector angle difference in multiple directions, perform stability scoring on the gradient direction stability matrix according to anisotropy index, suppress and remove areas with stability scores lower than the average tissue background stability level, and screen out candidate lesion areas.
[0051] S2: Set multiple isopleth levels for signal intensity in candidate lesion areas, calculate the spatial correspondence of each isopleth boundary point in adjacent slices, construct the spatial projection displacement map of isopleths in continuous slice images, and determine the signal gradient direction and position offset of isopleth boundary points in neighboring slices to obtain isopleth boundary analysis results.
[0052] S3: Based on the contour line boundary analysis results, determine the continuity of the spatial structure according to the spatial projection displacement map, signal gradient direction and position offset change trend, calculate the boundary variation rate between three consecutive slices, determine abnormal mutation points based on the boundary variation rate, mark the abnormal mutation points as artifact interference areas and perform the elimination operation, and construct a dynamic boundary framework based on the remaining effective boundary points.
[0053] S4: Extract corresponding regions in multi-sequence NMR images based on dynamic boundary framework, calculate the degree of boundary overlap and area intersection ratio between sequences, construct a sequence morphological consistency matrix based on the degree of boundary overlap and area intersection ratio, divide the sequence morphological consistency matrix into a high consistency layer, an intermediate layer and a low response layer, and obtain the consistency partitioning result.
[0054] S5: Based on the consistency partitioning results, mean sliding adjustment is performed on the pixel intensity in the high consistency layer, the change rate of the fitting curvature of the structure edge is calculated for the intermediate layer, and the morphological boundary reshaping is performed on the region where the change rate of the fitting curvature of the structure edge exceeds the set threshold. Low response layers are removed, and tumor recognition results are generated.
[0055] Candidate lesion regions include high gradient response pixel indexes, regional connectivity masks, and local texture distribution features. Contour boundary analysis results include horizontal relative displacement, vertical relative displacement, and spatial Euclidean distance deviation. The dynamic boundary framework includes the spatial coordinates of effective boundary points, interlayer connectivity topology, and three-dimensional fitted surface parameters. Consistency partitioning results include high-confidence core pixel sets, morphological edge transition zones, and non-correlated noise interference areas. Tumor identification results include fine contour maps of lesions, tumor volume quantification indicators, and spatial location confidence maps.
[0056] Please see Figure 2 The specific steps for obtaining candidate lesion regions are as follows:
[0057] S111: Acquire multi-sequence NMR images, extract gradient features for pixels within a preset sliding window area, detect the gradient vector angle difference between any two pairs of pixels, and construct a gradient direction stability matrix based on the distribution data of the gradient vector angle difference in multiple discrete directions.
[0058] A high-speed data transmission channel was established by directly connecting to a 3.0T superconducting magnetic resonance imaging (MRI) scanner via a medical digital imaging and communication interface. Following a pre-set scanning protocol, multiple MRI image data sequences of the subject were sequentially acquired. The data specifically covered four modalities: T1-weighted imaging, T2-weighted imaging, liquid attenuation inversion recovery sequence, and contrast-enhanced T1-weighted imaging. Upon receiving the raw DICOM format data, the dcm2nii toolkit was immediately used to convert it to NIfTI format to unify the spatial coordinates of the three-dimensional voxels. Subsequently, a pre-set N4 field correction algorithm library was loaded, with a maximum iteration count of 50 and a convergence threshold of 0.001. Field inhomogeneity correction was performed on all image sequences to eliminate low-frequency intensity artifacts caused by differences in RF coil sensitivity. After correction, the T1 contrast-enhanced sequence was selected as a fixed reference image. A rigid body registration algorithm based on mutual information was used, with 6 degrees of freedom geometric transformation parameters, to precisely align the images of the other three sequences to the reference space. The resampled voxel size was 1 mm x 1 mm x 1 mm. Based on this, Z-score normalization is performed on the image intensity of each sequence, and the average intensity value and standard deviation of the non-zero pixel region of the entire image are calculated to map the pixel intensity to a standard normal distribution space. Next, a two-dimensional sliding window with a size of 5 pixels by 5 pixels is defined, with a step size of 1 pixel, and point-by-point scanning is performed along the row and column directions of the image matrix. Within the local area covered by each window, the Sobel operator is called to calculate the gradient components in the horizontal and vertical directions respectively, and the arctangent function is used to calculate the gradient direction angle of each pixel. For any two pairs of pixels within the window, the absolute difference of their gradient direction angles is calculated to generate a set of gradient vector angle differences. The angle range from 0 degrees to 180 degrees is divided into 36 discrete intervals, each with a width of 5 degrees. The frequency of the gradient vector angle difference falling within each interval is counted to construct a gradient direction stability matrix that reflects the consistency of local texture direction.
[0059] S112: Call the gradient direction stability matrix, perform eigenvalue decomposition to determine the anisotropy index, and use the background signal fluctuation amplitude, gradient coherence factor, and angular divergence coefficient within the set window, employing the formula:
[0060] ;
[0061] Calculate and obtain the stability score;
[0062] in, Represents stability score, The anisotropy index is obtained by performing eigenvalue decomposition on the gradient direction stability matrix and calculating the ratio of the maximum to the minimum eigenvalues. The Frobenius norm, representing the stability matrix of the gradient direction, is obtained by taking the square root of the sum of the squares of all elements in the matrix. This represents the normalized background signal fluctuation amplitude, obtained by calculating the standard deviation of pixel intensity within the window and dividing it by the global maximum signal intensity value of the image. The gradient coherence factor is obtained by constructing a local structure tensor and calculating the degree of difference in its eigenvalues. The angular divergence coefficient is obtained by the variance of the gradient vector angle relative to the principal direction within the statistical window.
[0063] Singular value decomposition (SVD) is performed to extract the diagonal elements of the matrix as eigenvalues. The ratio of the largest and smallest eigenvalues is calculated to obtain an anisotropy index characterizing the uniformity of texture direction. Simultaneously, the sum of squares of all elements in the matrix is calculated, and the square root of this sum is performed to obtain the Frobenius norm, which quantifies the overall texture energy intensity of the local region. To assess the background noise level, the grayscale intensity values of all pixels within the sliding window are extracted, their standard deviation is calculated, and the global maximum grayscale value is retrieved. The standard deviation is divided by this global maximum value to obtain the normalized background signal fluctuation amplitude. Furthermore, a local structure tensor is constructed, and the trace and determinant of the structure tensor are calculated. The gradient coherence factor is analytically obtained by dividing the square root of the difference between the square of the trace and four times the determinant by the trace value. For the angular divergence coefficient, the angular deviation of the gradient vectors of all pixels within the window relative to the gradient vector of the central pixel of the window is calculated, and the variance of these deviations is used as the angular divergence coefficient. After obtaining the above specific physical parameters, they are substituted into a preset stability score calculation formula. For example, when processing the tumor margin region at coordinates (128, 128) of a slice, the measured anisotropy index is 0.85, the Frobenius norm is 12.4, the normalized background signal fluctuation amplitude is 0.12, the gradient coherence factor is 0.78, and the angular divergence coefficient is 0.35. The following calculations are performed:
[0064] First, calculate the denominator:
[0065] ;
[0066] Calculate the numerator: ;
[0067] Divide the numerator by the denominator: ;
[0068] Second calculation:
[0069] ;
[0070] Finally, add the first and second terms together: ;
[0071] The advantage of this formula lies in its ability to effectively suppress spurious responses in high-intensity noise regions by introducing a coupling term between the Frobenius norm and the background signal fluctuation amplitude. Experimental data show that in low-quality images with a signal-to-noise ratio below 15 dB, this calculation strategy reduces the false positive rate of lesion detection by 18.4%. Table 1 lists the measured mean values of parameters for different tissue types.
[0072] Table 1. Measured mean values of stability parameters for different tissue types:
[0073] ;
[0074] S113: Call the stability score, call the preset average tissue background stability level to filter the stability score, mark the area with the stability score less than the average tissue background stability level as a pseudo-strong response area and perform suppression elimination to generate candidate lesion areas.
[0075] The average tissue background stability level is set by extracting background tissue regions that do not contain high gradient response features from multi-sequence NMR images as a reference sample set, calculating the stability score of each pixel in the reference sample set, and performing an arithmetic mean operation on the calculated stability scores as the average tissue background stability level.
[0076] As shown in Table 1, the core tumor region exhibits significant high stability scores. The calculated stability scores are then used, along with a preset average tissue background stability level. This level is obtained as follows: the system automatically identifies and extracts normal white matter regions outside the ventricles in the T1 sequence that lack high signal abnormalities as a background sample set, containing approximately 5000 pixels. The system calculates the stability scores of all pixels in this set, obtaining an arithmetic mean of 0.58. A threshold of 2.5 times this mean, or 1.45, is set. The stability scores of all pixels in the image are compared one by one. Regions with scores below 1.45 are identified as pseudo-strong response regions, their corresponding binary masks are set to 0, and suppression and elimination operations are performed. Finally, connected regions with scores higher than or equal to 1.45 are retained to generate candidate lesion regions.
[0077] Please see Figure 3 The specific steps for obtaining the contour line boundary analysis results are as follows:
[0078] S211: For the pixel intensity distribution range in the candidate lesion area, set multiple discrete iso-levels, traverse each iso-level and perform edge detection in the current slice image, extract the iso-signal intensity pixels corresponding to each level, aggregate the discrete pixels into a continuous contour according to the neighborhood connectivity criterion, record the two-dimensional coordinate data of the pixels on the contour, and generate a multi-level iso-line boundary point set.
[0079] The process of setting multiple discretized equivalent levels specifically involves: obtaining the maximum and minimum signal intensity values of all pixels within the candidate lesion region, and calculating the difference between the maximum and minimum signal intensity values as the signal dynamic range; calling a preset level division step size coefficient, and dividing the signal dynamic range at equal intervals based on the level division step size coefficient, determining the signal intensity value of each segmented node as the baseline level intensity; for each baseline level intensity, setting a preset intensity tolerance range, and classifying signal intensity values within the baseline level intensity plus or minus the intensity tolerance range into the same equivalent level; wherein, the level division step size coefficient is adaptively adjusted based on the peak density of the pixel intensity histogram within the candidate lesion region, with a smaller coefficient value for higher peak density to increase level density; the intensity tolerance range is set based on the overall noise level within the candidate lesion region, with a larger tolerance range value for higher noise level to reduce noise interference with edge extraction.
[0080] After identifying the candidate lesion region, the grayscale intensity of all pixels within that region is first scanned. The maximum intensity value is 240, and the minimum intensity value is 40. The dynamic range of the signal is calculated to be 200. A preset layer division step size coefficient is then applied. This coefficient is dynamically determined based on the peak density of the grayscale histogram within the region. If the histogram shows a significant peak at grayscale value 150 (the peak percentage exceeds 5% of the total number of pixels), the step size coefficient is automatically set to 0.025, i.e., the layer interval is 5 (200 multiplied by 0.025). If the peak distribution is flat, it is set to 0.05. In this embodiment, a step size of 5 grayscale units is used to discretize the dynamic range into 40 equal-value layers (e.g., 40, 45, 50…240). For each baseline layer intensity, an intensity tolerance range of ±1.5 grayscale units is set. The tolerance range is set based on the noise standard deviation of the image background region (measured to be 1.2), and a value slightly larger than the noise level is taken to ensure robustness. Each slice image is traversed, and the Canny edge detection operator is used to extract pixels that meet the intensity requirements of each isopleth level. According to the 8-neighborhood connectivity criterion, isolated pixels are connected into closed or semi-closed curves, and the two-dimensional coordinates (x, y) of all pixels on the curves are recorded to generate a multi-level isopleth boundary point set.
[0081] S212: Call the multi-level contour line boundary point set, perform the nearest neighbor search in the corresponding spatial neighborhood of adjacent continuous slice images, determine the matching point that has a spatial relationship with the current slice boundary point based on the Euclidean distance minimization principle, establish a point-to-point mapping index across slices, calculate the vector difference between the projection coordinates of the current boundary point on the adjacent slice plane and the actual matching point coordinates based on the mapping index, and construct a spatial projection displacement map.
[0082] For processing adjacent consecutive slice images (e.g., layers N and N+1), a circular search neighborhood with a radius of 3 pixels is established at the corresponding spatial location in layer N+1 (i.e., at the (x, y) coordinates of the boundary point of layer N). The Euclidean distance between the boundary point of layer N and all boundary points of layer N+1 within this neighborhood is calculated, and the point with the smallest distance is selected as the spatial association matching point. For example, if the coordinates of a point in layer N are (100, 100), and the nearest point in layer N+1 is found to be (101, 102), a mapping index is established between the two points. The coordinate vector difference between the two points is calculated, i.e., the horizontal displacement is 1 pixel and the vertical displacement is 2 pixels. This vector difference data is stored in a spatial projection displacement map. This displacement map is stored in the form of a sparse matrix, where the row index represents the slice number, the column index represents the boundary point number, and the element value is a two-dimensional displacement vector.
[0083] S213: Based on the spatial projection displacement map, analyze the geometric position difference of corresponding boundary points between adjacent slices, calculate the coordinate difference in the horizontal and vertical directions respectively, obtain the position offset, calculate the rate of change of pixel gray value along the slice layer normal vector direction for the associated point pair corresponding to the position offset, determine the signal gradient direction, integrate the data entries of position offset and signal gradient direction, and generate contour boundary analysis results.
[0084] Based on the spatial projection displacement map, the geometric position differences between adjacent slices are analyzed point by point. For matching point pairs, the horizontal coordinate difference 1 and the vertical coordinate difference 2 are extracted as position offsets. Simultaneously, at the boundary point of the Nth slice, the first derivative of the pixel grayscale is calculated along the Z-axis perpendicular to the slice plane, i.e., (N+1th layer grayscale - N-1th layer grayscale) / (2 * interlayer spacing). If the calculation result is positive, it indicates that the signal is enhanced along the Z-axis; if it is negative, it is weakened. The direction sign (+1 or -1) and magnitude of the rate of change are recorded to determine the signal gradient direction. The position offset (1, 2) is associated with and stored with the signal gradient direction data to construct a comprehensive feature entry containing both spatial geometry and physical properties, generating contour boundary analysis results.
[0085] Please see Figure 4 The specific steps for obtaining the dynamic boundary frame are as follows:
[0086] S311: Based on the contour boundary analysis results, extract the signal gradient direction and position offset, calculate the cosine similarity of the gradient vectors of corresponding points in adjacent slices, combine the position offset modulus to quantify the continuity of local structure, and perform second-order difference operation on the spatial coordinates of boundary points within a sliding window covering three consecutive slices to evaluate the smoothness of the lesion contour interlayer trajectory in a numerical form and generate the boundary variation rate of three consecutive slices.
[0087] Extract the signal gradient direction and position offset from each entry. For three consecutive slices of layer N-1, N, and N+1, select the corresponding matching point triplets. First, calculate the cosine similarity of the gradient vectors of corresponding points in layer N-1 and layer N, and the cosine similarity of corresponding points in layer N and layer N+1. If both similarity values are greater than 0.9, it indicates that the gradient directions are highly consistent. Next, calculate the position offset modulus, which is the square root of the sum of the squares of the horizontal and vertical displacements. Within a sliding window covering these three consecutive slices, perform a second-order difference operation on the spatial coordinates (x, y, z) of the three corresponding points. Specifically, the calculation formula is: ,in This is a three-dimensional coordinate vector. The modulus of this second-order difference result directly reflects the smoothness of the transition of the lesion contour between slices. The smaller the value, the smoother the transition. This modulus value is defined as the variation rate of the boundary of three consecutive slices.
[0088] S312: Call the three consecutive slice boundary variation rate, obtain the preset structural mutation judgment threshold, compare the variation rate value of each boundary point with the structural mutation judgment threshold, determine the points that exceed the structural mutation judgment threshold as abnormal mutation points that do not conform to anatomical continuity, mark the abnormal mutation points as artifact interference areas and remove them from the point set, filter and retain the remaining pixels that meet the smooth transition criteria, and generate a set of filtered valid boundary points.
[0089] The specific method for setting the structural mutation judgment threshold is as follows: statistically analyze the boundary variation rate values obtained from all effective boundary points in the current candidate lesion area, construct the overall statistical distribution of the variation rate values, calculate the arithmetic mean and standard deviation of the distribution, and establish the sum of the arithmetic mean and the standard deviation of the set confidence coefficient multiple as the structural mutation judgment threshold.
[0090] The process for setting the structural mutation threshold is as follows: The variance rates of all valid boundary points within the current candidate lesion region are statistically analyzed to obtain a set of values. The arithmetic mean of this set is calculated to be 0.85, the standard deviation to be 0.32, and the confidence coefficient to be 3. The structural mutation threshold is calculated as 0.85 plus 3 multiplied by 0.32, which is 1.81. The variance rate of each boundary point is iterated. For example, if the variance rate of a point is 2.15, exceeding the threshold of 1.81, this point is determined to be an abnormal mutation point that does not conform to anatomical continuity (possibly due to vascular pulsation artifacts or jumps caused by inter-layer registration errors). This point is marked as an artifact interference area, and its index is removed from the boundary point set. After full screening, all pixels with a variance rate less than or equal to 1.81 are retained, generating a set of filtered valid boundary points.
[0091] S313: Call the filtered set of valid boundary points, perform three-dimensional spatial interpolation on the discretely distributed valid points, fill the gaps between slice layers, establish the topological connection relationship between adjacent layer boundary points, fit and generate a continuous geometric surface model that represents the three-dimensional morphology of the lesion, map the vertex data of the geometric surface model back to the original image coordinate system, form a closed contour, and construct a dynamic boundary framework.
[0092] By calling a filtered set of valid boundary points and employing a cubic B-spline interpolation algorithm, three-dimensional spatial interpolation is performed on the discrete boundary points between slice layers. Three virtual interpolation layers are generated between every two original slice layers to fill the gaps between layers, resulting in a fourfold increase in Z-axis resolution. Based on the interpolated dense point cloud, the Delaunay triangulation algorithm is used to establish the topological connections between boundary points of adjacent layers, constructing a continuous geometric surface model composed of tens of thousands of triangular patches. The vertex coordinate data of this surface model is mapped back to the original 512x512x512 image coordinate system, forming a closed three-dimensional envelope surface, i.e., a dynamic boundary frame. This frame precisely defines the volume range of the lesion in three-dimensional space.
[0093] Please see Figure 5 The specific steps for obtaining the consistent partitioning results are as follows:
[0094] S411: Based on the ROI range defined by the dynamic boundary frame, the corresponding anatomical structure region is extracted from each modal data of the multi-sequence MRI images. The intersection-union algorithm is used to calculate the overlap ratio between any two modal regions to determine the area intersection ratio. At the same time, the average distance deviation of the corresponding contour point set in Euclidean space is calculated to determine the degree of boundary overlap and generate morphological difference measurement data between sequences.
[0095] Based on the region of interest defined by a dynamic boundary frame, corresponding anatomical structures are extracted from the image data of the T1 enhancement, T2, and FLAIR modalities. The dynamic boundary frame is projected onto each modality to generate corresponding binary masks. The intersection-union (IU) algorithm is used to calculate the overlap ratio between modalities. For example, if the intersection of the T1 enhancement mask and the FLAIR mask is 4500 pixels and the union is 5200 pixels, the area intersection ratio is 0.865. Simultaneously, the nearest Euclidean distance from each point on the T1 enhancement contour to the FLAIR contour is calculated, and the average distance deviation of all points is statistically analyzed. For example, if the average deviation is measured to be 1.2 mm, this value is determined as the degree of boundary overlap. For each modality, pairwise combinations (T1c-T2, T1c-FLAIR, T2-FLAIR) are performed to generate multiple sets of morphological difference measurement data between sequences.
[0096] S412: Call the morphological difference measurement data between sequences, extract the area intersection ratio and boundary overlap, perform maximum and minimum value normalization on the two sets of parameters respectively to eliminate the difference in dimensions, set weight coefficients to perform weighted fusion on the normalized parameters, calculate the modal similarity score that represents the geometric similarity between modes, traverse all sequence combinations and fill the corresponding modal similarity scores into a two-dimensional array structure to construct the sequence morphological consistency matrix;
[0097] The process of calculating the comprehensive score representing the geometric similarity between modes is as follows: obtaining a first weight coefficient set for the area intersection ratio and a second weight coefficient set for the degree of boundary overlap; multiplying the normalized area intersection ratio with the first weight coefficient to obtain the area-weighted component; multiplying the normalized degree of boundary overlap with the second weight coefficient to obtain the boundary-weighted component; and performing a linear summation operation on the area-weighted component and the boundary-weighted component to generate the modal similarity score.
[0098] The specific method for setting the first weighting coefficient and the second weighting coefficient is as follows: based on the slice thickness data of the multi-sequence NMR image, calculate the inverse proportion of the slice thickness value of each sequence, use the inverse proportion as an indicator to measure spatial accuracy and map it to the second weighting coefficient, calculate the difference between the unit value and the second weighting coefficient based on the normalization constraint, and set the difference as the first weighting coefficient.
[0099] The system calls the morphological difference measurement data between sequences and performs maximum-minimum normalization on the area intersection ratio and boundary overlap degree. For the boundary overlap degree, since smaller values are better, inverse normalization is used, i.e., (maximum value - current value) / (maximum value - minimum value). The first weight coefficient is set to 0.6, and the second weight coefficient is set to 0.4. The weight settings are based on the following: the system reads the slice layer thickness data from the DICOM header file. The layer thickness of the T1 enhancement sequence is 1mm (reciprocal 1), and the layer thickness of the T2 sequence is 5mm (reciprocal 0.2). The reciprocal proportions are calculated: the T1 enhancement proportion is 1 / (1+0.2)=0.83, and the T2 proportion is 0.17. Since high-resolution sequence boundaries are more accurate, the second weight coefficient (boundary overlap weight) is positively correlated with spatial accuracy and set to 0.4 (the weight is appropriately lowered because the boundary is greatly affected by partial volume effect). Based on the normalization constraint (sum of 1), the first weight coefficient is calculated to be 0.6. The normalized area intersection ratio (e.g., 0.9) is multiplied by 0.6 to get 0.54, and the normalized boundary overlap degree (e.g., 0.85) is multiplied by 0.4 to get 0.34. The linear summation gives 0.88, which is the modal similarity score. All combinations are traversed, and the score is filled into a 3x3 symmetric matrix to construct the sequence morphological consistency matrix.
[0100] S413: Call the sequence morphological consistency matrix, use the preset confidence level threshold, perform numerical comparison between the modal similarity score in the matrix and the level threshold, and according to the comparison result, classify the sequence combination with the modal similarity score higher than the upper threshold as the high consistency layer, define the sequence combination with the score in the double threshold interval as the middle layer, and mark the sequence combination with the score lower than the lower threshold as the low response layer, integrate the hierarchical classification information, and generate the consistency partitioning result;
[0101] The process of obtaining the preset confidence level threshold is as follows: statistically analyze the numerical distribution of all similarity scores in the sequence morphological consistency matrix, calculate the global arithmetic mean and the overall standard deviation of the similarity scores, add the global arithmetic mean to the overall standard deviation by a preset multiple and establish the result as the upper threshold, and subtract the global arithmetic mean from the overall standard deviation by a preset multiple and establish the result as the lower threshold.
[0102] The similarity scores of all off-diagonal elements within the statistical matrix are set as {0.88, 0.75, 0.82}. The global arithmetic mean is calculated to be 0.816, the overall standard deviation is 0.054, and the preset multiplier is set to 1.0. The upper threshold is 0.816 + 0.054 = 0.87, and the lower threshold is 0.816 - 0.054 = 0.762. The scores are compared with the thresholds: the T1c-FLAIR combination score of 0.88 is higher than 0.87 and is classified as a high-consistency layer, representing a definite tumor core; the T1c-T2 combination score of 0.82 is between 0.762 and 0.87 and is defined as an intermediate layer, representing a potential invasive area; combinations with scores lower than 0.762 are marked as low-response layers. These classification information are integrated to generate a consistent classification result.
[0103] Please see Figure 6 The specific steps for obtaining tumor identification results are as follows:
[0104] S511: Based on the consistency partitioning results, lock the voxel set covered by the high consistency layer, define a sliding window including spatial neighborhood information, set the traversal step size parameter, perform sliding scan along the three dimensions of the voxel matrix, retrieve the pixel intensity values within the window coverage area, calculate the arithmetic mean of the local region intensity, replace the original grayscale data of the central voxel with the mean, perform mean-based update processing on the voxel set, and generate the intensity correction core region;
[0105] First, the voxel set covered by the high consistency layer (T1c-FLAIR intersection region) is locked. A 3x3x3 three-dimensional sliding window is defined, with a traversal step size of 1 voxel. The window scans along the three dimensions of the voxel matrix. At each window position, the intensity values of the 27 pixels it covers are retrieved, and the arithmetic mean of these 27 values is calculated. For example, if the center pixel value is 180, the neighborhood average is 185, and the original value 180 is replaced with 185. Through this mean sliding adjustment, salt-and-pepper noise and Gaussian noise in the high confidence region are eliminated, generating an intensity correction core region with a uniform intensity distribution.
[0106] S512: For the intermediate layer marked by the consistency division result, extract the discrete coordinate points of the structural edge contour, calculate the change in the tangent vector angle of adjacent point pairs on the contour, obtain the curvature parameters, perform discrete differential operation on the curvature parameters distributed along the contour path, determine the curvature change rate of the structural edge fitting, use the preset morphological change judgment threshold, perform numerical comparison between the curvature change rate of the structural edge fitting and the morphological change judgment threshold, screen out the morphologically unstable segments with values exceeding the limit, perform morphological closing operation and spline smoothing fitting according to the edge variation amplitude of the segment, reconstruct the geometric contour line, and generate the reshaped edge transition zone;
[0107] The specific process of setting the morphological mutation judgment threshold is as follows: select continuous edge segments in the high consistency layer as the reference morphological sample, count the curvature change rate of each point in the sample set, calculate the arithmetic mean and standard deviation of the sample curvature change rate, and determine the morphological mutation judgment threshold by summing the arithmetic mean and the standard deviation of the set multiple.
[0108] For the intermediate layer (i.e., the T1c-T2 difference zone), the discrete coordinate points of its structural edge contour are extracted, and the tangent vectors of adjacent point pairs on the contour are calculated. For example, if the tangent vector angle of point A is 30 degrees and that of point B is 32 degrees, and the distance is 1 pixel, then the angle change is 2 degrees, and the curvature is 2. The derivative of the curvature parameter is taken along the contour path to calculate the curvature change rate of the fitted structural edge. If the curvature change rate of a certain contour segment reaches 0.5 (indicating severe shape distortion), a preset morphological mutation judgment threshold is called for comparison. The threshold setting process is as follows: a smooth continuous edge segment within a highly consistent layer (such as the main boundary of the tumor) is selected as the benchmark, and its mean curvature change rate is 0.1, the standard deviation is 0.05, and the multiplier is set to 3, then the threshold is 0.25. Since 0.5 is greater than 0.25, the segment is determined to be a morphologically unstable segment (such as spurs caused by blood vessels or artifacts). Based on the amplitude of the edge variation of the segment (such as a protrusion height of 3 pixels), a morphological closing operation is performed. A spherical structuring element with a radius of 3 pixels is used to perform dilation and erosion operations. A cubic spline function is used to smooth the contour of the segment, reconstructing a smooth geometric contour line and generating a reshaped edge transition zone.
[0109] S513: Call the low response layer index data in the consistency partitioning result, construct the corresponding culling mask in the global image matrix and execute zeroing, take the intensity correction core area as the main structure of the lesion, take the reshaped edge transition zone as the external delineation contour, perform spatial region fusion through Boolean union operation, construct a continuous and closed three-dimensional lesion voxel model, count the number of voxels and spatial distribution range in the model, and generate tumor recognition results.
[0110] Low-response layer index data (such as simple distal edema or artifacts) is used to construct a corresponding binary culling mask in the global image matrix. The pixel values of this region are forcibly set to 0. The intensity-corrected core region updated by mean is used as the main structure of the lesion, and the reshaped edge transition zone after smooth fitting is used as the outer boundary contour of the lesion. Through Boolean union operation, the voxel set of the main structure and the voxel set of the edge transition zone are fused in three-dimensional space to construct a three-dimensional lesion voxel model that is internally uniform, edge-continuous and closed. The total number of non-zero voxels in this model is counted as 15420. Based on the voxel volume (1 cubic millimeter), the tumor volume is calculated to be 15.42 cubic centimeters. The coordinates of the minimum bounding rectangle of its spatial distribution range are calculated to generate the final tumor identification result. Experiments show that the similarity coefficient of this result with the gold standard (manual segmentation by doctors) reaches 0.91.
[0111] Table 2 Algorithm Performance Verification Data:
[0112] ;
[0113] As shown in Table 2, the method in this embodiment outperforms the control group in all key indicators, confirming the effectiveness of the technical solution.
[0114] A tumor detection and recognition system based on nuclear magnetic resonance (NMR) images, comprising the following components: (The system is used to implement the aforementioned tumor detection and recognition method based on NMR images.)
[0115] The candidate region identification module acquires multi-sequence MRI images, calculates the gradient vector angle difference within the sliding window, constructs a gradient direction stability matrix based on the gradient vector angle difference and performs stability scoring, and filters out candidate lesion regions.
[0116] The contour analysis module sets contour levels for candidate lesion areas, calculates the correspondence of boundary points and constructs a spatial projection displacement map, determines the gradient direction and position offset of boundary points, and obtains contour boundary analysis results.
[0117] The boundary framework construction module, based on the contour boundary analysis results, determines continuity according to the spatial projection displacement map, gradient direction and position offset, calculates the variation rate and eliminates abrupt change points, and constructs a dynamic boundary framework.
[0118] The consistency analysis module extracts regions based on a dynamic boundary framework, calculates boundary overlap and intersection ratio, constructs a sequence consistency matrix based on boundary overlap and intersection ratio, and divides the sequence consistency matrix into a high consistency layer, an intermediate layer and a low response layer to obtain the consistency partitioning result.
[0119] The recognition result processing module performs mean sliding adjustment on the high consistency layer based on the consistency division result, calculates the edge curvature change rate for the intermediate layer, uses the edge variation amount to reshape the region where the edge curvature change rate exceeds the preset morphological mutation judgment threshold, removes the low response layer, and generates tumor recognition results.
[0120] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A tumor detection and identification method based on nuclear magnetic resonance imaging, characterized in that, Includes the following steps: S1: Acquire multi-sequence MRI images, calculate the gradient vector angle difference within the sliding window, construct a gradient direction stability matrix based on the gradient vector angle difference and perform stability scoring, and filter out candidate lesion regions; S2: Set the isopleth level for the candidate lesion area, calculate the correspondence of boundary points and construct a spatial projection displacement map, determine the gradient direction and position offset of the boundary points, and obtain the isopleth boundary analysis results. S3: Based on the contour boundary analysis results, the continuity is determined according to the spatial projection displacement map, gradient direction and position offset, the variation rate is calculated and abrupt points are excluded, and a dynamic boundary framework is constructed. The specific steps for obtaining the dynamic boundary frame are as follows: S311: Based on the contour boundary analysis results, extract the signal gradient direction and position offset, calculate the cosine similarity of the gradient vectors of corresponding points in adjacent slices, combine the position offset modulus to quantify the continuity of local structure, perform second-order difference operation on the spatial coordinates of boundary points within a sliding window covering three consecutive slices, evaluate the smoothness of the lesion contour interlayer trajectory, and generate the boundary variation rate of three consecutive slices. S312: Call the continuous three slice boundary variation rate, obtain the preset structural mutation judgment threshold, compare the variation rate value of each boundary point with the structural mutation judgment threshold, determine the points that exceed the structural mutation judgment threshold as abnormal mutation points, mark the abnormal mutation points as artifact interference areas and remove them from the point set, filter and retain the remaining pixels, and generate a set of filtered valid boundary points. S313: Call the filtered set of valid boundary points, perform three-dimensional spatial interpolation on the discretely distributed valid points, fill the gaps between slice layers, establish the topological connection relationship between adjacent layer boundary points, fit and generate a continuous geometric surface model that represents the three-dimensional morphology of the lesion, map the vertex data of the geometric surface model back to the original image coordinate system, form a closed contour, and construct a dynamic boundary framework. S4: Extract regions based on the dynamic boundary framework, calculate boundary overlap and intersection ratio, construct a sequence consistency matrix based on boundary overlap and intersection ratio, divide the sequence consistency matrix into a high consistency layer, an intermediate layer and a low response layer, and obtain the consistency partitioning result; S5: Based on the consistency division results, the mean sliding adjustment is performed on the high consistency layer, the edge curvature change rate is calculated for the intermediate layer, the edge curvature change rate is reshaped using the edge variation amount, the region where the edge curvature change rate exceeds the preset morphological mutation judgment threshold is removed, the low response layer is eliminated, and the tumor identification result is generated.
2. The tumor detection and identification method based on MRI images according to claim 1, characterized in that, The candidate lesion region includes a high gradient response pixel index, a regional connectivity mask, and local texture distribution features. The contour boundary analysis results include horizontal relative displacement, vertical relative displacement, and spatial Euclidean distance deviation. The dynamic boundary framework includes the spatial coordinates of effective boundary points, interlayer connectivity topology, and three-dimensional fitted surface parameters. The consistency partitioning results include a high-confidence core pixel set, a morphological edge transition zone, and an irrelevant noise interference area. The tumor identification results include a fine contour map of the lesion, a tumor volume quantification index, and a spatial location confidence map.
3. The tumor detection and identification method based on MRI images according to claim 1, characterized in that, The specific steps for obtaining the candidate lesion region are as follows: S111: Acquire multi-sequence NMR images, extract gradient features for pixels within a preset sliding window area, detect the gradient vector angle difference between any two pairs of pixels, and construct a gradient direction stability matrix based on the distribution data of the gradient vector angle difference in multiple discrete directions. S112: Call the gradient direction stability matrix, perform eigenvalue decomposition to determine anisotropy indices, obtain the normalized background signal fluctuation amplitude, gradient coherence factor, angular divergence coefficient, and Frobenius norm of the gradient direction stability matrix within a set window, construct a feature space comprehensive modulus based on the normalized background signal fluctuation amplitude and the Frobenius norm of the gradient direction stability matrix, and perform amplitude modulation on the Frobenius norm of the gradient direction stability matrix using anisotropy indices, perform normalization mapping on it based on the feature space comprehensive modulus, extract the basic feature response components, perform weighted transformation on the normalized background signal fluctuation amplitude through the angular divergence coefficient, and calculate the relative ratio feature to quantify the local divergence fluctuation effect in combination with the Frobenius norm of the gradient direction stability matrix, calculate the absolute difference deviation between the gradient coherence factor and the local divergence fluctuation effect, generate a coherence deviation compensation component, perform spatial compensation superposition and fusion processing on the basic feature response component and the coherence deviation compensation component, and calculate and obtain a stability score that characterizes the local structural distribution features of the image region. S113: Call the stability score, call the preset average tissue background stability level to filter the stability score, mark the area with the stability score less than the average tissue background stability level as a pseudo-strong response area and perform suppression elimination to generate candidate lesion areas.
4. The tumor detection and identification method based on MRI images according to claim 3, characterized in that, The specific steps for obtaining the contour line boundary analysis results are as follows: S211: For the pixel intensity distribution range in the candidate lesion area, set multiple iso-levels, traverse each iso-level and perform edge detection in the current slice image, extract the iso-signal intensity pixels corresponding to each level, aggregate discrete pixels into continuous contours according to the neighborhood connectivity criterion, record the two-dimensional coordinate data of pixels on the contours, and generate a multi-level iso-line boundary point set. S212: Call the multi-level contour line boundary point set, perform nearest neighbor search in the corresponding spatial neighborhood of adjacent continuous slice images, determine the matching point that has spatial association with the current slice boundary point based on the Euclidean distance minimization principle, establish a cross-slice point-to-point mapping index, calculate the vector difference between the projection coordinates of the current boundary point on the adjacent slice plane and the actual matching point coordinates based on the mapping index, and construct a spatial projection displacement map. S213: Based on the spatial projection displacement map, analyze the geometric position difference of corresponding boundary points between adjacent slices, calculate the coordinate difference in the horizontal and vertical directions respectively, obtain the position offset, calculate the rate of change of pixel gray value along the slice layer normal vector direction for the associated point pair corresponding to the position offset, determine the signal gradient direction, integrate the data entries of position offset and signal gradient direction, and generate contour boundary analysis results.
5. The tumor detection and identification method based on MRI images according to claim 4, characterized in that, The specific steps for obtaining the consistent partitioning result are as follows: S411: Based on the ROI range defined by the dynamic boundary framework, the corresponding anatomical structure region is extracted from each modal data of the multi-sequence MRI images. The intersection-union algorithm is used to calculate the overlap ratio between any two modal regions to determine the area intersection ratio. At the same time, the average distance deviation of the corresponding contour point set in Euclidean space is calculated to determine the degree of boundary overlap and generate morphological difference measurement data between sequences. S412: Call the morphological difference measurement data between sequences, extract the area intersection ratio and boundary overlap, perform maximum and minimum value normalization on the two sets of parameters respectively to eliminate the difference in dimensions, set weight coefficients to perform weighted fusion on the normalized parameters, calculate the modal similarity score that represents the geometric similarity between modes, traverse all sequence combinations and fill the corresponding modal similarity scores into a two-dimensional array structure to construct a sequence morphological consistency matrix; S413: Invoke the sequence morphological consistency matrix, use the preset confidence level threshold to perform a numerical comparison between the modal similarity score in the matrix and the level threshold, and classify the sequence combination with the modal similarity score higher than the upper threshold into a high consistency layer according to the comparison result, define the sequence combination with the score in the double threshold interval as the middle layer, and mark the sequence combination with the score lower than the lower threshold as the low response layer, integrate the hierarchical classification information, and generate a consistency partitioning result.
6. The tumor detection and identification method based on MRI images according to claim 5, characterized in that, The specific steps for obtaining the tumor identification results are as follows: S511: Based on the consistency partitioning result, lock the voxel set covered by the high consistency layer, define a sliding window including spatial neighborhood information, set the traversal step size parameter, perform a sliding scan along the three dimensions of the voxel matrix, retrieve the pixel intensity values within the window coverage area, calculate the arithmetic mean of the local region intensity, replace the original grayscale data of the central voxel with the mean value, perform mean value update processing on the voxel set to generate the intensity correction core region; S512: For the intermediate layer marked by the consistency division result, extract the discrete coordinate points of the structural edge contour, calculate the change in the tangent vector angle of adjacent point pairs on the contour, obtain the curvature parameter, perform discrete differential operation on the curvature parameter distributed along the contour path, determine the curvature change rate of the structural edge fitting, use the preset morphological change judgment threshold, perform numerical comparison between the curvature change rate of the structural edge fitting and the morphological change judgment threshold, screen out the morphologically unstable segments with values exceeding the limit, perform morphological closing operation and spline smoothing fitting according to the edge variation amplitude of the segment, reconstruct the geometric contour line, and generate the reshaped edge transition zone; S513: Call the low response layer index data in the consistency partitioning result, construct the corresponding culling mask in the global image matrix and execute zeroing, take the intensity correction core area as the main structure of the lesion, take the reshaped edge transition zone as the external defining contour, perform spatial region fusion through Boolean union operation, construct a continuous and closed three-dimensional lesion voxel model, count the number of voxels and spatial distribution range in the model, and generate tumor recognition results.
7. A tumor detection and recognition system based on nuclear magnetic resonance imaging, characterized in that, The system is used to implement the tumor detection and identification method based on nuclear magnetic resonance images as described in any one of claims 1-6, and the system comprises: The candidate region identification module acquires multi-sequence MRI images, calculates the gradient vector angle difference within the sliding window, constructs a gradient direction stability matrix based on the gradient vector angle difference and performs stability scoring, and filters out candidate lesion regions. The contour analysis module sets contour levels for the candidate lesion area, calculates the correspondence of boundary points and constructs a spatial projection displacement map, determines the gradient direction and position offset of the boundary points, and obtains the contour boundary analysis results. The boundary framework construction module, based on the contour boundary analysis results, determines continuity according to the spatial projection displacement map, gradient direction and position offset, calculates the variation rate and eliminates abrupt change points, and constructs a dynamic boundary framework. The consistency analysis module extracts regions based on the dynamic boundary framework, calculates the boundary overlap and intersection ratio, constructs a sequence consistency matrix based on the boundary overlap and intersection ratio, and divides the sequence consistency matrix into a high consistency layer, an intermediate layer and a low response layer to obtain the consistency partitioning result. The identification result processing module, based on the consistency division result, performs mean sliding adjustment on the high consistency layer, calculates the edge curvature change rate for the intermediate layer, uses the edge variation amount to reshape the region where the edge curvature change rate exceeds the preset morphological mutation judgment threshold, removes the low response layer, and generates tumor identification results.