A brain metastasis tumor three-dimensional volume measurement method, system, terminal and medium
Patent Information
- Application Number
- CN202611509161.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-10-30
AI Technical Summary
[0002]临床上脑转移瘤的体积测量主要依赖以下三种方式:基于RECIST或RANO-BM标准的二维径线测量,其缺陷在于脑转移瘤形态多不规则,二维测量结果与真实三维体积之间缺乏可靠的相关性,无法准确反映肿瘤的真实体积;影像科医师手工逐层勾画,其缺陷在于处理一例多发转移患者通常耗时较长,且不同医师之间、同一医师不同次操作之间的勾画结果存在显著的主观差异,可重复性差,难以满足临床高通量精准测量的需求;基于深度学习的自动分割方法,其缺陷在于依赖大量高质量的人工标注训练数据,模型泛化性受限于训练集分布,在不同MRI设备、不同扫描参数下的表现不稳定,且部署需要高性能GPU硬件支持,临床落地困难
通过增强对比度指数计算、动态阈值确定、双重判据三维区域生长及灰度统计分区等进行图像处理,仅需单序列T1WI增强图像,实现从原始图像到肿瘤三维体积测量的自动化,提高测量效率和精度;同时,在区域生长过程中同时采用对比度指数约束和局部背景灰度约束作为双重停止判据,使分割区域被有效约束于肿瘤实体范围内,防止其向水肿区或正常脑实质溢出,保证测量的准确性;另外,基于肿瘤区域内部灰度分布的统计特征,将灰度低于的连通域自动标记为坏死/囊变区并计算其体积,方便获得活性区与坏死区各自的体积数据及坏死占比,实现量化评估;再者无需依赖任何人工神经网络或深度学习模型,无需训练数据和GPU硬件支持,易于实施。
Smart Images

