CN110021053B - Image positioning method and device based on coordinate transformation, storage medium and equipment - Google Patents

Image positioning method and device based on coordinate transformation, storage medium and equipment Download PDF

Info

Publication number
CN110021053B
CN110021053B CN201910301518.1A CN201910301518A CN110021053B CN 110021053 B CN110021053 B CN 110021053B CN 201910301518 A CN201910301518 A CN 201910301518A CN 110021053 B CN110021053 B CN 110021053B
Authority
CN
China
Prior art keywords
target
coordinate
coordinate system
dcm
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201910301518.1A
Other languages
Chinese (zh)
Other versions
CN110021053A (en
Inventor
范振增
杨利军
李滨
杨亮
李潮激
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Second Hospital of Hebei Medical University
Original Assignee
Second Hospital of Hebei Medical University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Second Hospital of Hebei Medical University filed Critical Second Hospital of Hebei Medical University
Priority to CN201910301518.1A priority Critical patent/CN110021053B/en
Publication of CN110021053A publication Critical patent/CN110021053A/en
Application granted granted Critical
Publication of CN110021053B publication Critical patent/CN110021053B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/003Reconstruction from projections, e.g. tomography
    • G06T11/005Specific pre-processing for tomographic reconstruction, e.g. calibration, source positioning, rebinning, scatter correction, retrospective gating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/41Medical

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Apparatus For Radiation Diagnosis (AREA)
  • Magnetic Resonance Imaging Apparatus (AREA)

Abstract

The invention provides an image positioning method, device, storage medium and equipment based on coordinate transformation, which comprises the steps of obtaining a DCM file sequence of a preset CT or MRI, and selecting a target working set from the file sequence according to serial number information and/or example number information of each DCM file in the DCM file sequence; establishing a three-dimensional model based on DCM files in the target working set; determining key position points including the position point of the target object in the horizontal position view, the sagittal position view and the coronal position view of the three-dimensional model, and establishing a target coordinate system based on the key position points; converting the original coordinate data of each key position point into a target coordinate value in a target coordinate system; the target coordinate values of all points on the sagittal section and the coronal section of the target object in the target coordinate system are converted into the original coordinate values of all points in the DCM file, the target object is positioned according to the original coordinate values of all points, and the image positioning of the target object can be efficiently and accurately realized.

Description

Image positioning method and device based on coordinate transformation, storage medium and equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image positioning method and apparatus, a storage medium, and a device based on coordinate transformation.
Background
CT or MRI belong to higher-level imaging examinations, wherein CT is the imaging by X-ray tomography in a computer; MRI is the generation of localized images by magnetic resonance oscillations. CT is at the flat scan slice; MRI is then possible with transverse longitudinal scanning, longitudinally cutting. In the prior art, only the original CT or MRI scanning film is usually relied on for rough measurement positioning; or by placing markers and scanning the coarse positioning again, not only is the patient re-irradiated, the cost is increased, and errors tend to occur.
A CT or MRI image may be considered as a matrix of CT or MRI values, where each value represents a pixel, and each pixel corresponds to a fixed three-dimensional coordinate. Although the post-processing workstations for CT or MRI images are very abundant, the number of CT or MRI images is not standardized due to the operation of technicians, the body position of patients, and the like. It is important to provide a simple and easy method for accurate image localization in CT or MRI.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a simple, convenient and accurate image positioning method based on coordinate transformation with strong popularization and application.
In one aspect of the present invention, an image positioning method based on coordinate transformation is provided, which includes the following steps:
acquiring a DCM file sequence of a preset CT or MRI, wherein each DCM file in the DCM data sequence is configured with sequence number information and example number information, the sequence number information is used for identifying the observation angle of the DCM file, and the example number information is used for identifying the acquisition sequence of the DCM file;
selecting a target working set from the DCM file sequence according to the serial number information and/or the example number information of each DCM file in the DCM file sequence;
establishing a three-dimensional model based on the DCM files in the target working set;
determining key position points including the position points of the target object in a horizontal view, a sagittal view and a coronal view of the three-dimensional model, and establishing a target coordinate system based on the key position points;
converting the original coordinate data of each key position point according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system;
generating a sagittal section and a coronal section of the target object under the target coordinate system;
converting the target coordinate values of the points on the sagittal section and the coronal section in a target coordinate system into original coordinate values of the points in the DCM file by adopting an inverse matrix of the coordinate transformation matrix;
and positioning the target object according to the original coordinate values of the points on the sagittal tangent plane and the coronal tangent plane in the DCM file.
Optionally, the positioning the target object according to the original coordinate values of the points on the sagittal section and the coronal section in the DCM file includes:
calculating first positioning information for positioning the target object according to the original coordinate values of the points on the sagittal section in the DCM file;
and calculating second positioning information for positioning the target object according to the original coordinate values of the points on the coronal section in the DCM file.
Optionally, when the DCM file is a cephaloscan data file, the key location points include a left outer canthus, a right outer canthus, a left external ear canal, a right external ear canal, a forebrain sickle, a hindbrain sickle, and a target subject;
correspondingly, the determining key position points including the position point of the target object in the horizontal view, the sagittal view and the coronal view of the three-dimensional model, and establishing a target coordinate system based on the key position points includes:
and taking the z-0 reference plane of a target coordinate system formed by the left outer canthus, the right outer canthus, the left outer ear canal and the right outer ear canal, forming an x-axis by a connecting line of the left outer canthus and the right outer canthus, taking a midpoint of the connecting line as an origin of the target coordinate system, and determining a y-axis of the target coordinate system according to the x-axis and the x-axis of the origin position.
Optionally, after the original coordinate data of each key position point is converted according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system, the method further includes:
calculating an average value OffsetX of x coordinate values of the forebrain sickle and the hindbrain sickle in the target coordinate system;
according to the offset X, carrying out X coordinate value T on the target object in the target coordinate systemXAnd (3) correcting:
T′x=Tx+OffsetX
wherein, TX' is a corrected x-coordinate value of the target object in the target coordinate system.
Optionally, the coordinate transformation matrix M is specifically:
Figure BSA0000181814620000031
wherein,
Figure BSA0000181814620000032
is the origin of the target coordinate system; the x-axis is directed to the right,
Figure BSA0000181814620000033
is the x-axis direction vector; the y-axis is forward of the machine,
Figure BSA0000181814620000034
is a y-axis direction vector; the z-axis is upward, and the axis,
Figure BSA0000181814620000035
is the z-axis direction vector.
In another aspect of the present invention, there is provided an image positioning apparatus based on coordinate transformation, including:
the data acquisition module is used for acquiring a preset DCM file sequence of CT or MRI, each DCM file in the DCM data sequence is configured with serial number information and example number information, wherein the serial number information is used for identifying the observation angle of the DCM file, and the example number information is used for identifying the acquisition sequence of the DCM file;
the data selection module is used for selecting a target working set from the DCM file sequence according to the serial number information and/or the example number information of each DCM file in the DCM file sequence;
the three-dimensional model building module is used for building a three-dimensional model based on the DCM files in the target working set;
the coordinate conversion module is used for determining key position points including the position points of the target object in a horizontal view, a sagittal view and a coronal view of the three-dimensional model and establishing a target coordinate system based on the key position points;
the first calculation module is used for converting the original coordinate data of each key position point according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system;
a section generation module for generating a sagittal section and a coronal section of the target object in the target coordinate system;
the second calculation module is used for converting the target coordinate values of the points on the sagittal section and the coronal section in a target coordinate system into the original coordinate values of the points in the DCM file by adopting the inverse matrix of the coordinate transformation matrix;
and the positioning processing module is used for positioning the target object according to the original coordinate values of the points on the sagittal section and the coronal section in the DCM file.
Optionally, the positioning processing module is specifically configured to calculate first positioning information for positioning the target object according to an original coordinate value of each point on the sagittal section in the DCM file; and calculating second positioning information for positioning the target object according to the original coordinate values of the points on the coronal section in the DCM file.
Optionally, when the DCM file is a cephaloscan data file, the key location points include a left outer canthus, a right outer canthus, a left external ear canal, a right external ear canal, a forebrain sickle, a hindbrain sickle, and a target subject;
correspondingly, the coordinate conversion module is specifically configured to use the z-0 reference plane of the target coordinate system formed by the left outer canthus, the right outer canthus, the left outer ear canal, and the right outer ear canal, use a connection line of the left outer canthus and the right outer canthus to form an x-axis, use a midpoint of the connection line as an origin of the target coordinate system, and determine a y-axis of the target coordinate system according to the x-axis and the x-axis of the origin position.
Furthermore, the invention also provides a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method as described above.
Furthermore, the present invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method as described above when executing the program.
The image positioning method and device based on coordinate transformation directly call the DCM file sequence of CT or MRI, can efficiently and accurately realize the image positioning of the target object by carrying out three-dimensional modeling and coordinate transformation on the DCM file sequence, have small positioning integral error and high precision, and can obtain the positioning result of the target object only in minutes.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic flowchart of an image positioning method based on coordinate transformation according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a location point selection using a right external auditory meatus as an example in the embodiment of the present invention;
FIG. 3 is a sagittal section of an image positioning method based on coordinate transformation according to an embodiment of the present invention;
FIG. 4 is a coronal section of an image positioning method based on coordinate transformation according to an embodiment of the present invention;
FIG. 5 is a sagittal section with a contour line as set forth in the embodiment of the invention;
FIG. 6 is a coronal section with a contour as set forth in the exemplary embodiment of the present invention;
fig. 7 is a block diagram of an image positioning apparatus based on coordinate transformation according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Fig. 1 schematically shows a flowchart of an image positioning method based on coordinate transformation according to an embodiment of the present invention. Referring to fig. 1, the image positioning method based on coordinate transformation provided by the embodiment of the present invention specifically includes steps S11 to S18, as follows:
s11, obtaining a preset DCM file sequence of CT or MRI, wherein each DCM file in the DCM data sequence is configured with serial number information and example number information, the serial number information is used for identifying the observation angle of the DCM file, and the example number information is used for identifying the collection sequence of the DCM file.
The image positioning method based on coordinate transformation provided by the embodiment of the invention is deployed based on a cloud platform, is used in a browser, and acquires a DCM file sequence of CT or MRI preset by a user through an internet technology based on the cloud platform so as to perform 3D modeling.
S12, selecting a target working set from the DCM file sequence according to the serial number information and/or the instance number information of each DCM file in the DCM file sequence.
S13, establishing a three-dimensional model based on the DCM files in the target working set;
and S14, determining key position points including the position point of the target object in the horizontal view, the sagittal view and the coronal view of the three-dimensional model, and establishing a target coordinate system based on the key position points.
In a specific embodiment, when the DCM file is a cephaloscan data file, the key location points include left outer canthus, right outer canthus, left external ear canal, right external ear canal, forebrain sickle, hindbrain sickle, and target subject;
correspondingly, determining key position points including the position point of the target object in the horizontal view, the sagittal view and the coronal view of the three-dimensional model, and establishing a target coordinate system based on the key position points specifically comprises:
and taking the z-0 reference plane of a target coordinate system formed by the left outer canthus, the right outer canthus, the left outer ear canal and the right outer ear canal, forming an x-axis by a connecting line of the left outer canthus and the right outer canthus, taking a midpoint of the connecting line as an origin of the target coordinate system, and determining a y-axis of the target coordinate system according to the x-axis and the x-axis of the origin position.
And S15, converting the original coordinate data of each key position point according to a preset coordinate transformation matrix to obtain the target coordinate value of each key position point in the target coordinate system.
The coordinate transformation matrix M specifically includes:
Figure BSA0000181814620000061
wherein,
Figure BSA0000181814620000071
is the origin of the target coordinate system; the x-axis is directed to the right,
Figure BSA0000181814620000072
is the x-axis direction vector; the y-axis is forward of the machine,
Figure BSA0000181814620000073
is a y-axis direction vector; the z-axis is upward, and the axis,
Figure BSA0000181814620000074
is the z-axis direction vector.
Further, after the original coordinate data of each key position point is converted according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system, the method further includes:
calculating an average value OffsetX of x coordinate values of the forebrain sickle and the hindbrain sickle in the target coordinate system;
according to the offset X, carrying out X coordinate value T on the target object in the target coordinate systemXAnd (3) correcting:
T′x=Tx+OffsetX
wherein, TX' is a corrected x-coordinate value of the target object in the target coordinate system.
And S16, generating a sagittal section and a coronal section of the target object under the target coordinate system.
And S17, converting the target coordinate values of the points on the sagittal section and the coronal section in the target coordinate system into the original coordinate values of the points in the DCM by using the inverse matrix of the coordinate transformation matrix.
Wherein an inverse matrix M of the coordinate transformation matrix-1The method specifically comprises the following steps:
Figure BSA0000181814620000075
s18, positioning the target object according to the original coordinate values of the points on the sagittal section and the coronal section in the DCM file.
The specific implementation steps of the step comprise the following contents: calculating first positioning information for positioning the target object according to the original coordinate values of the points on the sagittal section in the DCM file; and calculating second positioning information for positioning the target object according to the original coordinate values of the points on the coronal section in the DCM file.
The image positioning method based on coordinate transformation directly calls the DCM file sequence of CT or MRI, can efficiently and accurately realize the image positioning of the target object by carrying out three-dimensional modeling and coordinate transformation on the DCM file sequence, has small positioning overall error and high precision, and can obtain the positioning result of the target object only in minutes.
The following describes the image positioning method based on coordinate transformation in detail by taking DCM file of the skull CT or MRI scan data as an example.
Two types of the two methods are performed, the key points include the left outer canthus, the right outer canthus, the left external ear canal, the right external ear canal, the forebrain sickle, the hindbrain sickle and the target object
Firstly, a mathematical model is established:
a DCM image file is prepared, 3D modeling is carried out, and 3 views such as a horizontal position, a sagittal position, a coronal position and the like and 3D views are created. 3D rendering helps to understand the structure of the whole detected object, and the final point selection operation is completed in 3 views.
Each detected object has its own DCM file sequence (i.e. DCM directory), and there is one dcmlist. Json is generated by an automated tool, dcm2PNG, which automatically scans the dcm file in the directory, converts dcm to a PNG file, and writes the dcm information to the dcm.
Each DCM picture has a serial Number series Number and an Instance Number instant Number. DCM pictures of the same sequence number are generally at the same angle, such as a horizontal section. However, sometimes, the pictures in the same sequence cannot be completely used for 3D reconstruction, and the pictures in a certain range need to be manually designated as a working set meeting the conditions according to the sorting of the example numbers. DCM pictures of the same working set must satisfy the following conditions: the horizontal sectional view is needed, the size is consistent, the x and y values of the upper left point of the picture are required to be close, the horizontal and longitudinal pixelsacing are required to be consistent, the z value of each layer is increased or decreased, and the distance between the layers is uniform. After the working sets are created, one can be selected for 3D reconstruction, with all subsequent operations occurring within the working set.
Next, key location points are selected:
fig. 2 is a schematic diagram of location point selection taking the right external auditory meatus as an example, and after a working set is selected for 3D reconstruction, 7 location points, namely, the left outer canthus, the right outer canthus, the left external ear canal, the right external ear canal, the forebrain sickle, the hindbrain sickle and the target point, need to be found from cross sections of 3 angles, such as horizontal position, sagittal position, and coronal position. The first 4 position points have obvious marks, are easy to select in the image, and are easy for the body surface to find corresponding points. The reference plane of the new coordinate system is established at the 4 position points, and the midpoint of the left outer canthus and the right outer canthus is taken as the origin. For correction, it is necessary to additionally provide location points of the anterior and posterior brain sickles for correcting the origin position, since the origin position determines the accuracy of the over-frontal midline tangent plane.
Subsequently, coordinate conversion is performed:
the DCM file contains data for each slice and has the original coordinate information of the slice, which is related to the device. Because we need to convert it into a clinically meaningful coordinate system, it is easy to understand and calculate, and it is also easy to calculate the required tangent plane.
The pixel points of the section of the scanning layer have corresponding physical point distances, and in order to calculate the accuracy, the x point distance and the y point distance (pixel Spacing) are required to be consistent. In addition, the z-coordinate values of the slice planes of the layers must also be evenly spaced. The new coordinate system takes the glabella as an origin, and the glabella is difficult to determine in a CT scanning film, and the specific method comprises the steps of finding out two outer canthus points, then taking the middle point of the two outer canthus points, taking the connecting line of two eyes as an x axis, and determining the plane of the outer canthus and an external auditory hole, wherein the z is 0. The plane where x is 0 is the sagittal section of the prefrontal midline. Let the target coordinate be (t)x,ty,tz) Then y is tyIs a coronal section of the target.
In order to calculate the coordinate transformation matrix, the original coordinate system needs to be simplified: the upper left corner x and y of each layer of scanning film is 0, the scanning film z at the bottommost layer is 0, the z of each layer is increased progressively, and the original coordinate system and the new coordinate system both take pixel points as units, so that the picture is convenient to cut.
The algorithm of the transformation matrix from the original coordinate system to the new coordinate system is as follows:
the x axis of the new coordinate system is to the right, and the direction is recorded as a vector
Figure BSA0000181814620000091
Can be obtained by normalizing the right outer canthus minus the left outer canthus coordinate; the y-axis is forward and the direction is noted
Figure BSA0000181814620000092
Can be obtained by subtracting the midpoint of the two auricles from the midpoint of the two outer canthus; in the z-axis direction, in the direction of
Figure BSA0000181814620000093
Normalized after dot product and is recorded as
Figure BSA0000181814620000094
The origin of the new coordinate system is the midpoint of the two outer canthus and is marked as
Figure BSA0000181814620000095
Then the transformation matrix from the original coordinate system to the new coordinate system is:
Figure BSA0000181814620000096
and the coordinate transformation of each position point can be carried out through the matrix M to obtain the value of a new coordinate system. The x-coordinate values of the anterior and posterior sickle points should be close to 0, since these two points should be on the frontal midline tangent plane, which is on x-0. Therefore, we must correct the origin of the new coordinate system according to the X coordinates of the two points, let OffsetX be the average of the X coordinates of the two sickle points, then T'x=Tx+ OffsetX. With this adjustment, the sagittal section of the frontal midline should pass through or be closest to the two sickle points.
The basic idea of obtaining the tangent plane is as follows: the coordinate values of each point on the given section in the new coordinate system are inversely mapped to the original coordinate system, and the position of each point in the original scanning sheet can be known, so that the pixel value of each point can be obtained.
And (3) an algorithm of a transformation matrix from the new coordinate system to the original coordinate system, wherein the transformation matrix from the new coordinate system to the original coordinate system is the inverse of M:
Figure BSA0000181814620000101
as shown in fig. 3, the sagittal section is defined as 500x500 in the plane x-0 and the upper left point (x-0, y-100, z-300). And mapping the points of the region into an original coordinate system to obtain an original pixel value. As shown in fig. 4, the coronal section is on the plane y ═ TargetY, where TargetY is the y coordinate value of the target point in the new coordinate system. The size is also set to 500x 500. The upper left point is (x-TargetX-200, y-TargetY, z-300).
Then, contour line extraction and length calculation are carried out:
the boundary line between the sagittal section and the skull surface is the first contour line for determining the target point, the boundary line between the coronal section and the skull surface is the second contour line, and the depth is the distance between the end point of the second contour line on the skull surface and the target point.
Specifically, after obtaining two sagittal section and coronal section, two frontal top contour lines are extracted from the sectional view, and the first contour line is in the sagittal section. As shown in FIG. 5, the horizontal line crosses the center of the brow, parallel to the reference plane, with a z-coordinate of 0. The vertical line is y, TargetY, the target point is over the vertical red line, and the target point is perpendicular to the tangent plane. Therefore, the skull contour line of the left upper part marked by the two lines is the required first-section forehead positioning route.
As shown in FIG. 6, the second contour line is in the coronal section, the horizontal line passes through the target point, the vertical line also passes through the target point, and the contour line of the vertex is the second positioning route we want. On the cranial surface, the arc should be at a 90 degree angle to the first arc.
The principle of selecting contour points is as follows: the lower 45-degree area takes a transverse extension point, the upper 45-degree area uses a longitudinal extension point, a certain interval is needed when the length of the contour line is calculated, and the interval is preferably 2-4 pixel points.
And (3) performing error estimation, wherein if the thickness of the epidermis is t (not appearing in the image), the epidermis is considered to be an arc approximation calculation, and the radian is theta, the error is: θ (r + t) - θ r ═ θ t, that is, if the arc is 90 °, the error is about 1.57 times the thickness of the epidermis, the larger the arc, the larger the error. In order to verify the calculation result, the section diagram is printed, the distance of the contour line is measured by a flexible rule, then the real distance is calculated according to the scale on the diagram, and the thickness of the epidermis can be taken into account by manually drawing the contour line. After the calculation result is verified, the contour is corrected by using the estimated error.
Finally, summarizing the calculation results:
the calculation results of the positioning software at the user side include: new coordinate values of 7 position points; calculating a temporal side positioning result according to the coordinate value relation between the target point and the ear hole; the result of the frontal centerline positioning, including the length of the sagittal bit line, the length of the coronal bit line, and the depth; two section diagrams, wherein contour lines and a scale are marked on the diagrams; and outputting the program log.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Fig. 7 is a block diagram schematically illustrating a structure of an image positioning apparatus based on coordinate transformation according to an embodiment of the present invention. Referring to fig. 7, the image positioning apparatus based on coordinate transformation according to the embodiment of the present invention specifically includes a data obtaining module 201, a data selecting module 202, a three-dimensional model building module 203, a coordinate transformation module 204, a first calculating module 205, a tangent plane generating module 206, a second calculating module 207, and a positioning processing module 208, where:
the data acquisition module 201 is configured to acquire a preset DCM file sequence of CT or MRI, where each DCM file in the DCM data sequence is configured with sequence number information and instance number information, where the sequence number information is used to identify an observation angle of the DCM file, and the instance number information is used to identify an acquisition order of the DCM file;
a data selecting module 202, configured to select a target working set from the DCM file sequence according to sequence number information and/or instance number information of each DCM file in the DCM file sequence;
a three-dimensional model building module 203, configured to build a three-dimensional model based on the DCM file in the target working set;
a coordinate transformation module 204, configured to determine a key position point including a target object position point in a horizontal view, a sagittal view, and a coronal view of the three-dimensional model, and establish a target coordinate system based on the key position point;
the first calculating module 205 is configured to convert original coordinate data of each key position point according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system;
a tangent plane generating module 206, configured to generate a sagittal tangent plane and a coronal tangent plane of the target object in the target coordinate system;
a second calculating module 207, configured to convert the target coordinate values of the points on the sagittal section and the coronal section in the target coordinate system into the original coordinate values of the points in the DCM file by using an inverse matrix of the coordinate transformation matrix;
and the positioning processing module 208 is configured to position the target object according to the original coordinate values of the points on the sagittal tangent plane and the coronal tangent plane in the DCM file.
In this embodiment of the present invention, the positioning processing module 208 is specifically configured to calculate first positioning information for positioning the target object according to an original coordinate value of each point on the sagittal section in the DCM file; and calculating second positioning information for positioning the target object according to the original coordinate values of the points on the coronal section in the DCM file.
In an embodiment of the present invention, when the DCM file is a skull scan data file, the key location points include a left outer canthus, a right outer canthus, a left external ear canal, a right external ear canal, a forebrain sickle, a hindbrain sickle, and a target subject;
correspondingly, the coordinate conversion module 204 is specifically configured to use the z-0 reference plane of the target coordinate system formed by the left outer canthus, the right outer canthus, the left outer ear canal, and the right outer ear canal, use a connection line of the left outer canthus and the right outer canthus to form an x-axis, use a middle point of the connection line as an origin of the target coordinate system, and determine a y-axis of the target coordinate system according to the x-axis and the x-axis of the origin position.
In the embodiment of the present invention, in the first calculating module 205, after the original coordinate data of each key position point is converted according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system, the first calculating module is further configured to calculate an average value OffsetX of x coordinate values of the forebrain sickle and the hindbrain sickle in the target coordinate system; according to the offset X, carrying out X coordinate value T on the target object in the target coordinate systemXAnd (3) correcting: t'x=Tx+OffsetX
Wherein, TX' is a corrected x-coordinate value of the target object in the target coordinate system.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The image positioning method and device based on coordinate transformation directly call the DCM file sequence of CT or MRI, can efficiently and accurately realize the image positioning of the target object by carrying out three-dimensional modeling and coordinate transformation on the DCM file sequence, have small positioning integral error and high precision, and can obtain the positioning result of the target object only in minutes.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method as described above.
In this embodiment, the module/unit integrated with the image positioning apparatus based on coordinate transformation may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The electronic device provided by the embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the steps in the above-mentioned embodiments of the image location method based on coordinate transformation, such as S11 to S18 shown in fig. 1. Alternatively, the processor implements the functions of the modules/units in the coordinate transformation-based image positioning apparatus embodiments when executing the computer program, such as the data acquiring module 201, the data selecting module 202, the three-dimensional model constructing module 203, the coordinate transformation module 204, the first calculating module 205, the tangent plane generating module 206, the second calculating module 207, and the positioning processing module 208 shown in fig. 7.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the coordinate transformation-based image positioning apparatus. For example, the computer program may be divided into a data acquisition module 201, a data selection module 202, a three-dimensional model construction module 203, a coordinate conversion module 204, a first calculation module 205, a tangent plane generation module 206, a second calculation module 207, and a positioning processing module 208.
The electronic device may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing device. The electronic device may include, but is not limited to, a processor, a memory. Those skilled in the art will appreciate that the electronic device in this embodiment may include more or fewer components, or combine certain components, or different components, for example, the electronic device may also include an input-output device, a network access device, a bus, etc.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is the control center for the electronic device and that connects the various parts of the overall electronic device using various interfaces and wires.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the electronic device by running or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than others, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (7)

