Method for three-dimensional reconstruction of cell nuclei based on morphological constraints
By using dynamic hierarchical image enhancement and structural constraint marker watershed segmentation, combined with shape interpolation and isosurface extraction, the problems of segmentation stability and interlayer structural discontinuity in 3D reconstruction of cell nuclei were solved, achieving high-quality 3D model reconstruction and quantitative analysis.
Patent Information
- Application Number
- CN202610422447.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-01
- Publication Date
- 2026-08-04
AI Technical Summary
Existing cell nucleus 3D reconstruction techniques based on confocal slice sequences suffer from insufficient stability of segmentation results and discontinuities in interlayer structures, leading to holes, pseudo-connections, or topological instability in the 3D model.
A morphological constraint-based three-dimensional reconstruction method for cell nuclei is adopted. Through dynamic hierarchical image enhancement, structural constraint marker watershed segmentation, and inter-layer consistency correction, combined with shape interpolation and isosurface extraction, a three-dimensional mesh model of cell nuclei is generated.
It improves the accuracy and boundary integrity of cell nucleus region extraction, solves the sensitivity of segmentation results to imaging conditions, suppresses morphological abrupt changes and positional drift in the Z direction, achieves smooth continuity and topological consistency of the three-dimensional model, and supports quantitative analysis.
Smart Images