Figure CN123015650A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and specifically to a method, system, terminal, and medium for measuring the three-dimensional volume of brain metastases. Background Technology
[0002] Clinically, the volume measurement of brain metastases mainly relies on the following three methods: two-dimensional diameter measurement based on RECIST or RANO-BM standards. The drawback is that brain metastases are often irregular in shape, and there is no reliable correlation between the two-dimensional measurement results and the true three-dimensional volume, which cannot accurately reflect the true volume of the tumor; manual delineation by radiologists layer by layer. The drawback is that processing a patient with multiple metastases is usually time-consuming, and there are significant subjective differences in the delineation results between different doctors and between different operations by the same doctor, resulting in poor repeatability and difficulty in meeting the needs of high-throughput and accurate measurement in clinical practice; and automatic segmentation methods based on deep learning. The drawback is that they rely on a large amount of high-quality manually labeled training data, the generalization ability of the model is limited by the distribution of the training set, the performance is unstable under different MRI equipment and different scanning parameters, and deployment requires high-performance GPU hardware support, making clinical implementation difficult. Summary of the Invention
[0003] To address the aforementioned issues, this invention provides a method, system, terminal, and medium for three-dimensional volume measurement of brain metastases, which improves the efficiency and accuracy of three-dimensional volume measurement, enables quantitative assessment of active and necrotic areas, and is easy to implement.
[0004] In a first aspect, the technical solution of the present invention provides a method for measuring the three-dimensional volume of brain metastases, comprising the following steps: S1, obtain the preprocessed T1WI enhanced sequence, normalize the image grayscale and extract the brain parenchyma mask; S2, within the brain parenchyma mask, calculate the local robust statistics within the three-dimensional neighborhood window for each voxel, calculate the enhanced contrast index based on the local robust statistics, and determine the final segmentation threshold using a dynamic hierarchical thresholding strategy based on the histogram distribution of the enhanced contrast index. S3, using voxel connected regions that are higher than the preset multiple of the final segmentation threshold as seed points, three-dimensional region growth is performed starting from each seed point. The growth stopping criteria include: the enhanced contrast index of the target voxel is not lower than the set multiple of the final segmentation threshold, and the normalized gray level of the target voxel is not lower than the average gray level of the background voxels in its neighborhood window. The grown region is post-processed morphologically to obtain a tumor segmentation mask. S4, within the tumor segmentation mask, calculate the overall gray-scale mean of the tumor region. and grayscale standard deviation , grayscale lower than Connected regions are labeled as necrotic / cystic areas, and the rest are labeled as areas of enhanced activity. The volumes of the active and necrotic areas are calculated separately and summed to obtain the total tumor volume; where, the partition sensitivity coefficient is... Automatically adjusts based on the degree of skewness in the overall grayscale distribution of the tumor region.
[0005] Secondly, the technical solution of the present invention provides a three-dimensional volume measurement system for brain metastases, comprising: The data preprocessing module is used to acquire preprocessed T1WI enhanced sequences, perform grayscale normalization on the images, and extract brain parenchyma masks. The contrast index calculation module is used to calculate the local robust statistics within the three-dimensional neighborhood window for each voxel within the brain parenchyma mask area, calculate the enhanced contrast index based on the local robust statistics, and determine the final segmentation threshold using a dynamic hierarchical thresholding strategy based on the histogram distribution of the enhanced contrast index. The 3D region growth module is used to grow 3D regions starting from each seed point, using voxel connected regions that are higher than a preset multiple of the final segmentation threshold as seed points. The growth stopping criteria include: the enhanced contrast index of the target voxel is not lower than a set multiple of the final segmentation threshold, and the normalized gray level of the target voxel is not lower than the average gray level of the background voxels in its neighborhood window. The grown region is post-processed morphologically to obtain a tumor segmentation mask. The volume calculation module is used to calculate the overall gray-scale mean of the tumor region within the tumor segmentation mask. and grayscale standard deviation , grayscale lower than Connected regions are labeled as necrotic / cystic areas, and the rest are labeled as areas of enhanced activity. The volumes of the active and necrotic areas are calculated separately and summed to obtain the total tumor volume. The partition sensitivity coefficient γ is automatically adjusted according to the degree of skewness of the overall gray-scale distribution of the tumor region.
[0006] Thirdly, the technical solution of the present invention provides a terminal, including: Memory, used to store the program for measuring the three-dimensional volume of brain metastases; A processor is configured to implement the steps of the three-dimensional volume measurement method for brain metastases as described above when executing the three-dimensional volume measurement program for brain metastases.
[0007] Fourthly, the present invention provides a computer-readable storage medium storing a three-dimensional volume measurement program for brain metastases, wherein the three-dimensional volume measurement program for brain metastases, when executed by a processor, implements the steps of the three-dimensional volume measurement method for brain metastases as described in any of the above claims.
[0008] As can be seen from the above technical solutions, this application has the following advantages: Image processing employs techniques such as enhanced contrast index calculation, dynamic threshold determination, dual-criteria 3D region growing, and gray-level statistical partitioning. This automates the process from raw image to 3D tumor volume measurement using only a single-sequence T1WI enhanced image, improving measurement efficiency and accuracy. Simultaneously, during region growing, both contrast index constraints and local background gray-level constraints are used as dual stopping criteria, effectively confining the segmented region within the tumor solid area and preventing it from spilling over into edematous areas or normal brain parenchyma, thus ensuring measurement accuracy. Furthermore, based on the statistical characteristics of gray-level distribution within the tumor region, regions with gray levels lower than [a certain value] are [partitioned / partitioned]. The connected regions are automatically labeled as necrotic / cystic regions and their volumes are calculated, making it easy to obtain the volume data and necrosis ratio of the active and necrotic regions, and to achieve quantitative evaluation. Furthermore, it does not rely on any artificial neural network or deep learning model, and requires no training data or GPU hardware support, making it easy to implement. Attached Figure Description
[0009] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic flowchart of a method for measuring the three-dimensional volume of brain metastases, provided in an embodiment of the present invention.
[0011] Figure 2 Example image of a raw T1WI enhanced DICOM image.
[0012] Figure 3 This is a schematic diagram showing the effect after extracting the brain parenchyma using a mask.
[0013] Figure 4 This is a schematic diagram illustrating the effect of a tumor segmentation mask.
[0014] Figure 5 This is a schematic block diagram of a three-dimensional volume measurement system for brain metastases provided in an embodiment of the present invention.
[0015] Figure 6 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Detailed Implementation
[0016] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0017] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The various terms used in this specification are merely for describing specific embodiments and do not constitute a limitation thereof.
[0018] Figure 1 This is a schematic flowchart of a method for measuring the three-dimensional volume of brain metastases, provided in an embodiment of the present invention. Figure 1 The executing entity can be a three-dimensional volume measurement system for brain metastases. The three-dimensional volume measurement method for brain metastases provided in this embodiment of the invention is executed by a computer device, and correspondingly, the three-dimensional volume measurement system for brain metastases runs on the computer device. Depending on different requirements, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0019] like Figure 1 As shown, the method includes the following steps.
[0020] S1: Obtain the preprocessed T1WI enhanced sequence, normalize the image to grayscale, and extract the brain parenchyma mask.
[0021] This step converts the original DICOM format T1WI enhanced sequences into standardized three-dimensional grayscale data and extracts the spatial extent of the brain parenchyma as a constraint region for all subsequent processing, eliminating interference from irrelevant information and reducing computational complexity. Figure 2 The image shown is an example of a raw T1WI-enhanced DICOM image.
[0022] S1.1 Read the T1WI enhancement sequence in DICOM format and extract the layer thickness, pixel spacing, image matrix size, and image orientation parameters.
[0023] Read the T1WI enhanced sequence in DICOM format and extract the following key scan parameters from the DICOM header file: Slice Thickness. Pixel Spacing and The system reads the image matrix size (Rows×Columns), image orientation, and patient orientation labels. Simultaneously, it reads the rescale slope and rescale intercept labels of the image pixels, converting the raw pixel values into signal intensity values with physical dimensions.
[0024] S1.2, perform percentile gray-level normalization on the T1WI enhanced sequence, including statistical gray-level histograms within the whole brain image range, mapping the 5th percentile to 0 and the 95th percentile to 255, and mapping all voxel gray levels to the [0,255] interval in a linear relationship.
[0025] This step performs percentile grayscale normalization on all voxels within the whole-brain image range to eliminate the influence of the lack of uniform physical dimensions and distribution range of the original grayscale values of images from different MRI scanning devices and under different scanning parameters.
[0026] First, a gray-level histogram is plotted across the entire brain image, and the 5th percentile P5 and 95th percentile P6 of all voxel gray-level values are calculated. 95 The grayscale values of all pixels in the image are linearly mapped to the [0, 255] range according to the following formula:
[0027] in, The original grayscale value. This is the normalized grayscale value.
[0028] S1.3 performs anisotropic diffusion filtering on the normalized image to preserve edges and smooth it.
[0029] For the normalized image Anisotropic diffusion filtering is performed for edge-preserving smoothing. The Perona-Malik anisotropic diffusion equation is used, with the diffusion coefficient as follows:
[0030] The gradient threshold k is taken as the 90th percentile of the gradient magnitude of the entire image, so that the diffusion process is sufficiently smoothed in flat areas (gradient magnitude less than k) to reduce image noise, and diffusion is suppressed in boundary areas (gradient magnitude greater than k) to preserve the edge information of brain tissue and skull.
[0031] S1.4, perform Otsu thresholding on the filtered image to extract the brain parenchyma mask.
[0032] The filtered image was segmented using a dual-threshold Otsu method, dividing the image pixels into three categories based on grayscale values: background layer, brain parenchyma layer, and cerebrospinal fluid layer. A binary mask corresponding to the brain parenchyma layer was extracted as the initial brain region. The initial brain region was then subjected to a series of operations: three-dimensional morphological opening to sever the connection between the brain parenchyma and the skull, extraction of the largest connected component, and three-dimensional morphological closing to fill the small gaps in the sulci and gyri, resulting in the brain parenchyma mask. .like Figure 3 The image shown is a schematic diagram illustrating the effect after extracting the brain parenchyma mask.
[0033] S2, within the brain parenchyma mask, calculates the local robust statistics within the three-dimensional neighborhood window for each voxel, calculates the enhanced contrast index based on the local robust statistics, and uses a dynamic hierarchical thresholding strategy based on the histogram distribution of the enhanced contrast index to determine the final segmentation threshold.
[0034] Within the spatial constraints of the brain parenchyma mask, this step calculates the enhancement contrast index of each voxel, i.e. the enhancement significance of the voxel relative to its local neighborhood, and adaptively determines the segmentation threshold to distinguish enhanced tumors from normal brain parenchyma based on the distribution pattern of the enhancement contrast indices of all voxels.
[0035] S2.1, using the brain parenchyma mask as the spatial constraint range, traverse each voxel within the mask, and construct a three-dimensional neighborhood window W with the current voxel as the center.
[0036] The window radius is adaptively determined based on the image resolution in both the intra-layer and inter-layer directions. Specifically, the intra-layer radius... Interlayer radius In the formula, The geometric mean of the pixel spacing. For reference spatial resolution.
[0037] The size of window W is This ensures that the window size in physical space remains consistent across different scanning resolutions, so that the spatial statistical scale of the algorithm does not change with image resolution.
[0038] S2.2, Calculate the local weighted median within the current voxel neighborhood window. In the formula, Let be the weighting coefficient of the i-th voxel. Let be the normalized gray value of the i-th voxel within the window.
[0039] The local weighted median means finding a gray value m within a neighborhood window W that minimizes the sum of the weighted absolute deviations of all voxels within the window. This value m is the local weighted median. In this embodiment, the weighted median is determined by weighting coefficients. Characterizing the different contributions of each voxel makes voxels more similar to the central voxel have a greater role in determining the median.
[0040] Weighting coefficient Determined based on the spatial distance and gray-level similarity between the current voxel and its neighboring voxels, and represented as:
[0041] In the formula, Spatial weights, Let be the spatial Euclidean distance from the i-th neighboring voxel to the center of the window. This refers to the spatial bandwidth parameter; For grayscale weights, This refers to the grayscale bandwidth parameter.
[0042] Spatial weight Voxels closer to the center of the window are more representative of the local background of the central voxel and have higher weights; voxels farther away may belong to different anatomical structures and have lower weights. Spatial weights decay Gaussianly. The decay rate is controlled; the larger the value, the greater the contribution of distant voxels.
[0043] Grayscale weight Voxels whose gray levels are closer to the central voxel are more likely to belong to the same tissue type and therefore have higher weights; voxels with large gray level differences have lower weights. Gray level weights also exhibit Gaussian decay. The tolerance for grayscale differences is controlled; the larger the value, the smaller the penalty for grayscale differences.
[0044] In this embodiment, voxels that are spatially adjacent and have similar gray levels have high weights, while voxels that are spatially adjacent but have large gray level differences have their weights automatically reduced. Voxels with similar gray levels but are spatially distant also have their weights reduced. This results in a locally weighted median. It can accurately reflect the typical gray level of the local tissue where the central voxel is located, while eliminating the interference of cross-boundary voxels on the statistics, thus improving the accuracy of subsequent calculation of the contrast enhancement index.
[0045] S2.3, Calculate the absolute deviation of the local median within the current voxel neighborhood window. In the formula, c is the consistency constant.
[0046] S2.3, Calculate the contrast enhancement index In the formula, The normalized gray value of the central voxel. To prevent the removal of the zero constant.
[0047] Enhanced contrast index It reflects the degree of deviation of the current voxel gray level from the local weighted median, and normalizes it with the absolute deviation of the median to eliminate the influence of device signal drift and gain difference.
[0048] S2.4 After traversing all voxels within the brain parenchyma mask area, calculate the mean of all enhanced contrast indices C. and standard deviation Then calculate the initial threshold. In the formula These are adaptive coefficients.
[0049] For example, The value is 2.5. Corresponding to the quantile of approximately 99.4% cumulative probability in the normal distribution, it is able to separate the enhanced voxels at the high end of the distribution from the main body. The value can be adjusted according to the overall enhancement level of the image. When the tumor enhancement effect is significant, a smaller value should be used to reduce the risk of missed detection; when the image noise is large or the enhancement effect is weak, a larger value should be used to reduce false positives.
[0050] S2.5, with As the final segmentation threshold, where This is an adjustable coefficient.
[0051] The value range can be 0.85 to 1.15, and it is used for... Make fine adjustments to accommodate individual differences.
[0052] S3, using voxel connected regions that are higher than the preset multiple of the final segmentation threshold as seed points, three-dimensional region growth is performed starting from each seed point. The growth stopping criteria include: the enhanced contrast index of the target voxel is not lower than the set multiple of the final segmentation threshold, and the normalized gray level of the target voxel is not lower than the average gray level of the background voxels in its neighborhood window. The grown region is post-processed morphologically to obtain a tumor segmentation mask.
[0053] This step uses the final segmentation threshold determined in step S2. Based on this, seed points are automatically selected, and precise segmentation of the tumor region is obtained through three-dimensional region growth. Finally, the tumor segmentation mask is obtained through morphological post-processing.
[0054] S3.1, using the final segmentation threshold Based on this, all contrast enhancement indices C within the brain parenchyma mask area are selected that satisfy... The voxels constitute the candidate seed set, in which This is the seed point selection coefficient.
[0055] This step selects voxels with significant enhancement effects within the brain parenchyma mask as seed point candidates. The enhancement effect in the tumor core region is the most stable and reliable, and regional growth starting from this region can obtain more accurate segmentation results. If starting from the edge region, the growth direction may deviate due to unstable edge enhancement or partial volume effect.
[0056] S3.2, Perform three-dimensional connected component labeling on the candidate seed set to obtain several three-dimensional connected components, the size of each connected component being the number of voxels it contains; remove voxels whose number is less than a preset minimum voxel threshold. Connected components, retaining a voxel number greater than or equal to Connected components are used as candidate seed clusters.
[0057] Voxels in the candidate seed set may be spatially clustered, meaning that the enhancing core region of the same tumor consists of multiple adjacent voxels forming a connected cluster, while the enhancing core regions of different tumors are separated to form different connected clusters. Three-dimensional connected domain labeling is used to group spatially adjacent (26-neighbor contact) voxels into the same connected domain, so that each connected domain corresponds to an independent candidate lesion core region.
[0058] S3.3 Sort the remaining candidate seed clusters by the number of voxels from most to least, and retain the top N largest connected components as the final seed clusters.
[0059] After screening in S3.2, candidate seed clusters may contain multiple connected regions corresponding to different enhancement regions. The larger the voxel number of a connected region, the more significant the corresponding enhancement region, and the more likely it is to be the core of a true metastatic lesion; connected regions with smaller voxel numbers may correspond to structures such as micro-enhancing lesions or vascular cross-sections, and are truncated later in the list.
[0060] S3.4 Starting from each final seed cluster, perform a region growth operation in three-dimensional space. The growth range is the connected domain where the seed cluster is located, expanding outward layer by layer. Each expansion checks all unlabeled neighborhood voxels in the three-dimensional 26-neighborhood of the current seed cluster boundary voxel.
[0061] Region growing is an image segmentation method based on seed points. In this step, each final seed cluster serves as an independent starting point for growth, and all voxels in its connected domain constitute the initial growth region. The growth process adopts a layer-by-layer expansion approach: in each iteration, voxels on the boundary of the current growth region are selected, and all voxels within their 26-dimensional neighborhood are checked. Neighboring voxels that meet the growth criteria are included in the growth region. The included voxels become the new boundary voxels, and the process continues to expand outward in the next iteration until no new voxels meet the criteria.
[0062] S3.5, for each neighboring voxel being examined, determine whether it simultaneously meets the following two stopping criteria: 1) Enhance contrast index constraint ,in The boundary tolerance coefficient is the index of the enhanced contrast of the neighboring voxels. If the value is below this threshold, the voxel is determined not to belong to the tumor region, and its expansion in that direction is stopped.
[0063] 2) Local background grayscale constraint ,in The average gray level of the background voxels within the neighborhood voxel window is defined as the contrast enhancement index C within the neighborhood voxel window being less than [value missing]. voxels, The background determination coefficient; if the normalized gray level of the neighboring voxels Below If the voxel is found to be in an edematous area or normal brain parenchyma, its expansion in that direction will cease.
[0064] S3.6, only when the neighboring voxel satisfies both criterion 1) and criterion 2) is the voxel included in the tumor segmentation region and it continues to expand outward as a new growth boundary voxel.
[0065] Criterion 1) Ensure that the included voxels have tumor-enhancing contrast characteristics. For example, The value is 0.85, meaning that the contrast enhancement index also needs to reach the final segmentation threshold. 85%, this threshold is lower than the seed point screening condition. This allows for the inclusion of growth in marginal areas with more lenient criteria, enabling the segmentation boundaries to extend smoothly to the tumor margin.
[0066] Criterion 2) Prevent the segmented region from spilling into the low-enhancement edema area or normal brain parenchyma. Within the neighborhood window W of the current voxel, select all voxels with a contrast enhancement index C lower than [value missing]. Voxels, i.e., voxels that differ significantly from the enhancement characteristics of tumors, are used to calculate the normalized average gray value of these voxels. This average gray value characterizes the gray level of the local non-enhancing background. If the normalized gray value of a candidate voxel is not lower than this background level, it indicates that its gray level is higher than that of the local non-enhancing tissue, which is consistent with the characteristics of an enhancing tumor; if it is lower than this background level, it indicates that its gray level is comparable to that of edema or normal brain parenchyma, and it should be excluded.
[0067] Criterion 1) Based on the contrast enhancement index, the segmented voxels are ensured to conform to the enhancement characteristics of the tumor. Criterion 2) Based on the original grayscale, the segmented region is prevented from spilling over into edematous areas or normal brain parenchyma. The former is a positive selection, meaning only voxels that conform to the enhancement characteristics are included; the latter is a negative constraint, meaning voxels with a grayscale lower than the background level are excluded. Together, they constitute a constraint on the tumor boundary: only voxels with sufficient contrast enhancement and a grayscale level not lower than the local background level can be included in the tumor region. This ensures that the segmented region neither misses enhancement edges nor spreads into edematous areas, thus guaranteeing the spatial accuracy of the segmentation boundary.
[0068] S3.7, Repeat steps S3.4 to S3.6 until there are no more voxels in the 26-neighborhood of all growth boundaries that simultaneously satisfy criterion 1) and criterion 2), at which point growth stops. The growth range is masked by the brain parenchyma. The tumor segmentation mask is automatically stopped when it encounters the boundary of the brain parenchyma mask, thus obtaining the final tumor segmentation mask. .
[0069] In each iteration, the system checks the 26 neighborhoods of all current growth boundary voxels, includes neighborhood voxels that meet the dual criteria into the tumor region and updates the growth boundary; the next iteration continues to expand with the newly included voxels as the boundary.
[0070] Region growth iteration terminates when one of the following two conditions is met: (1) When no new voxels are included in the tumor region in a certain iteration, growth naturally converges, which corresponds to the complete closure of the tumor boundary; (2) When the growth boundary touches the brain parenchyma mask. When the tumor reaches the boundary, growth in that direction stops due to the restriction of the mask. This situation corresponds to the tumor being adjacent to the skull or sulci, and requires forced truncation by the mask boundary to prevent spread to non-brain tissue areas.
[0071] After the iteration terminates, the tumor segmentation mask is obtained. This is used for grayscale statistics and dead zone identification in subsequent step S4. For example... Figure 4 The image shows a schematic diagram of the tumor segmentation mask effect.
[0072] S4, within the tumor segmentation mask, calculate the overall gray-scale mean of the tumor region. and grayscale standard deviation , grayscale lower than Connected regions are labeled as necrotic / cystic areas, and the rest are labeled as areas of enhanced activity. The volumes of the active and necrotic areas are calculated separately and summed to obtain the total tumor volume; where, the partition sensitivity coefficient is... Automatically adjusts based on the degree of skewness in the overall grayscale distribution of the tumor region.
[0073] The tumor segmentation mask obtained in step S3 is used in this step. Internally, based on the statistical characteristics of grayscale distribution, the active enhancement zone and the necrotic / cystic degeneration zone are automatically distinguished, and the volume of each part is calculated separately.
[0074] S4.1, Obtain the tumor segmentation mask Normalized gray values of all voxels Calculate the overall grayscale mean of the tumor region. and grayscale standard deviation .
[0075] S4.2, with Threshold for segmenting necrotic / cystic regions ,Will All within satisfy Voxels were labeled as candidate voxels for necrosis / cystic degeneration, while the remaining voxels were labeled as candidate voxels for activity. This represents the partition sensitivity coefficient.
[0076] On T1WI contrast-enhanced images with gadolinium injection, the active enhancement area shows a high signal due to the accumulation of contrast agent, while the necrotic / cystic area shows a low signal due to the lack of blood supply and the inability of contrast agent to enter. In terms of grayscale distribution, the two belong to the high-value end and the low-value end, respectively. As a statistical quantile threshold This corresponds to a position in a normal distribution that is one standard deviation below the mean, representing a cumulative probability of approximately 16%. It signifies the low tail of gray values that significantly deviate from the mean, and serves as the statistical boundary between the necrotic / cystic area (low signal anomaly) and the active area (normal enhanced signal).
[0077] In this embodiment, the partition sensitivity coefficient The system automatically adjusts based on the skewness of the overall grayscale distribution of the tumor region to adapt to the differences in the distribution of necrotic / cystic areas and active areas under different enhancement modes. Specifically, this includes: Calculate the gray-level distribution skewness coefficient of the tumor region ; like If it is characterized as a positively skewed state, then Take 1.2; if If it is characterized as a negatively skewed state, then Take 0.8; otherwise Use the default value of 1.
[0078] Skewness coefficient This reflects the degree of asymmetry in the grayscale distribution: This indicates that there is a long tail on the left side of the distribution (low grayscale end), meaning that there are many low grayscale voxels. This indicates that there is a long tail on the right side of the distribution (the high grayscale end). The specific adjustment rule is: if The positive skewness indicates that there are more low-gray-level voxels than expected from a normal distribution. If we still use... This could lead to too many voxels being misdiagnosed as necrosis, so the value was increased to 1.2 to reduce sensitivity; if The negative skewness indicates that there are fewer low-gray-level voxels than expected under a normal distribution. If we still use... This could lead to incomplete identification of necrotic areas, so the value was reduced to 0.8 to improve sensitivity; otherwise... Use the default value of 1.0.
[0079] S4.3 Perform three-dimensional connected component labeling on candidate voxels of necrosis / cystic degeneration to obtain several candidate connected components of necrosis / cystic degeneration.
[0080] Specifically, the three-dimensional connected domain labeling merges adjacent candidate voxels within 26 neighborhoods into the same connected domain, with each connected domain corresponding to an independent necrosis / cystic degeneration candidate region.
[0081] S4.4, For each candidate connected region of necrosis / cystic degeneration, calculate its voxel count. and its internal gray standard deviation ,like or If the connected region is removed from the candidate region of necrosis / cystic degeneration and reassigned to the active region, then the connected region is removed from the candidate region of necrosis / cystic degeneration and reassigned to the active region. The minimum voxel threshold for necrosis.
[0082] Number of voxels Reflects the volumetric size of the candidate necrotic region. For example, Taking 8 corresponds to a connected region with a diameter of approximately 2 mm. Regions smaller than this size are usually false positive low-signal areas caused by image noise or partial volume effects, rather than necrotic foci. Internal grayscale standard deviation. This reflects the uniformity of grayscale within the candidate necrotic region: In true necrotic / cystic areas, due to tissue disintegration, the internal signal is relatively uniform; if the grayscale fluctuation amplitude within the candidate connected region reaches or exceeds the grayscale fluctuation amplitude of the entire tumor region… If the area does not meet the gray-scale uniformity characteristics of the necrotic area, it may be a local signal difference caused by residual vascular sections or motion artifacts, and should not be marked as necrosis.
[0083] The two screening criteria described above exclude false positive regions based on scale dimension and grayscale consistency, respectively. A region is removed and reclassified as an active region if either criterion is met; both criteria do not need to be met simultaneously.
[0084] S4.5, mark the remaining connected regions after filtering as necrotic / cystic regions. , The remaining voxels are labeled as activity-enhancing regions. .
[0085] After the S4.4 screening, all the remaining candidate connected regions of necrosis / cystic degeneration were finally confirmed as necrosis / cystic degeneration regions. The voxels of these connected regions are labeled as necrotic / cystic regions. ; The remaining voxels not marked as necrotic / cystic areas are marked as activity-enhancing areas. . and All A subset of, and satisfying .
[0086] S4.6, the pixel counting method is used to calculate the volume of the necrotic / cystic area. and the volume of the activity enhancement region :
[0087]
[0088] In the formula, These represent the number of pixels in the necrotic / cystic degeneration region and the active region in the k-th layer image, respectively. For pixel spacing, denoted as layer thickness, and n as the total number of image layers.
[0089] In each image layer, the area of the tumor region is equal to the number of pixels labeled as tumors in that layer multiplied by the area of a single pixel. Multiply the area by the layer thickness This gives the volume of the tumor in that layer; summing the volumes of all layers gives the total volume of the entire three-dimensional tumor.
[0090] S4.7, Calculate the total tumor volume .
[0091] In each image layer, the area of the tumor region is equal to the number of pixels labeled as tumors in that layer multiplied by the area of a single pixel. Multiply the area by the layer thickness This gives the volume of the tumor in that layer; summing the volumes of all layers gives the total volume of the entire three-dimensional tumor. and These represent the number of pixels in the necrotic / cystic region and the active region in the k-th layer, respectively. If a layer does not contain a certain type of region, the corresponding number of pixels is 0. Summing the volumes of all n layers yields the total volume of the target region within the entire 3D area.
[0092] Volume of necrotic / cystic area Marked as in S4.5 The voxels are accumulated layer by layer; the volume of the activity enhancement region is obtained. Marked as in S4.5 The volume of the tumor is obtained by accumulating voxels layer by layer. The total volume of the tumor is obtained by summing the two values separately.
[0093] The foregoing has described in detail an embodiment of a method for measuring the three-dimensional volume of brain metastases. Based on the three-dimensional volume measurement method for brain metastases described in the above embodiment, this invention also provides a system for measuring the three-dimensional volume of brain metastases corresponding to the method.
[0094] Figure 5 This is a schematic block diagram of a three-dimensional volume measurement system for brain metastases provided in an embodiment of the present invention. In this embodiment, the three-dimensional volume measurement system for brain metastases can be divided into multiple functional modules according to the functions it performs. A module, as referred to in this invention, is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory.
[0095] The data preprocessing module is used to acquire preprocessed T1WI enhanced sequences, perform grayscale normalization on the images, and extract brain parenchyma masks.
[0096] The contrast index calculation module is used to calculate the local robust statistics within the three-dimensional neighborhood window for each voxel within the brain parenchyma mask area, calculate the enhanced contrast index based on the local robust statistics, and determine the final segmentation threshold using a dynamic hierarchical thresholding strategy based on the histogram distribution of the enhanced contrast index.
[0097] The 3D region growth module is used to grow 3D regions starting from each seed point, using voxel connected regions that are higher than a preset multiple of the final segmentation threshold as seed points. The growth stopping criteria include: the enhanced contrast index of the target voxel is not lower than a set multiple of the final segmentation threshold, and the normalized gray level of the target voxel is not lower than the average gray level of the background voxels in its neighborhood window. The grown region is then subjected to morphological post-processing to obtain a tumor segmentation mask.
[0098] The volume calculation module is used to calculate the overall gray-scale mean of the tumor region within the tumor segmentation mask. and grayscale standard deviation , grayscale lower than Connected regions are labeled as necrotic / cystic areas, and the rest are labeled as areas of enhanced activity. The volumes of the active and necrotic areas are calculated separately and summed to obtain the total tumor volume. The partition sensitivity coefficient γ is automatically adjusted according to the degree of skewness of the overall gray-scale distribution of the tumor region.
[0099] The three-dimensional volume measurement system for brain metastases in this embodiment is used to implement the aforementioned three-dimensional volume measurement method for brain metastases. Therefore, the specific implementation of this system can be found in the embodiment section of the three-dimensional volume measurement method for brain metastases mentioned above. Thus, the specific implementation can be referred to the description of the corresponding embodiments, and will not be elaborated here.
[0100] Furthermore, since the three-dimensional volume measurement system for brain metastases in this embodiment is used to implement the aforementioned three-dimensional volume measurement method for brain metastases, its function corresponds to the function of the above method, and will not be repeated here.
[0101] Figure 6 This is a schematic diagram of a terminal 600 provided in an embodiment of the present invention, including: a processor 610, a memory 620, and a communication unit 630. The processor 610 is used to implement the flow steps of the above-described embodiment of the three-dimensional volume measurement method for brain metastases when implementing the three-dimensional volume measurement program for brain metastases stored in the memory 620.
[0102] This invention also provides a computer storage medium, which may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The computer storage medium stores a program for measuring the three-dimensional volume of brain metastases. When the processor executes the program, it implements the process steps of the above-described embodiment of the method for measuring the three-dimensional volume of brain metastases.
[0103] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for three-dimensional volume measurement of brain metastases, characterized in that, Includes the following steps: S1, obtain the preprocessed T1WI enhanced sequence, normalize the image grayscale and extract the brain parenchyma mask; S2, within the brain parenchyma mask, calculate the local robust statistics within the three-dimensional neighborhood window for each voxel, calculate the enhanced contrast index based on the local robust statistics, and determine the final segmentation threshold using a dynamic hierarchical thresholding strategy based on the histogram distribution of the enhanced contrast index. S3, using voxel connected regions that are higher than the preset multiple of the final segmentation threshold as seed points, three-dimensional region growth is performed starting from each seed point. The growth stopping criteria include: the enhanced contrast index of the target voxel is not lower than the set multiple of the final segmentation threshold, and the normalized gray level of the target voxel is not lower than the average gray level of the background voxels in its neighborhood window. The grown region is post-processed morphologically to obtain a tumor segmentation mask. S4, within the tumor segmentation mask, calculate the overall gray-scale mean of the tumor region. and grayscale standard deviation , grayscale lower than Connected regions are labeled as necrotic / cystic areas, and the rest are labeled as areas of enhanced activity. The volumes of the active and necrotic areas are calculated separately and summed to obtain the total tumor volume; where, the partition sensitivity coefficient is... Automatically adjusts based on the degree of skewness in the overall grayscale distribution of the tumor region.
2. The method for three-dimensional volume measurement of brain metastases according to claim 1, characterized in that, Step S1 specifically includes: Read the T1WI enhanced sequence in DICOM format and extract the layer thickness, pixel spacing, image matrix size, and image orientation parameters; Percentile gray-level normalization was performed on the T1WI enhanced sequence, including statistical gray-level histograms within the whole brain image range, mapping the 5th percentile to 0 and the 95th percentile to 255, and mapping all voxel gray levels to the [0,255] interval in a linear relationship; Anisotropic diffusion filtering is applied to the normalized image to perform edge-preserving smoothing. Otsu thresholding was performed on the filtered image to extract the brain parenchyma mask.
3. The method for three-dimensional volume measurement of brain metastases according to claim 1, characterized in that, Step S2 specifically includes: Using the brain parenchyma mask as the spatial constraint, traverse every voxel within the mask and construct a three-dimensional neighborhood window W centered on the current voxel. Calculate the local weighted median within the current voxel neighborhood window. In the formula, Let be the weighting coefficient of the i-th voxel. The normalized gray value of the i-th voxel within the window; Calculate the absolute deviation of the local median within the current voxel neighborhood window. In the formula, c is the consistency constant; Calculate the contrast enhancement index In the formula, The normalized gray value of the central voxel. To prevent division by zero constant; After traversing all voxels within the brain parenchyma mask area, the mean of all enhanced contrast indices C is calculated. and standard deviation Then calculate the initial threshold. In the formula These are adaptive coefficients; by As the final segmentation threshold, where This is an adjustable coefficient.
4. The method for three-dimensional volume measurement of brain metastases according to claim 3, characterized in that, Weighting coefficient Determined based on the spatial distance and gray-level similarity between the current voxel and its neighboring voxels, and represented as: In the formula, Spatial weights, Let be the spatial Euclidean distance from the i-th neighboring voxel to the center of the window. This refers to the spatial bandwidth parameter; For grayscale weights, This refers to the grayscale bandwidth parameter.
5. The method for three-dimensional volume measurement of brain metastases according to claim 1, characterized in that, Step S3 specifically includes: S3.1, using the final segmentation threshold Based on this, all contrast enhancement indices C within the brain parenchyma mask area are selected that satisfy... The voxels constitute the candidate seed set, in which This is the seed point selection coefficient; S3.2, Perform three-dimensional connected component labeling on the candidate seed set to obtain several three-dimensional connected components, the size of each connected component being the number of voxels it contains; remove voxels whose number is less than a preset minimum voxel threshold. Connected components, retaining a voxel number greater than or equal to Connected components are used as candidate seed clusters; S3.3 Sort the remaining candidate seed clusters in descending order of voxel count, and retain the top N largest connected components as the final seed clusters; S3.4 Starting from each final seed cluster, perform a region growth operation in three-dimensional space. The growth range is the connected domain where the seed cluster is located, expanding outward layer by layer. Each expansion checks all unlabeled neighborhood voxels in the three-dimensional 26-neighborhood of the current seed cluster boundary voxel. S3.5, for each neighboring voxel being examined, determine whether it simultaneously meets the following two stopping criteria: 1) Enhance contrast index constraint ,in The boundary tolerance coefficient is the index of the enhanced contrast of the neighboring voxels. If the value is below this threshold, the voxel is determined not to belong to the tumor region, and expansion in that direction is stopped. 2) Local background grayscale constraint ,in The average gray level of the background voxels within the neighborhood voxel window is defined as the contrast enhancement index C within the neighborhood voxel window being less than [value missing]. voxels, The background determination coefficient; if the normalized gray level of the neighboring voxels Below If the voxel is determined to be in an edematous area or normal brain parenchyma, its expansion in that direction will cease. S3.6, only when the neighboring voxel satisfies both criterion 1) and criterion 2) is the voxel included in the tumor segmentation region and it continues to expand outward as a new growth boundary voxel; S3.7, Repeat steps S3.4 to S3.6 until there are no more voxels in the 26-neighborhood of all growth boundaries that simultaneously satisfy criterion 1) and criterion 2), at which point growth stops. The growth range is masked by the brain parenchyma. The tumor segmentation mask is automatically stopped when it encounters the boundary of the brain parenchyma mask, thus obtaining the final tumor segmentation mask. .
6. The method for three-dimensional volume measurement of brain metastases according to claim 1, characterized in that, Step S4 specifically includes the following steps: Obtaining the tumor segmentation mask Normalized gray values of all voxels Calculate the overall grayscale mean of the tumor region. and grayscale standard deviation ; by Threshold for segmenting necrotic / cystic regions ,Will All within satisfy Voxels were labeled as candidate voxels for necrosis / cystic degeneration, while the remaining voxels were labeled as candidate voxels for activity. This is the partition sensitivity coefficient; Three-dimensional connected component labeling was performed on candidate voxels of necrosis / cystic degeneration to obtain several candidate connected components of necrosis / cystic degeneration. For each candidate connected region of necrosis / cystic degeneration, calculate its voxel count. and its internal gray standard deviation ,like or If the connected region is removed from the candidate region of necrosis / cystic degeneration and reassigned to the active region, then the connected region is removed from the candidate region of necrosis / cystic degeneration and reassigned to the active region. The minimum voxel threshold for necrosis; The connected regions that remain after filtering are marked as necrotic / cystic regions. , The remaining voxels are labeled as activity-enhancing regions. ; The volume of necrotic / cystic areas was calculated using the pixel counting method. and the volume of the activity enhancement region : In the formula, These represent the number of pixels in the necrotic / cystic degeneration region and the active region in the k-th layer image, respectively. For pixel spacing, For layer thickness; Calculate the total tumor volume .
7. The method for three-dimensional volume measurement of brain metastases according to claim 6, characterized in that, Partition sensitivity coefficient Automatic adjustment based on the degree of skewness in the overall grayscale distribution of the tumor region, specifically including: Calculate the gray-level distribution skewness coefficient of the tumor region ; like If it is characterized as a positively skewed state, then Take 1.2; if If it is characterized as a negatively skewed state, then Take 0.8; otherwise Use the default value of 1.
8. A three-dimensional volume measurement system for brain metastases, characterized in that, include: The data preprocessing module is used to acquire preprocessed T1WI enhanced sequences, perform grayscale normalization on the images, and extract brain parenchyma masks. The contrast index calculation module is used to calculate the local robust statistics within the three-dimensional neighborhood window for each voxel within the brain parenchyma mask area, calculate the enhanced contrast index based on the local robust statistics, and determine the final segmentation threshold using a dynamic hierarchical thresholding strategy based on the histogram distribution of the enhanced contrast index. The 3D region growth module is used to grow 3D regions starting from each seed point, using voxel connected regions that are higher than a preset multiple of the final segmentation threshold as seed points. The growth stopping criteria include: the enhanced contrast index of the target voxel is not lower than a set multiple of the final segmentation threshold, and the normalized gray level of the target voxel is not lower than the average gray level of the background voxels in its neighborhood window. The grown region is post-processed morphologically to obtain a tumor segmentation mask. The volume calculation module is used to calculate the overall gray-scale mean of the tumor region within the tumor segmentation mask. and grayscale standard deviation , grayscale lower than Connected regions are labeled as necrotic / cystic areas, and the rest are labeled as areas of enhanced activity. The volumes of the active and necrotic areas are calculated separately and summed to obtain the total tumor volume. The partition sensitivity coefficient γ is automatically adjusted according to the degree of skewness of the overall gray-scale distribution of the tumor region.
9. A terminal, characterized in that, include: Memory, used to store the program for measuring the three-dimensional volume of brain metastases; A processor is configured to implement the steps of the three-dimensional volume measurement method for brain metastases as described in any one of claims 1 to 7 when executing the three-dimensional volume measurement program for brain metastases.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores a three-dimensional volume measurement program for brain metastases, which, when executed by a processor, implements the steps of the three-dimensional volume measurement method for brain metastases as described in any one of claims 1 to 7.