1. An image positioning method based on coordinate transformation is characterized by comprising the following steps:
acquiring a DCM file sequence of a preset CT or MRI, wherein each DCM file in the DCM data sequence is configured with sequence number information and example number information, the sequence number information is used for identifying the observation angle of the DCM file, and the example number information is used for identifying the acquisition sequence of the DCM file;
selecting a target working set from the DCM file sequence according to the serial number information and/or the example number information of each DCM file in the DCM file sequence;
establishing a three-dimensional model based on the DCM files in the target working set;
determining key position points including the position points of the target object in a horizontal view, a sagittal view and a coronal view of the three-dimensional model, and establishing a target coordinate system based on the key position points;
converting the original coordinate data of each key position point according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system;
generating a sagittal section and a coronal section of the target object under the target coordinate system;
converting the target coordinate values of the points on the sagittal section and the coronal section in a target coordinate system into original coordinate values of the points in the DCM file by adopting an inverse matrix of the coordinate transformation matrix;
positioning the target object according to the original coordinate values of the points on the sagittal tangent plane and the coronal tangent plane in the DCM file;
when the DCM file is a skull scan data file, the key location points include a left outer canthus, a right outer canthus, a left external ear canal, a right external ear canal, a forebrain sickle, a hindbrain sickle, and a target subject;
correspondingly, determining key position points including the position point of the target object in the horizontal view, the sagittal view and the coronal view of the three-dimensional model, and establishing a target coordinate system based on the key position points comprises the following steps:
taking a z-0 reference plane of a target coordinate system formed by the left outer canthus, the right outer canthus, the left outer ear canal and the right outer ear canal, forming an x-axis by a connecting line of the left outer canthus and the right outer canthus, taking a midpoint of the connecting line as an origin of the target coordinate system, and determining a y-axis of the target coordinate system according to the x-axis and the x-axis of the origin position;
after the original coordinate data of each key position point is converted according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system, the method further comprises the following steps:
calculating an average value OffsetX of x coordinate values of the forebrain sickle and the hindbrain sickle in the target coordinate system;
according to the offset X, carrying out X coordinate value T on the target object in the target coordinate systemXAnd (3) correcting:
T′x=Tx+OffsetX
wherein, TX' is a corrected x-coordinate value of the target object in the target coordinate system.
2. The coordinate-transformation-based image positioning method of claim 1, wherein the positioning the target object according to the original coordinate values of the points on the sagittal and coronal planes in the DCM file comprises:
calculating first positioning information for positioning the target object according to the original coordinate values of the points on the sagittal section in the DCM file;
and calculating second positioning information for positioning the target object according to the original coordinate values of the points on the coronal section in the DCM file.
3. The image localization method based on coordinate transformation according to claim 1, wherein the coordinate transformation matrix M is specifically:
Figure FDA0002321684450000021
wherein,
Figure FDA0002321684450000022
is the origin of the target coordinate system; the x-axis is directed to the right,
Figure FDA0002321684450000023
is the x-axis direction vector; the y-axis is forward of the machine,
Figure FDA0002321684450000024
is a y-axis direction vector; the z-axis is upward, and the axis,
Figure FDA0002321684450000025
is the z-axis direction vector.
4. An image positioning device based on coordinate transformation, characterized by comprising the following steps:
the data acquisition module is used for acquiring a preset DCM file sequence of CT or MRI, each DCM file in the DCM data sequence is configured with serial number information and example number information, wherein the serial number information is used for identifying the observation angle of the DCM file, and the example number information is used for identifying the acquisition sequence of the DCM file;
the data selection module is used for selecting a target working set from the DCM file sequence according to the serial number information and/or the example number information of each DCM file in the DCM file sequence;
the three-dimensional model building module is used for building a three-dimensional model based on the DCM files in the target working set;
the coordinate conversion module is used for determining key position points including the position points of the target object in a horizontal view, a sagittal view and a coronal view of the three-dimensional model and establishing a target coordinate system based on the key position points;
the first calculation module is used for converting the original coordinate data of each key position point according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system;
a section generation module for generating a sagittal section and a coronal section of the target object in the target coordinate system;
the second calculation module is used for converting the target coordinate values of the points on the sagittal section and the coronal section in a target coordinate system into the original coordinate values of the points in the DCM file by adopting the inverse matrix of the coordinate transformation matrix;
the positioning processing module is used for positioning the target object according to the original coordinate values of the points on the sagittal section and the coronal section in the DCM file;
when the DCM file is a skull scan data file, the key location points include a left outer canthus, a right outer canthus, a left external ear canal, a right external ear canal, a forebrain sickle, a hindbrain sickle, and a target subject;
correspondingly, the coordinate conversion module is specifically configured to use a z-0 reference plane of a target coordinate system formed by the left outer canthus, the right outer canthus, the left outer ear canal, and the right outer ear canal, use a connection line of the left outer canthus and the right outer canthus to form an x-axis, use a midpoint of the connection line as an origin of the target coordinate system, and determine a y-axis of the target coordinate system according to the x-axis and the x-axis of the origin position;
the first calculating module 205 is configured to, after converting the original coordinate data of each key position point according to a preset coordinate transformation matrix to obtain a target coordinate value of each key position point in the target coordinate system, calculate an average value OffsetX of x coordinate values of the forebrain sickle and the hindbrain sickle in the target coordinate system; according to the offset X, carrying out X coordinate value T on the target object in the target coordinate systemXCorrected for T'x=Tx+OffsetX
Wherein, TX' is a corrected x-coordinate value of the target object in the target coordinate system.
5. The image positioning apparatus based on coordinate transformation as claimed in claim 4, wherein the positioning processing module is specifically configured to calculate first positioning information for positioning the target object according to original coordinate values of points on the sagittal section in the DCM file; and calculating second positioning information for positioning the target object according to the original coordinate values of the points on the coronal section in the DCM file.
6. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 3.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1-3 are implemented when the processor executes the program.
CN201910301518.1A 2019-04-16 2019-04-16 Image positioning method and device based on coordinate transformation, storage medium and equipment Expired - Fee Related CN110021053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910301518.1A CN110021053B (en) 2019-04-16 2019-04-16 Image positioning method and device based on coordinate transformation, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910301518.1A CN110021053B (en) 2019-04-16 2019-04-16 Image positioning method and device based on coordinate transformation, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN110021053A CN110021053A (en) 2019-07-16
CN110021053B true CN110021053B (en) 2020-05-15