Figure CN122510429A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of cell nuclear structure modeling technology, specifically involving a method for three-dimensional reconstruction of cell nuclei based on morphological constraints. Background Technology
[0002] As the core structure for storing and regulating genetic information in eukaryotic cells, the three-dimensional morphological characteristics of the cell nucleus are closely related to the physiological state of cells and the occurrence and development of diseases such as tumors. Accurate quantitative characterization of the three-dimensional morphology of the cell nucleus is an important foundation for cell phenotypic analysis, disease mechanism research, and pathological auxiliary diagnosis.
[0003] Traditional nuclear morphology analysis relies on two-dimensional microscopic images, describing nuclear features through parameters such as area and perimeter. While the technology is mature, it can only reflect cross-sectional information of a single section and cannot fully present the true three-dimensional spatial structure of the cell nucleus. Especially for cell nuclei with complex morphology or spatial heterogeneity, two-dimensional analysis leads to the loss of key information, making it difficult to meet the needs of refined research.
[0004] With the development of microscopic imaging technology, confocal microscopy can obtain two-dimensional slice sequences (z-stack images) by scanning layer by layer along the Z-axis, providing a convenient and widely used data source for three-dimensional reconstruction of cell nuclei. Compared with high-end technologies such as electron microscopy tomography, confocal imaging equipment has a high degree of popularity and mature experimental procedures, and has become the mainstream data source for the study of three-dimensional morphology of cell nuclei.
[0005] Existing 3D reconstruction of cell nuclei based on confocal slice sequences typically involves key steps such as image segmentation, inter-slice interpolation completion, and 3D surface reconstruction. The segmentation stage often employs methods such as thresholding, region growing, and deep learning models, while the 3D modeling stage frequently utilizes Marching Cubes isosurface extraction algorithms for surface reconstruction. However, these methods still have significant technical limitations in practical applications, restricting the reconstruction quality and stability.
[0006] 1. Insufficient adaptability to spatial anisotropy: Confocal images generally have lower resolution in the Z-axis direction than in the XY plane, and the large sampling interval between layers easily leads to structural blurring or breakage between adjacent slices. Existing methods directly segment two-dimensional slices layer by layer and then simply stack them, which easily causes discontinuities in three-dimensional structures, uneven surfaces, and topological instability.
[0007] 2. Segmentation results are greatly affected by image quality fluctuations: Due to factors such as light signal attenuation and differences in imaging conditions, there are significant differences in the signal-to-noise ratio, contrast, and boundary sharpness of different Z-layer slices. Existing segmentation methods (whether traditional or deep learning methods) are prone to inaccurate segmentation, blurred boundaries, or missing regions in low-quality slices, which in turn affects the overall quality of subsequent 3D reconstruction.
[0008] 3. Lack of interlayer structural continuity constraints: Existing methods mostly treat single-layer slices as independent processing units and do not establish a structural consistency constraint mechanism between adjacent slices. This leads to morphological abrupt changes, positional drift, or abnormal expansion in the Z direction of the segmentation results, which ultimately causes problems such as holes, pseudo-connections, or non-realistic topological structures in the 3D model.
[0009] In summary, existing cell nucleus 3D reconstruction techniques based on confocal 2D slice sequences still face core problems such as insufficient structural continuity and poor segmentation stability. Summary of the Invention
[0010] The purpose of this invention is to provide a morphological constraint-based three-dimensional reconstruction method for cell nuclei, which solves the problems of insufficient stability of segmentation results and discontinuous interlayer structure in the existing technology for three-dimensional reconstruction of cell nuclei.
[0011] The technical solution adopted in this invention is a morphological constraint-based three-dimensional reconstruction method for cell nuclei, comprising the following steps:
[0012] S1. Obtain the confocal slice sequence of the cell nucleus to be reconstructed and the corresponding metadata; S2. Perform dynamic-level image enhancement processing on the confocal slice sequence to form an enhanced slice sequence; S3. Perform label watershed segmentation based on structural constraints on the enhanced slice sequence. First, obtain the initial segmentation results layer by layer, and then introduce an inter-layer structural consistency constraint mechanism to correct the segmentation results, so as to obtain a cell nuclear mask sequence with continuous structure. S4. Stack the cell nucleus mask sequence in layers to construct three-dimensional binary voxel data, complete the interlayer structure based on shape interpolation, and then extract the isosurface to generate a three-dimensional mesh model of the cell nucleus.
[0013] The invention is further characterized in that, Step S1 involves confocal sectioning, which is the z-stack image data obtained by scanning layer by layer along the Z-axis. The image data is acquired by a confocal microscope, and the images are either single-channel grayscale images or multi-channel images. The metadata includes one or more of the following: pixel spacing in the XY direction, layer spacing in the Z direction, image width, image height, number of slice layers, magnification, objective lens parameters, and acquisition channel information.
[0014] Step S2, the image enhancement processing based on dynamic hierarchy, specifically includes: S21. Calculate the grayscale variance and gradient mean of each slice, and substitute them into the preset scoring function to obtain the image quality score of each slice. The expression of the evaluation function is shown in the following formula: ; In the formula, Q represents the image quality score, V represents the gray-level variance of the current slice, and G represents the gradient mean of the current slice. and These are weighting coefficients used to balance the contributions of gray-level variance and gradient information; S22. Based on the quality score and the preset threshold, the slice is divided into a high-quality layer and a low-quality layer. S23. For high-quality layers, a multi-scale Retinex enhancement strategy is used to strengthen structural details, while for low-quality layers, a contrast-limited adaptive histogram equalization combined with Gaussian filtering strategy is used to improve contrast while suppressing noise.
[0015] In step S21, the gray-level variance and gradient mean of each slice are normalized before being substituted into the scoring function; Step S22 also includes slicing by sorting according to the whole sequence score, selecting the first set proportion of slices as high-quality layers, and the rest as low-quality layers.
[0016] Step S3 includes the following steps: S31. The Otsu thresholding method is used to obtain the initial foreground region on the enhanced slice; S32. Remove noise and holes through morphological opening and closing operations, then perform distance transformation, and extract foreground marker points by setting a threshold on the distance transformation result; S33. Perform marker-controlled watershed segmentation based on the foreground marker points, and post-process the watershed output results to obtain the initial segmentation results of each slice. S34. Select slices from high-quality layers that meet the requirements of normal shape, no edge contact, and reasonable area ratio as anchor layers; S35. Using the Anchor layer as the center, propagate constraint information bidirectionally up and down along the Z-axis. Use the mask of the adjacent corrected layer after morphological expansion as the constraint region of the current layer. Take the intersection with the initial segmentation result of the current layer to limit the structural range. S36. Calculate the intersection-union ratio of the segmentation results of adjacent layers. If it is lower than the preset threshold, it is determined to be an abnormal layer. The abnormal layer is corrected by interpolation of neighboring layers or mask replacement.
[0017] After completing the opening and closing operations in step S32, hole filling and small connected component removal are performed. The structural element of the morphological processing in step S32 is a circle or ellipse with a radius of 1 to 5 pixels; the foreground marker extraction threshold of the distance transformation is 0.4 to 0.8 times the maximum distance value.
[0018] The post-processing in step S33 includes one or more combinations of boundary smoothing, hole filling, preservation of the largest connected region, and removal of abnormal regions with touch edges.
[0019] In step S35, the structural element for morphological expansion is a circle or an ellipse with a radius of 1 to 10 pixels. After the correction in step S36 is completed, boundary smoothing and hole filling are performed again.
[0020] In step S4, during the stacking of the cell nucleus mask sequences, the XY axis scale is determined by the image pixel spacing, and the Z axis scale is determined by the slice layer spacing.
[0021] The shape interpolation-based method in step S4 specifically includes: S41. Calculate the signed distance field for each layer of cell nucleus mask, with positive values inside the target, negative values in the background, and zero values near the boundary; S42. Perform interpolation calculations between the distance fields of adjacent slices to generate intermediate layer distance fields, and restore the intermediate layer binary structure by thresholding the interpolated distance fields with zero level sets. S43. Combine the original mask layer with the interpolated intermediate layer to form dense three-dimensional volume data.
[0022] In step S4, isosurface processing involves setting an isosurface threshold, then traversing each cube cell in the 3D voxel mesh, and determining the triangular facet connection method based on the internal and external relationships of the cell's 8 vertices relative to the isosurface; finally, all facets are stitched together to obtain the initial 3D surface mesh; and the initial 3D surface mesh is post-processed to improve surface quality and visualization effects.
[0023] The beneficial effects of this invention are: (1) This invention adopts a dynamic hierarchical differential enhancement strategy and optimizes the processing based on the slice quality score. While enhancing the details of high-quality slices, it suppresses the noise and false boundary magnification of low-quality slices, effectively reducing the interference of image quality fluctuations on the segmentation results, improving the accuracy and boundary integrity of cell nucleus region extraction, and solving the problem of existing segmentation methods being sensitive to imaging conditions.
[0024] In addition, this invention innovatively introduces a structural constraint mechanism. By selecting a high-confidence Anchor layer and propagating constraint information bidirectionally, and combining the intersection constraints of adjacent layer structures with the correction of abnormal layers, a structural consistency guarantee system between layers is constructed. This effectively suppresses morphological abrupt changes, positional drift, and abnormal expansion in the Z direction, reduces problems such as holes and pseudo-connections in the 3D model, and solves the problem of structural fracture caused by traditional independent layer-by-layer segmentation.
[0025] (2) This invention fills the gaps in the sparse sampling of the Z-axis of the confocal slice by using a shape interpolation method based on the distance field, thereby achieving a natural transition of the interlayer structure. Combined with isosurface extraction and mesh post-processing, the surface of the three-dimensional model is smoother and more continuous, better adapting to the spatial anisotropy problem caused by the difference in resolution between the Z-axis and the XY plane, and restoring the true three-dimensional geometric features of the cell nucleus.
[0026] The improved integrity, smoothness, and topological consistency of the 3D model provide a reliable foundation for the automated calculation of morphological parameters such as volume, surface area, and curvature, ensuring the accuracy and stability of quantitative analysis results. This provides high-quality technical support for cell phenotype analysis, disease mechanism research, and pathological auxiliary diagnosis, while the automated workflow design also improves research efficiency. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating the morphological constraint-based three-dimensional reconstruction method for cell nuclei according to the present invention. Figure 2 These are a set of cell nucleus z-stack sequence images acquired by the Olympus FV3000 in Embodiment 2 of the present invention; Figure 3a This is an evaluation of the segmentation effect of different segmentation methods using Dice as an evaluation index in Embodiment 6 of the present invention; Figure 3b This is an evaluation of the segmentation effect of different segmentation methods using IoU as the evaluation index in Embodiment 6 of the present invention; Figure 3c This is an evaluation of the segmentation effect of different segmentation methods using BF-score as the evaluation index in Embodiment 6 of the present invention; Figure 4 This is a three-dimensional reconstruction result of the cell nucleus using the method of this invention; Figure 5a This is a histogram of the average curvature distribution of cell nuclei in the method of this invention; Figure 5b This is a histogram of the Gaussian curvature distribution of cell nuclei in the method of this invention; Figure 5c This is a statistical diagram of the number of vertices of different Gaussian curvature types in the cell nucleus according to the method of this invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Example 1 The morphological constraint-based three-dimensional reconstruction method for cell nuclei provided in this embodiment, such as... Figure 1 As shown, it includes the following steps: S1. Obtain the confocal slice sequence of the cell nucleus to be reconstructed and the corresponding metadata, providing basic input for subsequent image enhancement, segmentation and 3D reconstruction; S2. Perform dynamic-level image enhancement processing on the confocal slice sequence to form an enhanced slice sequence; Specifically, based on the differences in image quality between different slices, an enhancement strategy is adaptively selected to mitigate the adverse effects of differences in brightness, contrast, and boundary sharpness between layers on subsequent segmentation and 3D reconstruction.
[0030] This involves calculating image quality evaluation metrics for each slice, determining whether the slice is a high-quality or low-quality slice based on the evaluation results, and then applying different enhancement methods to different categories of slices to achieve dynamic enhancement within the sequence.
[0031] S3. Perform label watershed segmentation based on structural constraints on the enhanced slice sequence. First, obtain the initial segmentation results layer by layer, and then introduce an inter-layer structural consistency constraint mechanism to correct the segmentation results, so as to obtain an accurate and well-continuous cell nuclear mask sequence. This involves extracting the cell nucleus region layer by layer from the enhanced two-dimensional slices and introducing structural constraints to improve segmentation stability. This step is mainly divided into two modules: slice-level segmentation and sequence consistency constraints.
[0032] S4. Stack the cell nucleus mask sequence in layers to construct three-dimensional binary voxel data, complete the interlayer structure based on shape interpolation, and then extract the isosurface to generate a three-dimensional mesh model of the cell nucleus.
[0033] After obtaining a three-dimensional model of the cell nucleus, its morphological parameters are calculated to achieve quantitative analysis of the three-dimensional morphology of the cell nucleus. Specifically, this includes, but is not limited to, the following parameters: (1) Volume parameters are obtained by voxel statistics or grid integration calculation; (2) The surface area parameters are obtained by accumulating triangular mesh patches; (3) By calculating the local geometric relationship of the neighborhood of the grid vertex, the average curvature, Gaussian curvature or other curvature indexes are obtained to characterize the unevenness of the cell nucleus surface; By calculating the above parameters, quantitative analysis of the three-dimensional morphology of the cell nucleus can be achieved, providing basic data support for cell nucleus phenotypic analysis, disease mechanism research, and related biomedical image analysis.
[0034] The morphological constraint-based 3D reconstruction method for cell nuclei provided in this embodiment executes the following steps sequentially: "confocal slice sequence acquisition—image enhancement strategy based on dynamic hierarchy—cell nucleus segmentation based on structural constraints—3D reconstruction and morphological parameter analysis based on shape interpolation." This method not only considers the significant differences in image quality between different Z-layer slices, but also introduces inter-layer structural consistency constraints and anomaly layer correction mechanisms on top of slice-level segmentation, thereby effectively improving the continuity of the cell nucleus mask sequence in the Z direction. Simultaneously, through shape interpolation based on the distance field and Marching Cubes surface reconstruction, continuous modeling of the 3D structure of the cell nucleus and automated calculation of various morphological parameters are achieved.
[0035] Compared with existing methods that rely solely on independent layer-by-layer segmentation and simple stacking, this invention is better able to adapt to common problems in confocal images such as boundary blurring, sparse interlayer sampling, and local structural breakage, thereby improving the integrity, smoothness, and reliability of quantitative analysis of 3D models.
[0036] Example 2 Based on Embodiment 1 above, in this embodiment, the confocal slice sequence in step S1 is z-stack image data obtained by scanning layer by layer along the Z-axis. The image format can be .tif, .tiff, or other image formats that can preserve grayscale information. The image is a single-channel grayscale image or a multi-channel image. Preferably, a fluorescence channel image containing cell nuclear staining signals is used as the object of subsequent processing, such as a DAPI staining channel image.
[0037] In one specific embodiment, the image data is acquired by a confocal microscope, using an Olympus FV3000 or other confocal microscope with layer-by-layer scanning capability. For example... Figure 2 The image shown is a set of z-stack sequence images of cell nuclei acquired using an Olympus FV3000. These images are arranged sequentially along the Z-axis from the bottom layer to the top layer, reflecting the structural changes of the cell nucleus in spatial direction.
[0038] To ensure the subsequent 3D reconstruction results have practical physical meaning, microscope metadata corresponding to the image sequence is acquired simultaneously. The metadata includes at least one or more of the following: pixel spacing in the XY direction, interlayer spacing in the Z direction, image width, image height, number of slices, magnification, objective lens parameters, and acquisition channel information.
[0039] Preferably, the pixel spacing in the XY direction is 0.05. m / pixel~0.5 m / pixel, Z-axis interlayer spacing is 0.1 m / slice ~ 2.0 m / slice. The above parameters can be obtained by parsing the original microscope metafile, a text file with the same name as the image, or the image header information.
[0040] Example 3 Based on Embodiment 2 above, step S2 of this embodiment, which involves image enhancement processing based on dynamic levels, specifically includes: S21. Calculate the gray-level variance and gradient mean of each slice. The gray-level variance reflects the dispersion of the image's gray-level distribution and can characterize the image's texture richness and overall contrast. The gradient mean reflects the intensity of image edge changes and can characterize the clarity of cell nucleus boundaries.
[0041] Substituting the calculated gray-level variance and gradient mean into the preset scoring function yields the image quality score for each slice. The expression of the evaluation function is shown in equation (1) below: (1); In the formula, Q represents the image quality score, V represents the gray-level variance of the current slice, and G represents the gradient mean of the current slice. and These are weighting coefficients used to balance the contributions of gray-level variance and gradient information; Preferably, and The values range from 0.3 to 0.7, with a more preferred value being... .
[0042] The variance of gray levels can be calculated using the following formula: (2); In the formula: Indicates the image in coordinates The gray value at the specified location, where M and N represent the width and height of the image, respectively. This represents the average grayscale value of the image. The gradient mean can be calculated using the Sobel operator, the Scharr operator, or other edge detection operators. It is preferable to use the Sobel operator to obtain the gradients in the x and y directions first, and then calculate the gradient magnitude mean.
[0043] Preferably, to eliminate the influence of dimensional differences between different slices, the gray-scale variance and gradient mean of each slice are normalized before being substituted into the scoring function.
[0044] S22. Based on the quality score and the preset threshold, the slice is divided into a high-quality layer and a low-quality layer. The threshold can be a fixed threshold or an adaptive threshold based on the distribution of scores across the entire set of slices. In one implementation, a threshold is set. ,when When this occurs, the layer is classified as a high-quality slice; when When this happens, the layer is classified as a low-quality slice. Preferably, the threshold is... The value range is 0.4 to 0.7.
[0045] To enhance the stability of the judgment, after sorting according to the whole sequence score, the top several proportions of slices can be selected as high-quality layers, and the rest can be selected as low-quality layers.
[0046] S23. For high-quality sections, multi-scale Retinex enhancement (MSR) is used because these sections already possess a certain structural basis and boundary information. MSR is more suitable for further enhancing the nuclear outline and internal structural details, making the boundaries clearer. In other words, for high-quality layers, it is preferable to leverage their inherent structural information and focus on detail enhancement. In one implementation, the scale parameter of the multi-scale Retinex can be set to multiple scales in the range of 15 to 250 pixels, preferably three scales are selected and combined to balance local details and global brightness.
[0047] For low-quality slices, a contrast-limited adaptive histogram equalization (CLAHE) method is used, combined with Gaussian filtering for noise suppression. Because low-quality slices are usually weak, dark, and have blurred boundaries, directly using an overly strong enhancement method can easily amplify background noise and false boundaries, thus affecting subsequent segmentation.
[0048] Therefore, for this type of slice, this embodiment adopts a relatively more robust contrast enhancement strategy, which enhances the visibility of the target while minimizing noise-driven enhancement results. The contrast limiting parameter of CLAHE is preferably 1.0 to 4.0, the local window size is preferably 4×4 to 16×16, and the standard deviation of the Gaussian filter is preferably 0.5 to 2.0.
[0049] After enhancing each slice, the enhancement result is retained, and the original layer sequence is kept unchanged, forming an enhanced slice sequence. This sequence will be used as the input for structural segmentation in step S3.
[0050] This embodiment achieves dynamic enhancement of brightness, contrast, and structural information of images at different layers through the above steps, reduces inter-layer quality fluctuations, and improves the stability of subsequent segmentation and 3D reconstruction.
[0051] Example 4 Based on Embodiment 3 above, step S3 in this embodiment includes the following steps: S31. The enhanced slices are automatically segmented using the Otsu thresholding method to obtain the initial foreground region. The Otsu method automatically determines the threshold by maximizing the inter-class variance between the foreground and background, and is suitable for scenes where there is a certain grayscale difference between the cell nucleus and the background.
[0052] S32. Since the initial Otsu segmentation results may contain scattered noise, small holes or local boundary jaggedness, noise and holes are removed by morphological opening and closing operations. The opening operation is used to remove small noise and burrs, and the closing operation is used to fill local holes and connect small broken edges.
[0053] Preferably, the structural element of the morphological processing is a circle or an ellipse with a radius of 1 to 5 pixels.
[0054] After completing the opening and closing operations, further hole filling and small connected component removal operations are performed. The area threshold for small connected component removal can be set according to the image size, preferably removing foreground regions with an area smaller than 20 to 200 pixels.
[0055] After obtaining a relatively clean foreground region, a distance transform is performed on the binary foreground. The distance transform is used to calculate the distance from each foreground pixel to the nearest background pixel, thus reflecting the centrality of the foreground region.
[0056] High-confidence foreground markers are extracted by setting a threshold on the distance transformation results. The threshold is preferably 0.4 to 0.8 times the maximum distance value. This ensures that the extracted markers are located in relatively stable positions within the cell nucleus.
[0057] S33. Perform marker-controlled watershed segmentation based on the foreground marker points. Unlike traditional watersheds that directly segment gradient terrain, marker-controlled watersheds define the "flooding start point" through foreground and background markers, thereby effectively reducing over-segmentation.
[0058] Post-processing is applied to the watershed output to improve the quality of the single-layer mask. This post-processing includes one or more of the following: boundary smoothing, hole filling, preservation of the largest connected component, and removal of abnormal edge regions. For single-core reconstruction scenarios, the connected component with the largest preserved area is preferred as the nucleus segmentation result for the current slice.
[0059] The above steps yield the initial segmentation results for each slice in the sequence.
[0060] After completing the slice-level segmentation, inter-layer consistency constraints are introduced into the preliminary segmentation results. This involves structural correction of the segmentation results between adjacent slices in the Z-direction to ensure the continuity of the three-dimensional structure. Specifically, the steps are as follows: S34. Select a reliable reference layer, i.e., the Anchor layer, from the entire slice sequence. To ensure the Anchor layer itself has high reliability, it is preferable to limit the candidate range to intermediate high-quality layers. Specifically, first, select high-quality slices based on the image quality score in step S2; then, combined with the reliability of the corresponding segmentation mask, further select the most suitable layer as the Anchor layer.
[0061] The reliability of a segmentation mask can be evaluated using the following metrics: (1) Whether it touches the edge: If the foreground area touches the image boundary, it indicates that there may be segmentation leakage or target truncation; (2) Is the area ratio abnormal? Calculate the ratio of the foreground area to the total area of the image. If it is too large or too small, it indicates that the segmentation may be abnormal. (3) Whether the shape is abnormal: Determine whether the current mask has obvious deformity by calculating indicators such as convexity, aspect ratio or solidity.
[0062] S35. Using the Anchor layer as the center, propagate constraint information bidirectionally up and down along the Z-axis. For the current layer to be corrected, take the mask of its adjacent corrected layer as a reference, and appropriately expand the reference mask to obtain the constraint region. The expanded structural element is preferably a circular or elliptical structural element, with a radius preferably between 1 and 10 pixels.
[0063] Then, the intersection operation is performed between the constrained region and the initial segmentation result of the current layer to limit the structural range of the current layer, so that the mask of the current layer is as spatially continuous as possible with the adjacent layers.
[0064] This approach utilizes the prior knowledge that cell nuclei typically change gradually between adjacent slices, effectively suppressing isolated expansion, positional drift, or large-area leakage in the current layer.
[0065] S36. Calculate the Intersection over Union (IoU) of adjacent layer segmentation results to evaluate structural consistency. When the IoU is lower than a set threshold, the current layer is determined to be an anomalous layer. For anomalous layers, correction is performed using neighboring layer interpolation or mask replacement to eliminate abrupt structural changes. In one embodiment, if the current layer is located between two trusted layers, the interpolation result of the masks of the upper and lower adjacent trusted layers is used as the correction mask; if the current layer has only one adjacent trusted layer, the result of the mask of that adjacent trusted layer after appropriate morphological adjustment is used to replace it.
[0066] After the correction is completed, perform boundary smoothing and hole filling operations again to make the corrected mask transition more naturally with the preceding and following layers in terms of shape.
[0067] Through the above steps, the structural continuity constraint of the slice sequence in the Z direction is achieved, resulting in a mask sequence that is more suitable for 3D reconstruction.
[0068] Example 5 Based on Example 4 above, in step S4 of this embodiment, the XY direction scale is determined by the image pixel spacing and the Z direction scale is determined by the slice layer spacing during the stacking of cell nucleus mask sequences, thereby establishing a three-dimensional volumetric data coordinate system with actual physical scale.
[0069] After stacking is completed, basic checks can be performed on the volume data, such as checking for anomalies such as isolated layers, fractured layers, and void layers.
[0070] Since confocal slices are typically sparsely sampled in the Z-direction, directly stacking two-dimensional masks into three-dimensional volumetric data can easily lead to abrupt interlayer transitions, structural discontinuities, or noticeable surface step effects. Therefore, interlayer interpolation processing is required for the three-dimensional voxel data.
[0071] The shape interpolation-based method in step S4 of this embodiment specifically includes: S41. Calculate the signed distance field for each layer of cell nucleus mask, with positive values inside the target, negative values in the background, and zero values near the boundary; S42. Perform interpolation calculations between the distance fields of adjacent slices to generate intermediate layer distance fields, and restore the intermediate layer binary structure by thresholding the interpolated distance fields with zero level sets. S43. Combine the original mask layer with the interpolated intermediate layer to form dense three-dimensional volume data.
[0072] In this way, while maintaining the overall shape trend, the structural breakage caused by the interlayer spacing can be compensated more naturally, making the three-dimensional structure smoother and more continuous in the Z direction.
[0073] After obtaining continuous three-dimensional volume data, the Marching Cubes algorithm is used to extract isosurfaces from the three-dimensional volume data to construct a three-dimensional mesh model.
[0074] Specifically, firstly, an isosurface threshold is set, preferably 0.5; then, each cube cell in the three-dimensional voxel mesh is traversed, and the connection method of the triangular facets is determined by looking up a table based on the inside-outside relationship of the 8 vertices of the cell relative to the isosurface; finally, all facets are stitched together to obtain the initial triangular mesh.
[0075] After obtaining the initial triangular mesh, further post-processing can be performed on the mesh, including mesh smoothing, removal of small debris, hole repair, and normal unification, to improve surface quality and visualization.
[0076] The generated 3D model can ultimately be output in a standard 3D format, such as STL, OBJ, or PLY.
[0077] Example 6 To verify the effectiveness of the morphological constraint-based 3D reconstruction method for cell nuclei described in this invention, this embodiment conducts experimental tests on the method and compares it with commonly used existing segmentation methods. The experiments mainly verify the method from two aspects: 2D segmentation accuracy and 3D reconstruction effect.
[0078] First, the segmentation performance was compared. To verify the effectiveness of this invention in the cell nuclear slice segmentation stage, the Active Contour method (AC), the Marker-Controlled Watershed method (WS), and the structural constraint segmentation method used in this invention were selected for comparative experiments. The Dice coefficient, Intersection over Union (IoU), and Boundary F1 score (BF-score) were used as evaluation indicators. The above evaluation indicators were calculated for each slice in the test set, and the mean and standard deviation of all slice results were statistically analyzed. The experimental results are shown in Table 1.
[0079] Table 1. Quantitative comparison of different segmentation methods on Dice, IoU, and BF-score metrics.
[0080] Combination Figure 3a , Figure 3b , Figure 3c As shown in Table 1, the method of this invention outperforms the comparative methods in all three evaluation metrics: Dice, IoU, and BF-score. Specifically, Dice reaches 0.98, IoU reaches 0.96, and BF-score reaches 0.92. These results demonstrate that the method of this invention not only extracts the main nucleus region more accurately but also achieves higher precision in boundary localization, effectively reducing problems such as contour shift, boundary unevenness, and local fragmentation. Especially in terms of the BF-score, the method of this invention shows a more significant advantage compared to the AC and WS methods, indicating that this invention has better performance in boundary restoration and structure preservation.
[0081] Furthermore, experimental results show that under good image quality, all methods can obtain relatively reasonable segmentation results; however, under low-quality images and strong artifact interference, the stability of traditional methods decreases significantly, while the method of this invention can still maintain high segmentation stability and structural integrity. These results indicate that the method of this invention has better robustness to complex confocal cell nucleus images.
[0082] Subsequently, to verify the effectiveness of the invention in the 3D reconstruction stage, shape interpolation and 3D surface reconstruction were further performed based on the aforementioned segmentation results, and a visualization analysis of the 3D model of a typical cell nucleus sample was conducted. The experimental results are as follows: Figure 4 As shown.
[0083] like Figure 4 As can be seen, the three-dimensional reconstructed cell nucleus model obtained by the method of this invention has a clear overall outline, continuous surface, and complete structure, and can well maintain the true geometric features of the target. No obvious breaks, holes, or abnormal distortions appeared on the model surface, indicating that the method of this invention has good stability in maintaining the continuity of interlayer structure and restoring spatial morphology. The statistical results of the three-dimensional morphological parameters of the cell nucleus samples are shown in Table 2. The results show that different cell nuclei exhibit certain variations in overall size, surface complexity, and spatial occupancy characteristics. These parameters allow for a more detailed quantitative description of the overall size and spatial structure of the cell nucleus.
[0084] Table 2. Statistical analysis of three-dimensional parameters of cell nuclear samples
[0085] The curvature distribution statistics of sample 1 are as follows: Figure 5a , 5b As shown in 5c, from Figure 5a It can be observed that the average curvature is mainly concentrated in the range of 0.01–0.05, with an average of approximately 0.0268 and a median of approximately 0.0275. The close proximity of the average and median indicates that the curvature distribution is relatively uniform overall, without any obvious extreme outliers. This suggests that the cell nuclear surface is generally smooth, without drastic structural abrupt changes or obvious local ruptures. Figure 5b The distribution of Gaussian curvature on the cell nuclear surface can be observed. Statistical results show that the Gaussian curvature is concentrated in a small range close to 0, with an average value of approximately 5.93 × 10⁻⁶. -4 The median is approximately 3.51 × 10⁻⁶. -4 This result indicates that the surface of the cell nucleus is generally close to a smooth ellipsoidal structure, while still retaining a certain degree of local morphological undulation. Combining the statistical results of mean curvature and Gaussian curvature, it can be concluded that the reconstructed cell nucleus model is relatively regular in overall morphology, has good surface continuity, and can realistically reflect the three-dimensional geometric features of the cell nucleus. To further analyze the geometric structure types of the cell nucleus surface, this paper classifies and statistically analyzes the surface regions based on the sign of the Gaussian curvature. Figure 5cThe distribution of regions with different curvature types was presented, with convex regions (K>0) accounting for approximately 70.4%, saddle-shaped regions (K<0) accounting for approximately 29.6%, and no obvious planar regions detected (K≈0). This result indicates that the cell nucleus surface is mainly composed of convex structures, with an overall morphology close to a regular ellipsoid, while saddle-shaped regions mainly correspond to local morphological changes or slight wrinkles on the cell nucleus surface.
[0086] Further analysis of the three-dimensional morphological parameters reveals that the method of this invention can not only achieve stable construction of three-dimensional models of cell nuclei, but also support the automatic calculation of three-dimensional morphological parameters such as volume, surface area, and curvature, thus providing a reliable foundation for subsequent quantitative analysis of cell nucleus morphology.
[0087] Based on the above experimental results, it can be seen that the morphological constraint-based three-dimensional reconstruction method of cell nuclei described in this invention can effectively improve the accuracy of two-dimensional segmentation of cell nuclei and the continuity of interlayer structure compared with traditional segmentation and simple stacking reconstruction methods. It can also reduce structural breakage and topological anomalies caused by boundary blurring, local weak signals and interlayer mutations, thereby improving the integrity, smoothness and reliability of morphological parameter calculation of the three-dimensional reconstruction results.
[0088] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0089] 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 3D reconstruction of cell nuclei based on morphological constraints, characterized in that, Includes the following steps: S1. Obtain the confocal slice sequence of the cell nucleus to be reconstructed and the corresponding metadata; S2. Perform dynamic-level image enhancement processing on the confocal slice sequence to form an enhanced slice sequence; S3. Perform label watershed segmentation based on structural constraints on the enhanced slice sequence. First, obtain the initial segmentation results layer by layer, and then introduce an inter-layer structural consistency constraint mechanism to correct the segmentation results, so as to obtain a cell nuclear mask sequence with continuous structure. S4. Stack the cell nucleus mask sequence in layers to construct three-dimensional binary voxel data, complete the interlayer structure based on shape interpolation, and then extract the isosurface to generate a three-dimensional mesh model of the cell nucleus.
2. The method of claim 1, wherein the method further comprises: The confocal slice sequence in step S1 is z-stack image data obtained by scanning layer by layer along the Z-axis. The image data is acquired by a confocal microscope and the image is a single-channel grayscale image or a multi-channel image. The metadata includes one or more of the following: pixel spacing in the XY direction, layer spacing in the Z direction, image width, image height, number of slice layers, magnification, objective lens parameters, and acquisition channel information.
3. The method of claim 1, wherein the method further comprises: The image enhancement processing based on dynamic hierarchy in step S2 specifically includes: S21. Calculate the grayscale variance and gradient mean of each slice, and substitute them into the preset scoring function to obtain the image quality score of each slice. The expression of the evaluation function is shown in the following formula: ; In the formula, Q represents an image quality score, V represents a gray scale variance of a current slice, G represents a gradient mean value of the current slice, and is a weight coefficient for balancing the contribution of the gray scale variance and the gradient information. S22. Based on the quality score and the preset threshold, the slice is divided into a high-quality layer and a low-quality layer. S23. For high-quality layers, a multi-scale Retinex enhancement strategy is used to strengthen structural details, while for low-quality layers, a contrast-limited adaptive histogram equalization combined with Gaussian filtering strategy is used to improve contrast while suppressing noise.
4. The method of claim 3, wherein the method further comprises: In step S21, the gray-level variance and gradient mean of each slice are normalized before being substituted into the scoring function. The slice division in step S22 also includes sorting by the whole sequence score, selecting the first set proportion of slices as high-quality layers, and the rest as low-quality layers.
5. The method of claim 1, wherein the method further comprises: Step S3 includes the following steps: S31. The Otsu thresholding method is used to obtain the initial foreground region on the enhanced slice; S32. Remove noise and holes through morphological opening and closing operations, then perform distance transformation, and extract foreground marker points by setting a threshold on the distance transformation result; S33. Perform marker-controlled watershed segmentation based on the foreground marker points, and post-process the watershed output results to obtain the initial segmentation results of each slice. S34. Select slices from high-quality layers that meet the requirements of normal shape, no edge contact, and reasonable area ratio as anchor layers; S35. Using the Anchor layer as the center, propagate constraint information bidirectionally up and down along the Z-axis. Use the mask of the adjacent corrected layer after morphological expansion as the constraint region of the current layer. Take the intersection with the initial segmentation result of the current layer to limit the structural range. S36. Calculate the intersection-union ratio of the segmentation results of adjacent layers. If it is lower than the preset threshold, it is determined to be an abnormal layer. The abnormal layer is corrected by interpolation of neighboring layers or mask replacement.
6. The method of claim 5, wherein the method further comprises: After completing the opening and closing operations in step S32, hole filling and small connected component removal are performed. The structural element of the morphological processing in step S32 is a circle or ellipse with a radius of 1 to 5 pixels; the foreground marker extraction threshold of the distance transformation is 0.4 to 0.8 times the maximum distance value; The post-processing in step S33 includes one or more combinations of boundary smoothing, hole filling, preservation of the largest connected region, and removal of abnormal regions with touch edges.
7. The method of claim 5, wherein the method further comprises: The structural element for morphological expansion in step S35 is a circle or an ellipse with a radius of 1 to 10 pixels. After the correction in step S36 is completed, boundary smoothing and hole filling are performed again.
8. The method of claim 1, wherein the method further comprises: determining a shape of the cell nucleus; and determining the shape constraint based on the shape of the cell nucleus. In step S4, during the stacking of the cell nucleus mask sequence, the XY direction scale is determined by the image pixel spacing, and the Z direction scale is determined by the slice layer spacing.
9. The method of claim 1, wherein the method further comprises: determining a shape of the cell nucleus; and determining the shape constraint based on the shape of the cell nucleus. The shape interpolation-based method in step S4 specifically includes: S41. Calculate the signed distance field for each layer of cell nucleus mask, with positive values inside the target, negative values in the background, and zero values near the boundary; S42. Perform interpolation calculations between the distance fields of adjacent slices to generate intermediate layer distance fields, and restore the intermediate layer binary structure by thresholding the interpolated distance fields with zero level sets. S43. Combine the original mask layer with the interpolated intermediate layer to form dense three-dimensional volume data.
10. The method for three-dimensional reconstruction of cell nuclei based on morphological constraints according to claim 1, characterized in that, In step S4, isosurface processing involves setting an isosurface threshold, then traversing each cube cell in the 3D voxel mesh, and determining the triangular facet connection method based on the internal and external relationships of the cell's eight vertices relative to the isosurface; finally, all facets are stitched together to obtain the initial 3D surface mesh; and the initial 3D surface mesh is post-processed to improve surface quality and visualization effects.