CN116402794A - Neural tube marking method, electronic device, and readable storage medium - Google Patents
- ️Fri Jul 07 2023
Disclosure of Invention
The invention aims to provide a neural tube marking method, electronic equipment and a readable storage medium, which can effectively improve the marking efficiency and accuracy of a neural tube, thereby reducing the pre-operation planning time and improving the safety and reliability in the operation process.
In order to achieve the above object, the present invention provides a neural tube labeling method, comprising:
preprocessing the acquired three-dimensional medical image to be marked to acquire a target three-dimensional medical image including a target neural tube;
acquiring position information of a plurality of sample points on the target three-dimensional medical image, and acquiring a slice sequence of the target three-dimensional medical image along a position corresponding to the extending direction of the target neural tube, wherein one sample point is positioned in the initial end of the target neural tube, one sample point is positioned in the final end of the target neural tube, and the plurality of sample points are positioned in different sections of the target neural tube;
selecting a slice including the target neural tube from the slice sequence as a target slice based on the position information of the sample point located in the starting end of the target neural tube and the position information of the sample point located in the ending end of the target neural tube;
Extracting a target neural tube center point from each layer of the target slice layer by layer according to the sample points so as to obtain a center line of the target neural tube;
marking the target neural tube on the three-dimensional medical image to be marked or the target three-dimensional medical image according to the central line of the target neural tube.
Optionally, the extracting the target neural tube center point from the sample point layer by layer for each layer of the target slice to obtain the central line of the target neural tube includes:
taking a target slice where one of a sample point located in a starting end of the target nerve tube and the sample point located in a final end of the target nerve tube is located as a starting target slice, and taking a target slice where the other is located as a final target slice;
performing connected domain analysis on the initial target slice to extract the connected domain where the target neural tube is located on the initial target slice, and acquiring standard parameters for identifying the target neural tube and a target neural tube center point on the initial target slice according to the connected domain where the target neural tube is located on the initial target slice;
Extracting a target nerve tube center point of each layer of target slices except the initial target slice layer by layer according to the sequence from the initial target slice to the final target slice according to the standard parameters;
and acquiring the central line of the target neural tube according to all the central points of the target neural tube.
Optionally, the performing a connected domain analysis on the initial target slice to extract a connected domain where the target neural tube is located includes:
extracting the connected domain from the initial target slice to extract all the connected domains on the initial target slice;
and extracting the connected domain comprising the sample point from all connected domains on the initial target slice as the connected domain where the target neural tube is located.
Optionally, the standard parameter includes at least one of a standard area, a standard gray scale, and a standard roundness;
the obtaining standard parameters for identifying the target neural tube according to the connected domain where the target neural tube is located on the initial target section comprises the following steps:
acquiring a standard area for identifying the target neural tube according to the area of the connected domain where the target neural tube is located on the initial target section; and/or
Acquiring standard gray scales for identifying the target neural tube according to the gray average value of all pixel points in the connected domain where the target neural tube is located on the initial target slice; and/or
Acquiring standard roundness for identifying the target neural tube according to the roundness of the connected domain where the target neural tube is located on the initial target section;
the obtaining the target neural tube center point on the initial target section according to the connected domain where the target neural tube on the initial target section is located includes:
and taking the centroid of the connected domain where the target nerve tube is located on the initial target slice as a target nerve tube center point on the initial target slice.
Optionally, the extracting, layer by layer, the target slice of each layer except the initial target slice according to the standard parameter in the order from the initial target slice to the final target slice, includes:
step A, taking the target slice of the next layer of the initial target slice as a current slice to be analyzed;
step B, extracting connected domains from the current slice to be analyzed to extract all the connected domains on the current slice to be analyzed;
Step C, judging whether the connected domain meets the identification requirement of the target neural tube according to the standard parameters aiming at each connected domain on the current slice to be analyzed, and if so, taking the connected domain as the target connected domain of the current slice to be analyzed;
step D, judging whether the number of the target connected domains of the current slice to be analyzed is one;
if yes, executing the step E, and if not, executing the step F;
e, taking the mass center of the target connected domain as a target nerve tube center point on the current slice to be analyzed, and continuously executing the step F;
step F, judging whether the current slice to be analyzed is the termination target slice or not;
if not, executing the step G;
and G, taking the target slice of the next layer of the current slice to be analyzed as a new current slice to be analyzed, and returning to the step B.
Optionally, for each connected domain on the current slice to be analyzed, determining whether the connected domain meets the identification requirement of the target neural tube according to the standard parameter includes:
for each connected domain on the current slice to be analyzed:
acquiring identification parameters of the connected domain and the mass center of the connected domain, wherein the identification parameters comprise at least one of area, gray average value and roundness;
Judging whether the difference value between each parameter item in the identification parameters of the connected domain and the corresponding parameter item in the standard parameters is within a corresponding preset error range, and whether the distance between the centroid of the connected domain and the center point of the last target nerve tube is smaller than a first preset distance threshold or whether the distance between the centroid of the connected domain and the sample point closest to the current slice to be analyzed is smaller than a second preset distance threshold;
if so, judging that the connected domain meets the identification requirement of the target neural tube.
Optionally, the acquiring the center line of the target neural tube according to all the center points of the target neural tube includes:
screening out the target neural tube center points meeting a first preset condition from all the target neural tube center points by adopting a first preset algorithm to serve as candidate target neural tube center points;
screening out the candidate target nerve tube center points meeting a second preset condition from all the candidate target nerve tube center points by adopting a second preset algorithm, wherein the candidate target nerve tube center points are used as final target nerve tube center points;
and acquiring the central line of the target neural tube according to all the final target neural tube central points.
Optionally, the screening the target neural tube center point satisfying the first preset condition from all the target neural tube center points by using the first preset algorithm as the candidate target neural tube center point includes:
aiming at each target neural tube center point, searching out the sample point closest to the target section where the neural tube center point is positioned as a target sample point;
judging whether the difference value between the coordinate value of the central point of the target nerve tube on a first coordinate axis parallel to the extending direction of the target nerve tube and the coordinate value of the central point of the target nerve tube on the first coordinate axis on the target slice where the target sample point is located is within a first preset range;
if not, taking the target neural tube central point as the candidate target neural tube central point;
if yes, judging whether the central point of the target nerve tube meets the following conditions: the difference value between the coordinate value of the target neural tube center point on a second coordinate axis perpendicular to the first coordinate axis and the coordinate value of the target neural tube center point on the target slice where the target sample point is located is within a second preset range, and the difference value between the coordinate value of the target neural tube center point on a third coordinate axis perpendicular to the first coordinate axis and the coordinate value of the target neural tube center point on the target slice where the target sample point is located is within a third preset range;
If yes, taking the target neural tube central point as the candidate target neural tube central point;
if not, deleting the central point of the target nerve tube.
Optionally, the screening the candidate target neural tube center point satisfying the second preset condition from all the candidate target neural tube center points by using a second preset algorithm as a final target neural tube center point includes:
fitting a space curve according to the position information of the candidate target nerve tube center points to obtain corresponding space curves;
and judging whether the distance between the candidate target neural tube center point and the space curve is smaller than a third preset distance threshold value according to each candidate target neural tube center point, if so, taking the candidate target neural tube center point as a final target neural tube center point, and if not, deleting the candidate target neural tube center point.
To achieve the above object, the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the neural tube marking method described above.
To achieve the above object, the present invention also provides a readable storage medium having stored therein a computer program which, when executed by a processor, implements the neural tube marking method described above.
Compared with the prior art, the neural tube marking method, the electronic device and the readable storage medium provided by the invention have the following advantages:
the method comprises the steps of preprocessing an acquired three-dimensional medical image to be marked to acquire a target three-dimensional medical image comprising a target neural tube, and acquiring position information of a plurality of sample points on the target three-dimensional medical image, wherein one sample point is positioned in a starting end of the target neural tube, one sample point is positioned in a ending end of the target neural tube, the plurality of sample points are positioned in different sections of the target neural tube, and acquiring a slice sequence of the target three-dimensional medical image along a position corresponding to the extending direction of the target neural tube; then selecting a slice including the target neural tube from the slice sequence as a target slice based on the position information of the sample point located in the starting end of the target neural tube and the position information of the sample point located in the ending end of the target neural tube; extracting the center point of the target nerve tube from each layer of the target slice layer by layer according to the sample points so as to obtain the center line of the target nerve tube; finally, marking the target neural tube on the three-dimensional medical image to be marked or the target three-dimensional medical image according to the central line of the target neural tube. Therefore, the nerve tube marking method provided by the invention can take the acquired multiple sample points positioned in the target nerve tube as priori knowledge, effectively ensure the accuracy of the extracted target nerve tube center point, further improve the accuracy of the target nerve tube marking, and effectively improve the safety and reliability in the operation process. In addition, the neural tube marking method provided by the invention marks the position of the target neural tube through the center line of the extracted target neural tube, and compared with the marking method adopting machine learning in the prior art, the neural tube marking method provided by the invention does not depend on earlier training data and model training, and is short in time consumption and high in accuracy, so that the preoperative planning time can be reduced, and the safety and reliability in the operation process can be improved. In addition, the neural tube marking method provided by the invention can further improve marking efficiency by selecting the target slice to extract the central point of the target neural tube according to the position information of the sample point positioned in the starting end of the target neural tube and the position information of the sample point positioned in the final end of the target neural tube.
Because the electronic device and the readable storage medium provided by the invention belong to the same inventive concept as the neural tube marking method provided by the invention, the electronic device and the readable storage medium provided by the invention have all the advantages of the neural tube marking method provided by the invention, and the beneficial effects of the electronic device and the readable storage medium provided by the invention are not repeated here.
Detailed Description
The neural tube marking method, the electronic device and the readable storage medium according to the present invention are described in further detail below with reference to the accompanying drawings and detailed description. The advantages and features of the present invention will become more apparent from the following description. It should be noted that the drawings are in a very simplified form and are all to a non-precise scale, merely for the purpose of facilitating and clearly aiding in the description of embodiments of the invention. For a better understanding of the invention with objects, features and advantages, refer to the drawings. It should be understood that the structures, proportions, sizes, etc. shown in the drawings are shown only in connection with the present disclosure for the understanding and reading of the present disclosure, and are not intended to limit the scope of the invention, which is defined by the appended claims, and any structural modifications, proportional changes, or dimensional adjustments, which may be made by the present disclosure, should fall within the scope of the present disclosure under the same or similar circumstances as the effects and objectives attained by the present invention.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Furthermore, in the description herein, reference to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the various embodiments or examples described in this specification and the features of the various embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The core idea of the invention is to provide a neural tube marking method, electronic equipment and a readable storage medium, which can effectively improve the marking efficiency and accuracy of the neural tube, thereby reducing the preoperative planning time and improving the safety and reliability in the operation process.
It should be noted that the neural tube marking method provided by the embodiment of the present invention may be applied to the electronic device provided by the embodiment of the present invention, where the electronic device provided by the embodiment of the present invention may be a personal computer, a mobile terminal, etc., and the mobile terminal may be a hardware device with various operating systems, such as a mobile phone, a tablet computer, etc. It should be noted that, although the mandibular nerve tube is described herein as an example of a target nerve tube, it should be understood by those skilled in the art that this is not a limitation of the present invention, and the nerve tube labeling method provided by the present invention may be applied to labeling of other nerve tubes other than mandibular nerve tubes. It should also be noted that, as those skilled in the art will appreciate, the term "plurality" herein includes two cases.
In order to achieve the above-mentioned idea, the present invention provides a neural tube labeling method, referring to fig. 1, as shown in fig. 1, the neural tube labeling method provided by the present invention includes the following steps:
Step S100, preprocessing the acquired three-dimensional medical image to be marked to acquire a target three-dimensional medical image including a target neural tube.
Step 200, acquiring position information of a plurality of sample points on the target three-dimensional medical image, and acquiring a slice sequence of the target three-dimensional medical image along a position corresponding to an extending direction of the target neural tube, wherein one sample point is positioned in a starting end of the target neural tube, one sample point is positioned in a ending end of the target neural tube, and the plurality of sample points are all positioned in different sections of the target neural tube.
Step S300, selecting a slice comprising the target neural tube from the slice sequence as a target slice according to the position information of the sample point in the initial end of the target neural tube and the position information of the sample point in the final end of the target neural tube.
And step 400, extracting the center point of the target neural tube from each layer of target slice layer by layer according to the sample points so as to obtain the center line of the target neural tube.
And S500, marking the target neural tube on the three-dimensional medical image to be marked or the target three-dimensional medical image according to the central line of the target neural tube.
Therefore, the nerve tube marking method provided by the invention can take the acquired multiple sample points positioned in the target nerve tube as priori knowledge, effectively ensure the accuracy of the extracted target nerve tube center point, further improve the accuracy of the target nerve tube marking, and effectively improve the safety and reliability in the operation process. In addition, the neural tube marking method provided by the invention marks the position of the target neural tube through the center line of the extracted target neural tube, and compared with the marking method adopting machine learning in the prior art, the neural tube marking method provided by the invention does not depend on earlier training data and model training, and is short in time consumption and high in accuracy, so that the preoperative planning time can be reduced, and the safety and reliability in the operation process can be improved. In addition, the neural tube marking method provided by the invention can further improve marking efficiency by selecting the target slice to extract the central point of the target neural tube according to the position information of the sample point positioned in the starting end of the target neural tube and the position information of the sample point positioned in the final end of the target neural tube. It should be noted that, when the target neural tube is a plurality of target neural tubes, steps S200 to S400 are performed for each of the target neural tubes to obtain a center line of each of the target neural tubes, and the corresponding target neural tube is marked on the three-dimensional medical image to be marked or the target three-dimensional medical image according to the center line of each of the target neural tubes, as will be understood by those skilled in the art.
In particular, the three-dimensional medical image to be marked may be, but is not limited to, a cone beam computerized tomography (ConebeamComputerTomography, CBCT) image, an electronic computerized tomography (Computed Tomography, CT) image, a magnetic resonance imaging (MagneticResonanceImaging, MRI) image. It should be noted that, as understood by those skilled in the art, the three-dimensional medical image to be marked may be obtained in real time from a medical imaging device, may be obtained from an image database, or may be received from an external device, and the method of obtaining the three-dimensional medical image to be marked is not limited in the present invention. It should be further noted that, as those skilled in the art can understand, the sample points may be points manually selected by an operator, or may be points automatically selected by a computer according to a set algorithm, and the number of the sample points may be set according to a specific situation, and the present invention is not limited to this, for example, the number of the sample points may be 5-10. Preferably, the plurality of sample points are uniformly distributed along the extension direction of the target neural tube. In addition, it should be noted that, as those skilled in the art can understand, the present invention does not limit the sequence between selecting a sample point and acquiring a slice sequence, in some embodiments, the sample point may be selected first, then the slice sequence may be acquired, and in other embodiments, the slice sequence may be acquired first, then the sample point may be selected. Furthermore, it should be noted that, as will be appreciated by those skilled in the art, in some embodiments, a plurality of sample points may be selected directly on the target three-dimensional medical image, or may be selected on each slice of the target three-dimensional medical image along a sequence of slices in a direction corresponding to the direction of extension of the target neural tube. In addition, it should be further noted that, as those skilled in the art will understand, the slice sequence of the target three-dimensional medical image in the coronal direction (i.e., in the anterior-posterior direction of the human body, i.e., in the Y-direction) includes a plurality of slices of the coronal plane, the slice sequence of the target three-dimensional medical image in the sagittal direction (i.e., in the left-right direction of the human body, i.e., in the X-direction) includes a plurality of slices of the sagittal plane, and the slice sequence of the target three-dimensional medical image in the vertical direction (i.e., in the up-down direction of the human body, i.e., in the Z-direction) includes a plurality of slices of the transverse plane. If the target neural tube extends along the left-right direction of the human body, selecting a slice sequence of the target three-dimensional medical image along the sagittal position for analysis; if the target neural tube extends along the front-back direction of the human body, acquiring a slice sequence of the target three-dimensional medical image along the coronary direction for analysis; if the target neural tube extends along the up-down direction of the human body, acquiring a slice sequence of the target three-dimensional medical image along the vertical direction for analysis.
Taking the three-dimensional medical image to be marked as a three-dimensional oral image to be marked, wherein the target three-dimensional medical image is a target three-dimensional oral image, the target neural tube is a certain mandibular neural tube, the sample point positioned in the starting end of the target neural tube is a sample point positioned in the jaw hole of the mandibular neural tube, and the sample point positioned in the final end of the target neural tube is a sample point positioned in the chin hole of the mandibular neural tube; since the mandibular nerve tube extends in the anterior-posterior direction in the human body, the slice sequence of the target three-dimensional medical image in a position (i.e., a coronal position) corresponding to the extending direction of the target nerve tube is a slice sequence including a plurality of coronal slices, wherein different sample points are located on different coronal slices.
With continued reference to fig. 2, as shown in fig. 2, the position of the jaw aperture of the mandibular nerve tube (i.e. the target neural tube) to be marked may be found in the 3D view (as shown in fig. 3 a) or the coronal view (i.e. the coronal slice) of the target three-dimensional oral cavity image, a first sample point (i.e. an initial point) is selected in the jaw aperture, then a coronal slice is selected every predetermined number of layers, the position of the mandibular nerve tube to be marked is found in the coronal slice, a sample point is selected, and so on until the 2 nd to n-1 st sample points are found, finally the position of the jaw aperture of the mandibular nerve tube (i.e. the target neural tube) to be marked is found in the 3D view or the coronal view (i.e. the coronal slice) of the target three-dimensional oral cavity image, and the last sample point (i.e. the nth sample point, i.e. the end point) is selected in the jaw aperture, and thus the sample point is selected. Further, referring to fig. 3b, as shown in fig. 3b, a mode of selecting points by slicing may be adopted, a sample point may be generated by browsing a coronal slice and clicking on the coronal slice, so as to complete a selection process of the sample point on the current coronal slice, the coronal slice may be switched by sliding a roller, so as to continue to select the sample point, and after all the sample points are selected, a determination button may be clicked.
With continued reference to fig. 4, as shown in fig. 4, in an exemplary embodiment, the preprocessing of the acquired three-dimensional medical image to be marked to acquire a target three-dimensional medical image including a target neural tube includes:
filtering the three-dimensional medical image to be marked to obtain a first three-dimensional medical image;
window adjustment operation is carried out on the first three-dimensional medical image so as to obtain a second three-dimensional medical image;
performing edge enhancement operation on the second three-dimensional medical image to obtain a third three-dimensional medical image;
and performing morphological closing operation on the third three-dimensional medical image to acquire the target three-dimensional medical image.
Specifically, a gaussian filter can be adopted to carry out filtering processing on the three-dimensional medical image to be marked so as to remove noise in the image; the window adjusting operation is carried out on the first three-dimensional medical image according to the preset window level and the preset window width, so that the area where the target nerve tube is located can be highlighted, and the area where the target nerve tube is located can be accurately identified on each layer of target slice; the outline of the target nerve tube can be enhanced and displayed by carrying out edge enhancement operation on the second three-dimensional medical image, so that the follow-up identification of the region where the target nerve tube is located on each layer of target slice can be further ensured; by performing morphological closing operation (expansion before corrosion) on the third three-dimensional medical image, small pores in the third three-dimensional medical image can be closed, so that the subsequent identification of the region where the target nerve tube is located on each layer of target slice can be further and effectively ensured. It should be noted that, as those skilled in the art can understand, the related content of how to perform the window adjustment operation on the first three-dimensional medical image and the related content of how to perform the morphological closing operation on the third three-dimensional medical image can refer to the prior art, and will not be described herein.
Further, the second three-dimensional medical image may be edge enhanced using a canny operator or a sobel operator. Specifically, the second three-dimensional medical image may be edge-detected by using a canny operator or a sobel operator to obtain a corresponding edge image, and then the edge image and the second three-dimensional medical image are superimposed, so that the third three-dimensional medical image may be obtained. It should be noted that, as those skilled in the art can understand, reference may be made to the prior art for the related content of how to use the canny operator or the sobel operator to perform edge detection on the second three-dimensional medical image to obtain the corresponding edge image, which is not described herein.
With continued reference to fig. 5, as shown in fig. 5, in an exemplary embodiment, the extracting, layer by layer, the target slice from the sample point, to obtain the center line of the target neural tube, includes:
taking a target slice where one of a sample point located in a starting end of the target nerve tube and the sample point located in a final end of the target nerve tube is located as a starting target slice, and taking a target slice where the other is located as a final target slice;
Performing connected domain analysis on the initial target slice to extract the connected domain where the target neural tube is located on the initial target slice, and acquiring standard parameters for identifying the target neural tube and a target neural tube center point on the initial target slice according to the connected domain where the target neural tube is located on the initial target slice;
extracting a target nerve tube center point of each layer of target slices except the initial target slice layer by layer according to the sequence from the initial target slice to the final target slice according to the standard parameters;
and acquiring the central line of the target neural tube according to all the central points of the target neural tube.
Therefore, the connected domain of the target neural tube is extracted from the target section of the starting end or the ending end of the target neural tube, and the standard parameters for identifying the target neural tube are determined according to the connected domain, so that theoretical basis can be provided for identifying the region of the target neural tube on other target sections, the region of the target neural tube can be effectively identified on other target sections, the accuracy of the central line of the extracted target neural tube is further effectively ensured, and the accuracy of the neural tube marking method is further improved. Specifically, taking the target neural tube as an example, a target slice where a sample point located in a jaw hole of the mandibular neural tube or a sample point located in a chin hole of the mandibular neural tube is located may be taken as an initial target slice, and a target slice where the other is located may be taken as a final target slice.
In an exemplary embodiment, the performing a connected domain analysis on the initial target slice to extract a connected domain in which the target neural tube is located includes:
extracting the connected domain from the initial target slice to extract all the connected domains on the initial target slice;
and extracting the connected domain comprising the sample point from all connected domains on the initial target slice as the connected domain where the target neural tube is located.
Specifically, two-Pass (Two-Pass scanning method) or Seed-Filling (Seed Filling method) may be used to extract the connected domain of the initial target slice, so as to extract all connected domains on the initial target slice, and according to the position information of the sample point on the initial target slice, find the connected domain including the sample point from all the extracted connected domains as the connected domain where the target neural tube is located. It should be noted that, as those skilled in the art can understand, the related content of how to extract all connected domains on the initial target slice by using Two-Pass (Two-Pass scanning) or Seed-packing (Seed Filling) can refer to the prior art, and will not be described herein. It should be further noted that, as will be understood by those skilled in the art, if the initial target slice is a target slice in which a sample point located in the initial end of the target neural tube is located, a connected domain on the initial target slice including the sample point located in the initial end of the target neural tube is taken as the connected domain in which the target neural tube is located; and if the initial target slice is a target slice where a sample point located in the ending end of the target neural tube is located, taking a connected domain on the initial target slice, which comprises the sample point located in the ending end of the target neural tube, as the connected domain where the target neural tube is located.
In an exemplary embodiment, the standard parameters include at least one of standard area, standard gray scale, and standard circularity;
the obtaining standard parameters for identifying the target neural tube according to the connected domain where the target neural tube is located on the initial target section comprises the following steps:
acquiring a standard area for identifying the target neural tube according to the area of the connected domain where the target neural tube is located on the initial target section; and/or
Acquiring standard gray scales for identifying the target neural tube according to the gray average value of all pixel points in the connected domain where the target neural tube is located on the initial target slice; and/or
And acquiring the standard roundness for identifying the target neural tube according to the roundness of the connected domain where the target neural tube is located on the initial target section.
Specifically, the area of the connected domain refers to the total number of pixels included in the connected domain, and the gray average value of all pixels in the connected domain refers to the average value of the gray values of the pixels included in the connected domain. It should be noted that, as those skilled in the art can understand, the related content of how to calculate the roundness of the connected domain may refer to the prior art, and will not be described herein.
Preferably, the standard parameters include standard area, standard gray scale, and standard roundness. Therefore, the standard area, the standard gray level and the standard roundness are used as the standard parameters for identifying the target neural tube, so that the area where the target neural tube is located can be accurately identified on other target sections, the accuracy of the central line of the extracted target neural tube is further effectively ensured, and the accuracy of the neural tube marking method provided by the invention is further improved.
Referring to fig. 6, as shown in fig. 6, each connected domain on the initial target slice is sequentially traversed, and if the i-th connected domain traversed currently includes an initial sample point (i.e. a sample point on the initial target slice), the average gray scale, area and roundness of the connected domain are calculated to obtain a standard gray scale, a standard area and a standard roundness for identifying the target neural tube; if the i-th connected domain traversed currently does not include the initial sample point (i.e. the sample point on the initial target slice), the next connected domain is traversed continuously.
In an exemplary embodiment, the obtaining the target neural tube center point on the initial target slice according to the connected domain where the target neural tube on the initial target slice is located includes:
And taking the centroid of the connected domain where the target nerve tube is located on the initial target slice as a target nerve tube center point on the initial target slice.
In particular, reference may be made to the prior art for the relevant content of how to obtain the centroid of the connected domain, and no further description is given here.
With continued reference to fig. 7, as shown in fig. 7, in an exemplary embodiment, the extracting, layer by layer, the target neural tube center point of each layer of the target slice except the initial target slice according to the standard parameters in the order from the initial target slice to the final target slice includes:
step A, taking the target slice of the next layer of the initial target slice as a current slice to be analyzed;
step B, extracting connected domains from the current slice to be analyzed to extract all the connected domains on the current slice to be analyzed;
step C, judging whether the connected domain meets the identification requirement of the target neural tube according to the standard parameters aiming at each connected domain on the current slice to be analyzed, and if so, taking the connected domain as the target connected domain of the current slice to be analyzed;
Step D, judging whether the number of the target connected domains of the current slice to be analyzed is one;
if yes, executing the step E, and if not, executing the step F;
e, taking the mass center of the target connected domain as a target nerve tube center point on the current slice to be analyzed, and continuously executing the step F;
step F, judging whether the current slice to be analyzed is the termination target slice or not;
if not, executing the step G;
and G, taking the target slice of the next layer of the current slice to be analyzed as a new current slice to be analyzed, and returning to the step B.
Specifically, two-Pass (Two-Pass scanning method) or Seed-Filling (Seed Filling method) may be used to extract the connected domain from the current slice to be analyzed, so as to extract all the connected domains on the current slice to be analyzed. Specifically, referring to fig. 8a and 8b, as shown in fig. 8a and 8b, all connected domains (connected
domain1 to connected domain n) on the current slice to be analyzed can be extracted by extracting the connected domain from the current slice to be analyzed.
When the current section to be analyzed exists and only one connected domain meeting the identification requirement of the target neural tube exists, the connected domain is the area where the target neural tube on the current section to be analyzed is located, and the centroid of the connected domain is the center point of the target neural tube on the current section to be analyzed. When the current slice to be analyzed does not have a connected domain meeting the identification requirement of the target neural tube or has a plurality of connected domains (including two connected domains) meeting the identification requirement of the target neural tube, if the current slice to be analyzed is not a termination slice, the current slice to be analyzed indicates that the extraction of the central point of the target neural tube fails, and the next layer of target slice is continuously analyzed; and when the current slice to be analyzed is a termination slice, ending the extraction flow of the central point of the target nerve tube.
In an exemplary embodiment, the determining, for each connected domain on the current slice to be analyzed, whether the connected domain meets the identification requirement of the target neural tube according to the standard parameter includes:
for each connected domain on the current slice to be analyzed:
acquiring identification parameters of the connected domain and the mass center of the connected domain, wherein the identification parameters comprise at least one of the area, the gray average value and the roundness;
judging whether the difference value between each parameter item in the identification parameters of the connected domain and the corresponding parameter item in the standard parameters is within a corresponding preset error range, and whether the distance between the centroid of the connected domain and the center point of the last target nerve tube is smaller than a first preset distance threshold or whether the distance between the centroid of the connected domain and the sample point closest to the current slice to be analyzed is smaller than a second preset distance threshold;
if so, judging that the connected domain meets the identification requirement of the target neural tube.
Specifically, when the standard parameter includes a standard area, then the identification parameter includes an area; when the standard parameters comprise standard gray scales, the identification parameters comprise gray scale average values; when the standard parameter comprises standard roundness, the identification parameter comprises roundness; i.e. the parameter items in the identification parameters are in one-to-one correspondence with the parameter items in the standard parameters. When the standard parameters include standard area, standard gray scale and standard roundness, for each connected domain on the current slice to be analyzed, if the difference between the area of the connected domain and the standard area is within a first preset error range, the difference between the gray scale mean value of the connected domain and the standard gray scale is within a second preset error range, the difference between the roundness of the connected domain and the standard roundness is within a third preset error range, and the position of the centroid of the connected domain also meets the requirement (namely, the distance between the centroid of the connected domain and the center point of the last target nerve tube is smaller than a first preset distance threshold or the distance between the centroid of the connected domain and the nearest sample point of the current slice to be analyzed is smaller than a second preset distance threshold), then the connected domain is judged to meet the identification requirement of the target nerve tube. Therefore, when the target connected domain on the current slice to be analyzed is selected, whether the identification parameters of the connected domain meet the standard parameters or not and whether the positions of the connected domain meet the requirements or not are considered, so that the accuracy of the identified target connected domain as the region where the target nerve tube is located can be further improved.
Further, if the distance between the center point of the last target neural tube and the current section to be analyzed is smaller than the distance between the sample point closest to the current section to be analyzed and the current section to be analyzed, if the distance between the centroid of the connected domain and the center point of the last target neural tube is smaller than the first preset distance threshold, determining that the position of the centroid of the connected domain meets the requirement; if the distance between the center point of the last target neural tube and the current to-be-analyzed slice is larger than the distance between the sample point closest to the current to-be-analyzed slice and the current to-be-analyzed slice, if the distance between the centroid of the connected domain and the sample point closest to the current to-be-analyzed slice is smaller than a second preset distance threshold, judging that the position of the centroid of the connected domain meets the requirement.
Referring to fig. 9, as shown in fig. 9, sequentially traversing all connected domains on the current slice to be analyzed, if the area of the i-th connected domain traversed currently meets a standard area (i.e. the difference between the area of the connected domain and the standard area is within a first preset error range, i.e. meets a size requirement), the gray average value meets a standard gray (i.e. the difference between the gray average value of the connected domain and the standard gray is within a second preset error range, i.e. meets an average gray requirement), the roundness meets a standard roundness (i.e. the difference between the roundness of the connected domain and the standard roundness is within a third preset error range, i.e. meets a roundness requirement), and the centroid position also meets a requirement (i.e. the distance between the centroid of the connected domain and the center point of the last target nerve tube is smaller than a first preset distance threshold or the distance between the centroid of the connected domain and the nearest sample point of the current slice to be analyzed is smaller than a second preset distance threshold); if the connected domain does not meet any of the above requirements, the connected domain is excluded.
With continued reference to fig. 10, as shown in fig. 10, in an exemplary embodiment, the obtaining the center line of the target nerve tube according to all the center points of the target nerve tube includes:
screening out the target neural tube center points meeting a first preset condition from all the target neural tube center points by adopting a first preset algorithm to serve as candidate target neural tube center points;
screening out the candidate target nerve tube center points meeting a second preset condition from all the candidate target nerve tube center points by adopting a second preset algorithm, wherein the candidate target nerve tube center points are used as final target nerve tube center points;
and acquiring the central line of the target neural tube according to all the final target neural tube central points.
Therefore, the central point of the target neural tube which simultaneously meets the first preset condition and the second preset condition is screened out to serve as a final target neural point, so that the central line of the target neural tube is obtained, abnormal target neural tube central points can be effectively eliminated, the accuracy of the extracted central line of the target neural tube can be further improved, and the accuracy of the neural tube marking method provided by the invention is further improved.
In an exemplary embodiment, the selecting, by using a first preset algorithm, the target neural tube center point satisfying a first preset condition from all the target neural tube center points as the candidate target neural tube center points includes:
aiming at each target neural tube center point, searching out the sample point closest to the target section where the neural tube center point is positioned as a target sample point;
judging whether the difference value between the coordinate value of the central point of the target nerve tube on a first coordinate axis parallel to the extending direction of the target nerve tube and the coordinate value of the central point of the target nerve tube on the first coordinate axis on the target slice where the target sample point is located is within a first preset range;
if not, taking the target neural tube central point as the candidate target neural tube central point;
if yes, judging whether the central point of the target nerve tube meets the following conditions: the difference value between the coordinate value of the target neural tube center point on a second coordinate axis perpendicular to the first coordinate axis and the coordinate value of the target neural tube center point on the target slice where the target sample point is located is within a second preset range, and the difference value between the coordinate value of the target neural tube center point on a third coordinate axis perpendicular to the first coordinate axis and the coordinate value of the target neural tube center point on the target slice where the target sample point is located is within a third preset range;
If yes, taking the target neural tube central point as the candidate target neural tube central point;
if not, deleting the central point of the target nerve tube.
Therefore, through the operation, the center point of the target nerve tube with larger center line of the offset target nerve tube can be effectively deleted, so that the accuracy of the center line of the extracted target nerve tube is further ensured. It should be noted that, as will be understood by those skilled in the art, when the target nerve tube extends in the anterior-posterior direction of the human body (i.e., in the Y direction), for example, when the target nerve tube is a mandibular nerve tube, the first coordinate axis is the Y axis, the second coordinate axis is one of the X axis and the Z axis, and the third coordinate axis is the other of the X axis and the Z axis.
With continued reference to fig. 11, taking the target neural tube as a mandibular neural tube as an example, all extracted mandibular neural tube central points may be sequentially stored into the same central point set, and the index number i of the mandibular neural tube central point in the central point set starts from 0. Traversing the central point of the mandibular nerve tube from i=0, judging whether the difference value between the Y coordinate of the central point i of the mandibular nerve tube traversed currently and the Y coordinate of the corresponding target sample point is in a first preset range, and if not, taking the central point of the mandibular nerve tube as a candidate central point of the mandibular nerve tube; if yes, continuing to judge whether the central point i of the mandibular nerve tube meets the following conditions at the same time: the difference value between the X coordinate of the central point i of the mandibular nerve tube and the X coordinate of the corresponding target sample point is within a second preset range, the difference value between the Z coordinate of the central point i of the mandibular nerve tube and the Z coordinate of the corresponding target sample point is within a third preset range, and if the difference value is within the third preset range, the central point of the mandibular nerve tube is taken as a candidate central point of the mandibular nerve tube; if not, deleting the mandibular nerve tube center point from the center point set. Repeating the steps until all mandibular nerve tube center points in the center point set are traversed.
In an exemplary embodiment, the screening the candidate target neural tube center point satisfying the second preset condition from all the candidate target neural tube center points by using the second preset algorithm as a final target neural tube center point includes:
fitting a space curve according to the position information of the candidate target nerve tube center points to obtain corresponding space curves;
and judging whether the distance between the candidate target neural tube center point and the space curve is smaller than a third preset distance threshold value according to each candidate target neural tube center point, if so, taking the candidate target neural tube center point as a final target neural tube center point, and if not, deleting the candidate target neural tube center point.
Specifically, curve fitting may be performed on each candidate target neural tube center point by using a least square method, so as to fit a first spatial curve (for convenience of distinction, a spatial curve fitted according to each candidate target neural tube center point is represented by a first spatial curve), and after the first spatial curve fitting is completed, all candidate target neural tube center points are screened, where candidate target neural tube center points that deviate farther from the first spatial curve (i.e., a distance from the first spatial curve is greater than or equal to a third preset distance threshold) are removed. It should be noted that, as those skilled in the art can understand, reference may be made to the prior art for the related content of how to fit the first space curve by using the least square method, and no further description is given here.
In an exemplary embodiment, the obtaining the center line of the target nerve tube according to all the final target nerve tube center points includes:
and fitting a space curve according to the position information of the central point of each final target nerve tube so as to obtain the central line of the target nerve tube.
Specifically, a least square method may be used to perform space curve fitting on the central points of the final target nerve tubes, where the fitted second space curve (for convenience of distinguishing, the space curve fitted according to the central points of the final target nerve tubes is represented by the second space curve) is the central line of the target nerve tube. It should be noted that, as those skilled in the art can understand, reference may be made to the prior art for the related content of how to fit the second space curve by using the least square method, and no further description is given here.
Based on the same inventive concept, the present invention further provides an electronic device, please refer to fig. 12, as shown in fig. 12, the electronic device includes a
processor101 and a
memory103, the
memory103 stores a computer program, and when the computer program is executed by the
processor101, the neural tube marking method described above is implemented. Because the electronic device provided by the invention can implement the neural tube marking method provided by the invention, the electronic device provided by the invention has all the advantages of the neural tube marking method provided by the invention, and the description thereof can be referred to in the above, so that the description thereof will not be repeated here.
As shown in fig. 12, the electronic device further comprises a
communication interface102 and a
communication bus104, wherein the
processor101, the
communication interface102, and the
memory103 communicate with each other via the
communication bus104. The
communication bus104 may be a peripheral component interconnect standard (PeripheralComponentInterconnect, PCI) bus or an extended industry standard architecture (ExtendedIndustryStandardArchitecture, EISA) bus, among others. The
communication bus104 may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus. The
communication interface102 is used for communication between the electronic device and other devices.
The
processor101 of the present invention may be a central processing unit (CentralProcessingUnit, CPU), as well as other general purpose processors, digital signal processors (DigitalSignalProcessor, DSP), application specific integrated circuits (ApplicationSpecificIntegratedCircuit, ASIC), off-the-shelf programmable gate arrays (Field-ProgrammableGateArray, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the
processor101 is a control center of the electronic device, and connects various parts of the entire electronic device using various interfaces and lines.
The
memory103 may be used to store the computer program, and the
processor101 may implement various functions of the electronic device by running or executing the computer program stored in the
memory103 and invoking data stored in the
memory103.
The
memory103 may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The present invention also provides a readable storage medium having stored therein a computer program which, when executed by a processor, can implement the neural tube marking method described above. Since the readable storage medium provided by the present invention can implement the neural tube labeling method provided by the present invention, the readable storage medium provided by the present invention has all the advantages of the neural tube labeling method provided by the present invention, and the description thereof will be specifically referred to above, and thus will not be repeated here.
The readable storage media provided by embodiments of the present invention may take the form of any combination of one or more computer-readable media. The readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer hard disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In summary, compared with the prior art, the neural tube marking method, the electronic device and the readable storage medium provided by the invention have the following advantages:
the method comprises the steps of preprocessing an acquired three-dimensional medical image to be marked to acquire a target three-dimensional medical image comprising a target neural tube, and acquiring position information of a plurality of sample points on the target three-dimensional medical image, wherein one sample point is positioned in a starting end of the target neural tube, one sample point is positioned in a ending end of the target neural tube, the plurality of sample points are positioned in different sections of the target neural tube, and acquiring a slice sequence of the target three-dimensional medical image along a position corresponding to the extending direction of the target neural tube; then selecting a slice including the target neural tube from the slice sequence as a target slice based on the position information of the sample point located in the starting end of the target neural tube and the position information of the sample point located in the ending end of the target neural tube; extracting the center point of the target nerve tube from each layer of the target slice layer by layer according to the sample points so as to obtain the center line of the target nerve tube; finally, marking the target neural tube on the three-dimensional medical image to be marked or the target three-dimensional medical image according to the central line of the target neural tube. Therefore, the invention can take the acquired plurality of sample points positioned in the target nerve tube as priori knowledge, effectively ensure the accuracy of the extracted central point of the target nerve tube, further improve the accuracy of the target nerve tube marking, and effectively improve the safety and reliability in the operation process. In addition, compared with the marking method adopting machine learning in the prior art, the method does not depend on earlier training data and model training, has short time consumption and high accuracy, can reduce the pre-operation planning time, and improves the safety and reliability in the operation process. In addition, the present invention can further improve the labeling efficiency by selecting a target slice to extract the central point of the target nerve tube based on the positional information of the sample point located in the starting end of the target nerve tube and the positional information of the sample point located in the ending end of the target nerve tube.
It should be noted that computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages, as will be appreciated by those skilled in the art. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It should be noted that the apparatus and methods disclosed in the embodiments herein may be implemented in other ways. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments herein. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, the functional modules in the embodiments herein may be integrated together to form a single part, or the modules may exist alone, or two or more modules may be integrated to form a single part.
The above description is only illustrative of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention, and any alterations and modifications made by those skilled in the art based on the above disclosure shall fall within the scope of the present invention. It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, the present invention is intended to include such modifications and alterations insofar as they come within the scope of the invention or the equivalents thereof.