Family

ID=67191414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910301518.1A Expired - Fee Related CN110021053B (en) 2019-04-16 2019-04-16 Image positioning method and device based on coordinate transformation, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN110021053B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110675481B (en) * 2019-09-26 2020-07-17 慧影医疗科技(北京)有限公司 Image interaction linkage method and device and readable storage medium
CN111354073A (en) * 2019-12-23 2020-06-30 首都医科大学附属北京友谊医院 Construction method, spatial positioning method and equipment of unilateral temporal bone spatial coordinate system
CN110969698A (en) * 2019-12-23 2020-04-07 首都医科大学附属北京友谊医院 Construction method of temporal bone space coordinate system, space positioning method and electronic equipment
CN112767233B (en) * 2021-01-07 2023-02-03 中电云脑(天津)科技有限公司 Focal three-dimensional imaging method and system based on Dicom3d player
CN112837363B (en) * 2021-02-03 2022-09-30 上海交通大学 Stereotactic frame positioning method and system, medium and terminal
CN113189562B (en) * 2021-07-02 2021-09-07 成都众享天地网络科技有限公司 Terrain detection algorithm based on elevation
CN113822923A (en) * 2021-09-22 2021-12-21 柏意慧心(杭州)网络科技有限公司 Method, apparatus and medium for acquiring target sectional image of blood vessel
CN114255329A (en) * 2021-11-19 2022-03-29 苏州微创畅行机器人有限公司 ROI automatic positioning method and device, surgical robot system, equipment and medium
CN116228967A (en) * 2022-12-30 2023-06-06 上海时代天使医疗器械有限公司 Multi-plane reconstruction method, device, equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101692286A (en) * 2009-09-15 2010-04-07 上海交通大学 Method for acquiring three-view drawing of medical image
CN101872470A (en) * 2010-05-30 2010-10-27 李滨 Correction and target point positioning method of CT or MRI image
CN107595370A (en) * 2017-09-14 2018-01-19 孙树杰 People's encephalic cube localization method
CN107595287A (en) * 2017-09-21 2018-01-19 燕山大学 It is a kind of that carp magnetic resonance imaging Coordinate Conversion is sat into calibration method for Naoliqing capsule

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915992A (en) * 2015-06-15 2015-09-16 上海应用技术学院 A real-time shadow volume rendering method based on femur CT images
CN106803251B (en) * 2017-01-12 2019-10-08 西安电子科技大学 The apparatus and method of aortic coaractation pressure difference are determined by CT images

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101692286A (en) * 2009-09-15 2010-04-07 上海交通大学 Method for acquiring three-view drawing of medical image
CN101872470A (en) * 2010-05-30 2010-10-27 李滨 Correction and target point positioning method of CT or MRI image
CN107595370A (en) * 2017-09-14 2018-01-19 孙树杰 People's encephalic cube localization method
CN107595287A (en) * 2017-09-21 2018-01-19 燕山大学 It is a kind of that carp magnetic resonance imaging Coordinate Conversion is sat into calibration method for Naoliqing capsule

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Brain atlas of the Mongolian gerbil (Meriones unguiculatus) in CTMRI-aided stereotaxic coordinates;Susanne Radtke-Schuller等;《Brain Struct Funct》;20161231;第1页 *
利用影像数据坐标转换定位头颅外体表标志与颅内靶点关系;李滨等;《河北医科大学学报》;20121130;第33卷(第11期);第1-3节 *
基于MC算法的医学图象三维重建关键技术研究;王金川;《中国优秀硕士学位论文全文数据库信息科技辑》;20121215(第12期);第2.2节 *

Also Published As

Publication number Publication date
CN110021053A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110021053B (en) Image positioning method and device based on coordinate transformation, storage medium and equipment
CN107833248B (en) Medical image scanning method and medical imaging equipment
CN111028205B (en) Eye pupil positioning method and device based on binocular distance measurement
US20210374452A1 (en) Method and device for image processing, and elecrtonic equipment
CN109493943B (en) Three-dimensional visual scalp craniotomy positioning method combined with optical surgical navigation
CN112258640B (en) Skull model building method and device, storage medium and electronic equipment
WO2022089053A1 (en) Method and apparatus for determining skull six-view datum plane, storage medium and electronic device
CN110169823A (en) Ultrasonic probe scaling method, device, terminal and storage medium
CN112515767B (en) Surgical navigation device, surgical navigation apparatus, and computer-readable storage medium
CN104771189A (en) Three-dimensional head image alignment method and device
CN111462018B (en) Image alignment method in image, computer equipment and storage medium
CN110176066B (en) Skull defect structure reconstruction method and device and electronic equipment
CN116439691A (en) Joint activity detection method based on artificial intelligence and related equipment
CN113034558B (en) Medical diagnosis evaluation system, method, medium and terminal based on image assistance
CN115797416A (en) Image reconstruction method, device and equipment based on point cloud image and storage medium
CN114376724B (en) Method, device and equipment for determining target characteristic points and computer storage medium
CN110009666B (en) Method and device for establishing matching model in robot space registration
CN114266848A (en) Medical image three-dimensional reconstruction method and device
CN110675444A (en) Method and device for determining head CT scanning area and image processing equipment
CN110930394A (en) Method and terminal equipment for measuring slope and pinnate angle of muscle fiber bundle line
CN117058309B (en) Image generation method and system based on oral imaging
CN117934465B (en) TMVR parameter determination method, device and equipment
CN117726752B (en) Rapid three-dimensional skull data righting calibration method
CN117058197A (en) Spatial registration method and device for nerve regulation and control
CN117503346A (en) Pose data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200515

Termination date: 20210416

CF01 Termination of patent right due to non-payment of annual fee