A VTK-based magnetic resonance scanning coordinate system conversion method and device

Through the VTK-based magnetic resonance scanning coordinate system conversion method, the gradient excitation matrix and layer selection offset value are used to realize the conversion of VTK coordinate system to MR coordinate system, solving the problem of difficulty in scanning spatial coordinate system conversion in the prior art, ensuring the accurate positioning of the scanning slice and the generation of correct position information of the DICOM image.

CN114299179BActive Publication Date: 2025-08-12安徽福晴医疗装备有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111628737.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-08-12
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

In the prior art, VTK, as a powerful open source library, is difficult to quickly and accurately realize the conversion between magnetic resonance scanning spatial coordinate systems when applied in medical image fields such as image visualization, especially when facing the needs of different scanning parts and scanning postures, it makes it impossible for developers to quickly and accurately seek the conversion between scanning spatial coordinate systems.

Method used

By putting the preset imitation into the scanning coil and moving it to the scanning center, the original data is obtained based on the preset magnetic resonance sequence scanning, the MR coordinate system is determined using the gradient excitation matrix and the layer selection offset value, combining the VTK coordinate system and the position matrix of the current FOV, the gradient excitation matrix is determined, and the encoding direction and judging the excitation method are cross-modified, the VTK coordinate system to the MR coordinate system is realized.

Benefits of technology

It realizes the conversion of VTK coordinate system to MR coordinate system quickly and effectively without considering the scanning posture, ensuring the accurate positioning of the scanning slice and the correct position information generation of the DICOM image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299179B_ABST
    Figure CN114299179B_ABST
Patent Text Reader

Abstract

The present invention discloses a VTK-based magnetic resonance scanning coordinate system conversion method and device, comprising: placing a preset phantom in a scanning coil in a preset manner and moving it to the scanning center, scanning the preset phantom based on a preset magnetic resonance sequence to obtain raw data; determining an MR coordinate system based on the raw data and a first preset gradient excitation matrix; determining a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and the position matrix of the current FOV in the VTK coordinate system; determining the excitation mode of the preset magnetic resonance sequence, and determining a layer selection offset value based on the excitation mode; and determining the position information of the image data matrix based on the gradient excitation matrix and the layer selection offset value. The above-mentioned coordinate system conversion process no longer needs to consider the scanning posture, and the conversion from the VTK coordinate system to the MR coordinate system can be achieved based on the determination of the gradient excitation matrix and the layer selection offset value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of magnetic resonance technology, and in particular to a VTK-based magnetic resonance scanning coordinate system conversion method and device. Background Art

[0002] Magnetic resonance imaging (MRI), a bioimaging technique, is one of the most advanced imaging technologies today. It offers numerous advantages over CT, including the absence of ionizing radiation, high soft tissue contrast, and the ability to image any layer. In practical applications and scan control, operators must adjust the patient's scanning posture and scanning FOV to meet the needs of scanning different tissues, different body parts, different scanning postures, and any layer.

[0003] To meet this need, converting the visual display coordinate space into the actual scanned physical coordinate space is crucial. VTK, a powerful open-source library, has played an indelible role in medical imaging, including image visualization. However, due to its difficulty in getting started, significant differences in systems among major domestic MRI vendors, and the requirements for different scanning locations and postures, developers faced with new systems often struggled to quickly and accurately translate between scan space coordinate systems, often encountering errors. Summary of the Invention

[0004] In view of this, the present invention provides a VTK-based magnetic resonance imaging coordinate system conversion method and device to solve the problem that VTK, as a powerful open source library, plays an indelible role in medical imaging fields such as image visualization. However, due to its difficulty in obtaining it and the large differences in systems among major domestic magnetic resonance imaging manufacturers, as well as the requirements for different scanning parts and scanning postures, developers facing new systems are unable to quickly and accurately find the conversion between scanning space coordinate systems, or may make mistakes. The specific solution is as follows:

[0005] A VTK-based magnetic resonance scanning coordinate system conversion method, comprising:

[0006] placing a preset phantom into a scanning coil in a preset manner and moving it to a scanning center, and scanning the preset phantom based on a preset magnetic resonance sequence to obtain raw data;

[0007] determining an MR coordinate system based on the raw data and a first preset gradient excitation matrix;

[0008] Determine a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and a position matrix of the current FOV in the VTK coordinate system;

[0009] determining an excitation mode of the preset magnetic resonance sequence, and determining a slice selection offset value based on the excitation mode;

[0010] Position information of an image data matrix is determined based on the gradient excitation matrix and the slice selection offset value.

[0011] Optionally, the above method includes determining an MR coordinate system based on the original data and a first preset gradient excitation matrix, including:

[0012] Cross-modify the encoding direction of the first preset gradient excitation matrix in the gradient coordinate system a preset number of times;

[0013] reconstructing the original data based on the modified encoding method to obtain a first image;

[0014] comparing the first image with its corresponding image based on the physical space;

[0015] When the comparison result meets the right-hand coordinate system criterion, the gradient coordinate system is determined to be the MR coordinate system.

[0016] The above method optionally includes determining a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and a position matrix of the current FOV in the VTK coordinate system, including:

[0017] Determine a transformation matrix based on the MR coordinate system and the VTK coordinate system;

[0018] The gradient excitation matrix is determined based on the position matrix of the current FOV in the VTK coordinate system and the transformation matrix.

[0019] Optionally, the above method determines the excitation mode of the preset magnetic resonance sequence, including:

[0020] Fix the second preset gradient excitation matrix and cross-change the selected layer offset value to a negative value, zero or a positive value;

[0021] Determining whether the vector direction from the negative value to the positive value is consistent with the actual vector direction of the corresponding image;

[0022] If they are consistent, the excitation mode is a negative gradient; if they are inconsistent, the excitation mode is a positive gradient.

[0023] The above method may optionally include determining the layer selection offset value based on the excitation mode, including:

[0024] Determining a mapping value Offset of the gradient excitation matrix;

[0025] If the excitation mode is negative gradient, identify whether to replace the encoding direction. If not, the selected layer offset value DistanceSlice = offset[2]. If so, the selected layer offset value DistanceSlice = offset[2]-(SlicesNumber-1)*SG, where SlicesNumber is the number of scanning layers and SG is the distance between the scanning layer center and the layer center.

[0026] If the excitation mode is positive gradient, identify whether to replace the encoding direction. If not, the layer selection offset value DistanceSlice = -offset[2]-(SlicesNumber-1)*SG. If so, the layer selection offset value DistanceSlice = -offset[2].

[0027] The above method may optionally further include:

[0028] The image origin and image orientation corresponding to the data matrix are calculated.

[0029] A VTK-based magnetic resonance scanning coordinate system conversion device, comprising:

[0030] A scanning module is used to place a preset phantom into a scanning coil in a preset manner and move it to a scanning center, and scan the preset phantom based on a preset magnetic resonance sequence to obtain raw data;

[0031] a first determining module, configured to determine an MR coordinate system based on the original data and a first preset gradient excitation matrix;

[0032] A second determining module is configured to determine a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and a position matrix of the current FOV in the VTK coordinate system;

[0033] a third determining module, configured to determine an excitation mode of the preset magnetic resonance sequence, and determine a slice selection offset value based on the excitation mode;

[0034] The fourth determining module is configured to determine position information of an image data matrix based on the gradient excitation matrix and the slice selection offset value.

[0035] In the above device, optionally, the first determining module includes:

[0036] A modifying unit, configured to cross-modify the encoding direction in the first preset gradient excitation matrix in the gradient coordinate system for a preset number of times;

[0037] a reconstruction unit, configured to reconstruct the original data based on the modified encoding method to obtain a first image;

[0038] a comparing unit, configured to compare the first image with its corresponding image based on the physical space;

[0039] The first determination unit is configured to determine that the gradient coordinate system is the MR coordinate system when the comparison result meets the right-hand coordinate system criterion.

[0040] In the above device, optionally, the second determining module includes:

[0041] a first determining unit, configured to determine a transformation matrix based on the MR coordinate system and the VTK coordinate system;

[0042] The second determining unit is configured to determine the gradient excitation matrix based on the position matrix of the current FOV in the VTK coordinate system and the transformation matrix.

[0043] In the above device, optionally, the third determining module includes:

[0044] A changing unit, configured to fix the second preset gradient excitation matrix and cross-change the layer selection offset value to a negative value, zero or a positive value;

[0045] a judging unit, configured to judge whether the direction of the vector from the negative value to the positive value is consistent with the actual vector direction of the corresponding image;

[0046] The second judgment unit is configured to determine that if the two conditions are consistent, the excitation mode is a negative gradient; if the two conditions are inconsistent, the excitation mode is a positive gradient.

[0047] Compared with the prior art, the present invention has the following advantages:

[0048] The present invention discloses a VTK-based magnetic resonance scanning coordinate system conversion method and device, comprising: placing a preset phantom in a scanning coil in a preset manner and moving it to the scanning center, scanning the preset phantom based on a preset magnetic resonance sequence to obtain raw data; determining an MR coordinate system based on the raw data and a first preset gradient excitation matrix; determining a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and the position matrix of the current FOV in the VTK coordinate system; determining the excitation mode of the preset magnetic resonance sequence, and determining a layer selection offset value based on the excitation mode; and determining the position information of the image data matrix based on the gradient excitation matrix and the layer selection offset value. The above-mentioned coordinate system conversion process no longer needs to consider the scanning posture, and the conversion from the VTK coordinate system to the MR coordinate system can be achieved based on the determination of the gradient excitation matrix and the layer selection offset value. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0050] Figure 1 A flowchart of a VTK-based magnetic resonance scanning coordinate system conversion method disclosed in an embodiment of the present application;

[0051] Figure 2 A VTK coordinate system and a human anatomical plane diagram disclosed in the embodiments of this application;

[0052] Figure 3 A schematic diagram of a gradient excitation matrix disclosed in an embodiment of the present application;

[0053] Figure 4 A schematic diagram of a negative gradient layer selection disclosed in an embodiment of the present application;

[0054] Figure 5 A schematic diagram of a positive gradient layer selection disclosed in an embodiment of the present application;

[0055] Figure 6 A schematic diagram of an origin calculation method disclosed in an embodiment of the present application;

[0056] Figure 7 This is a structural block diagram of a VTK-based magnetic resonance scanning coordinate system conversion device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0058] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

[0059] The present invention discloses a VTK-based magnetic resonance scanning coordinate system conversion method and device, which is applied to the conversion process from the VTK coordinate system to the MR coordinate system, wherein the MR coordinate system is the world coordinate system of magnetic resonance in the actual physical space. In the embodiment of the present invention, it is regarded as the same coordinate system as the gradient coordinate system. In the prior art, VTK, as a powerful open source library, plays an indelible role in the field of medical imaging such as image visualization. However, since both are difficult to get started with and due to the large differences in systems among major domestic magnetic resonance manufacturers and the requirements of different scanning parts and scanning postures, developers are unable to quickly and accurately seek conversions between scanning space coordinate systems when faced with new systems, or they may mistakenly seek conversions between scanning space coordinate systems, further resulting in the inability to accurately locate scan slices or obtaining incorrect position information of corresponding DICOM images. Therefore, how to quickly, effectively, and correctly seek conversion relationships between scanning coordinate systems and generate DICOM images with correct position information according to specific needs is a problem that still needs to be further optimized and solved. In order to solve the above problems, the present invention provides a magnetic resonance scanning coordinate system conversion method based on VTK, discloses a method for effectively determining the conversion relationship between magnetic resonance scanning coordinate systems (VTK coordinate system and MR coordinate system) based on VTK, realizes accurate scanning slice positioning, and automatically generates the correct position information of the corresponding DICOM image. After the frequency encoding and phase encoding directions are replaced, the visual FOV number remains unchanged, and the data matrix remains unchanged after reconstruction and transformation. Among them, DICOM stands for Medical Digital Image Transmission Protocol, which is a set of universal standard protocols for medical image processing, storage, printing, and transmission. The execution process of the method is as follows Figure 1 Shown, including:

[0060] S101, placing a preset phantom into a scanning coil in a preset manner and moving it to a scanning center, scanning the preset phantom based on a preset magnetic resonance sequence to obtain raw data;

[0061] In the embodiment of the present invention, a preset phantom is placed in the scanning coil in a preset manner and moved to the scanning center, wherein the preset phantom may be an ACR water film, and the preset manner is determined as follows: Figure 2 As shown, Figure 2 The left half is the manually defined and fixed VTK coordinate system. The DICOM 3.0 standard coordinate system is based on the patient. Specifically, the patient's center is the origin, the direction pointed by the patient's left hand is the positive X-axis, the direction behind the patient is the positive Y-axis, and the direction of the patient's head is the positive Z-axis. In other words, the DICOM 3.0 standard coordinate system is a right-handed coordinate system centered on the patient. This means that the Patient Coordinate System (LPS) is consistent with the VTK coordinate system. Figure 2The right half represents the human anatomical plane. The patient lies on his back with his hands adducted. A transverse section is a horizontal section, a vertical section is a sagittal section, and a horizontal section is a coronal section. To indicate the specific scanning position of the human body, the patient's position is generally represented by head first and feet first, and the patient's position is represented by prone position, supine position, etc. The patient's position can be simply represented by a few letters:

[0062] HFP: Head First-Prone, which stands for head first, prone position;

[0063] HFS: Head First-Supine, which means head first, supine position;

[0064] FFP: FeetFirst-Prone, stands for feet first, prone position;

[0065] FFS: FeetFirst-Supine, stands for feet first, supine position;

[0066] The preset mode is any one of HFP, HFS, FFP and FFS. The embodiment of the present invention does not limit the determination of the preset mode.

[0067] Furthermore, the preset phantom is placed in the scanning coil in a preset manner and moved to the scanning center, and the preset phantom is scanned based on a preset magnetic resonance sequence to obtain raw data, wherein the preset magnetic resonance sequence can be set based on experience or specific circumstances and is not specifically limited in the embodiments of the present invention.

[0068] S102, determining an MR coordinate system based on the original data and a first preset gradient excitation matrix;

[0069] In the embodiment of the present invention, since the MR coordinate system and the gradient coordinate system are the same, the determination process of the MR coordinate system and the gradient coordinate system is the same. The determination process of the gradient coordinate system is as follows: determine the current gradient connection mode, G x , G y , G z The gradient direction.

[0070] 1) Open the spectrometer software and modify the first gradient excitation matrix, wherein the first gradient excitation matrix is as follows: Figure 3As shown, there are three gradient encoding directions. The first column R is the frequency encoding direction (x0, y0, z0), the second column P is the phase encoding direction (x1, y1, z1), and the third column S is the layer selection gradient direction (x2, y2, z2). If the positive direction of the X axis is the frequency encoding direction and the positive direction of the Y axis is the phase encoding direction, the orientation of the reconstructed image is observed; if the scanning orientation is a cross section, the gradient G x With G y lie in Figure 2 In the XY plane of the patient coordinate system, if the scanning orientation is the sagittal plane, the gradient G x With G y lie in Figure 2 In the YZ plane of the patient coordinate system, if the scanning orientation is the coronal plane, the gradient G x With G y lie in Figure 2 XZ plane of the patient coordinate system

[0071] 2) Determine G x , G y , G z Does it conform to the right-hand coordinate system rule? If the orientation obtained in step 1) is a cross section, and the data matrix is upside down relative to the actual physical position, then G x Towards the patient coordinate system X positive direction (L direction), G y Towards the Y direction of the patient coordinate system (A direction);

[0072] 3) Repeat steps 1) and 2) to cross-modify the gradient excitation matrix and reconstruct based on the original data. For example, the first time, the first column is set to the X positive direction and the second column is set to the Y positive direction; the second time, the first column is set to the Z positive direction and the second column is set to the X positive direction, etc., and the original images generated by the inverse Fourier transform of the original data are cross-compared to complete the acquisition of at least three orientations of the preset phantom. If the results of the cross-comparison are unified, it conforms to the right-hand coordinate system, and the gradient coordinate system is the MR coordinate system. Otherwise, the direction of the gradient system is changed.

[0073] S103, determining a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and a position matrix of the current FOV in the VTK coordinate system;

[0074] In the embodiment of the present invention, a conversion relationship DisplayToMR between the VTK coordinate system and the MR coordinate system is determined, wherein the VTK coordinate system is predetermined. Assuming that the VTK coordinate system is A and the MR coordinate system is B, then:

[0075] B=A*DisplayToMR (1)

[0076] For the VTK coordinate system, the position matrix DisplayMatrix of the current FOV is obtained according to the interactive FOV, and the obtained spatial transformation relationship is obtained by

[0077] Matrix=DisplayMatrix*DisplayToMR (2)

[0078] The VTK coordinate system is converted to the MR coordinate system, that is, the gradient excitation matrix under the current scan; if the frequency encoding and phase encoding directions are exchanged, the gradient excitation matrix is:

[0079] Matrix=Matrix*DisplayToMR*InverseMatrix (3)

[0080] in,

[0081] S104: Determine an excitation mode of the preset magnetic resonance sequence, and determine a slice selection offset value based on the excitation mode:

[0082] In an embodiment of the present invention, the excitation mode of the preset magnetic resonance sequence is determined, that is, a positive gradient (large gradient signals are collected first) or a negative gradient (small gradient signals are collected first). A second preset gradient excitation matrix is fixed, wherein the second gradient excitation matrix can be set based on experience or specific circumstances, and is not specifically limited in the embodiment of the present invention, wherein the second preset gradient excitation matrix can be the same as the first preset gradient excitation matrix. Preferably, the second preset gradient excitation matrix is a forward matrix. The layer selection offset value DistanceSlice is selected as a negative value, zero, and a positive value, respectively, wherein the negative value is the opposite of the positive value. Observe whether the direction of the negative to positive vector is consistent with the actual physical vector direction of the corresponding image in the MR coordinate system. If consistent, it is a negative gradient, otherwise it is a positive gradient.

[0083] Furthermore, the layer center DisplayCenter of the last layer of the FOV is obtained according to the interactive FOV, wherein the DisplayCenter is the coordinate of the layer center of the last layer of the FOV in the VTK coordinate system, and the obtained spatial transformation relationship is converted into the MR coordinate MRCenter, wherein the MRCenter is the coordinate of the layer center of the last layer of the FOV in the MR coordinate system. The relationship between the two is as follows:

[0084] MRCenter=DisplayCenter*DisplayToMR (4)

[0085] The MRCenter is mapped to the gradient excitation matrix Matrix, and the mapping value is offset. The specific mapping process is as follows:

[0086] offset=Matrix T *MRCenter (5)

[0087] Further, such as Figure 4 As shown, if the excitation mode of the preset magnetic resonance sequence is a negative gradient, the offset shown in the left figure is given under the current FOV. The theoretical layer selection is as shown in the dotted box numbers ①, ②, ③ and ④ on the left, the initial offset Offset, the origin and the layer selection direction. When the frequency encoding and phase encoding are replaced, the actual generated scanning layer is as shown in the dotted box numbers ④, ③, ② and ① in the middle of the figure, so it needs to be corrected to the layer selection offset value DistanceSlice in the dotted box on the right, the position of the MR relative coordinate system origin and the dotted box numbers ④, ③, ② and ① under the current FOV. A preset identifier is obtained at the specified position, and whether the encoding direction is replaced is identified based on the preset identifier. The preset identifier can be set based on experience or specific circumstances, and is not specifically limited in the embodiments of the present invention.

[0088] If there is no permutation coding direction, then DistanceSlice=offset[2], and a corresponding image is determined, wherein the corresponding image is constructed based on the corresponding data matrix;

[0089] If the encoding direction is permuted, DistanceSlice = offset[2]-(SlicesNumber-1)*SG, where SlicesNumber is the number of scanning layers and SG is the distance between the scanning layer centers. The reconstructed data matrix layer index is reversed, and the reconstructed data matrix is rotated 90 degrees clockwise and flipped along the X-axis. After the flip is completed, the corresponding image is determined.

[0090] Further, such as Figure 5 As shown, if the excitation mode of the preset magnetic resonance sequence is a positive gradient, given the offset shown in the left figure, the theoretically selected layer is as shown in the dotted box numbers ①, ②, ③ and ④ on the left, the initial offset Offset, the origin and the layer selection direction. However, because it is a positive gradient, the actually generated scanning layer is as shown in the dotted box numbers ④, ③, ② and ① in the middle of the figure, so it needs to be corrected to the DistanceSlice in the dotted box on the right, the position of the MR relative coordinate system origin and the dotted box numbers ④, ③, ② and ① under the current FOV.

[0091] If there is no permutation coding direction, DistanceSlice = -offset[2]-(SlicesNumber-1)*SG, where SlicesNumber is the number of scanning layers, SG is the distance between the scanning layer center and the layer center, and the reconstructed data matrix layer index is reversed, then the reconstructed data matrix is rotated 90 degrees clockwise and flipped along the X-axis. After the flip is completed, the corresponding image is determined.

[0092] If the encoding direction is permuted, DistanceSlice = -offset[2], and the corresponding image is determined.

[0093] S105 . Determine position information of an image data matrix based on the gradient excitation matrix and the slice selection offset value.

[0094] In the embodiment of the present invention, the position information of the final image data matrix, ie, the tag information related to the position in the DICOM image, is determined based on the gradient excitation matrix and the slice selection offset value.

[0095] The present invention discloses a VTK-based magnetic resonance scanning coordinate system conversion method and device, comprising: placing a preset phantom in a scanning coil in a preset manner and moving it to the scanning center, scanning the preset phantom based on a preset magnetic resonance sequence to obtain raw data; determining an MR coordinate system based on the raw data and a first preset gradient excitation matrix; determining a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and the position matrix of the current FOV in the VTK coordinate system; determining the excitation mode of the preset magnetic resonance sequence, and determining a layer selection offset value based on the excitation mode; and determining the position information of the image data matrix based on the gradient excitation matrix and the layer selection offset value. The above-mentioned coordinate system conversion process no longer needs to consider the scanning posture, and the conversion from the VTK coordinate system to the MR coordinate system can be achieved based on the determination of the gradient excitation matrix and the layer selection offset value.

[0096] Further, such as Figure 6 As shown, the horizontal direction is frequency encoding and the vertical direction is phase encoding. Calculate the origin of the corresponding image, that is, offset the layer center MRCenter to the opposite direction of the corresponding frequency encoding by the encoding length of FOVLength / 2. Then convert it to the VTK display coordinate system, where FOVLength is the FOV encoding length in the corresponding encoding direction:

[0097]

[0098] Calculate the image direction Direction, which is the position matrix of the visualization FOV in the VTK coordinate system Direction = DisplayMatrix;

[0099] Furthermore, the conversion relationship in other directions can be derived based on the conversion relationship in the HFS direction:

[0100] HFP: Rotate 180 degrees around the Z axis, i.e. DisplayToMR = DisplayToMR * RoTateZ(180);

[0101] FFS: Rotate 180 degrees around the Y axis, i.e. DisplayToMR = DisplayToMR * RoTateY(180);

[0102] FFP: Rotate 180 degrees around the X axis, i.e. DisplayToMR = DisplayToMR * RoTateX(180);

[0103] This embodiment of the present invention provides a VTK-based method for determining the transformation relationship between MRI scan coordinate systems and obtaining the correct position information for the corresponding DICOM image data. When faced with a new system, developers can quickly and efficiently determine the transformation relationship between scan coordinate systems, achieving precise slice positioning and generating the correct position information for the corresponding DICOM image data, regardless of the specific spectrometer, gradient, and other models, without extensive documentation on the spectrometer, or gradient excitation methods.

[0104] Based on the above-mentioned VTK-based magnetic resonance scanning coordinate system conversion method, an embodiment of the present invention provides a VTK-based magnetic resonance scanning coordinate system conversion device, the structural block diagram of the device is as follows: Figure 7 Shown, including:

[0105] Scanning module 201 , first determining module 202 , second determining module 203 , third determining module 204 and fourth determining module 205 .

[0106] in,

[0107] The scanning module 201 is configured to place a preset phantom into a scanning coil in a preset manner and move the phantom to a scanning center, and scan the phantom based on a preset magnetic resonance sequence to obtain raw data;

[0108] The first determining module 202 is configured to determine an MR coordinate system based on the original data and a first preset gradient excitation matrix;

[0109] The second determining module 203 is configured to determine a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and a position matrix of the current FOV in the VTK coordinate system;

[0110] The third determining module 204 is configured to determine an excitation mode of the preset magnetic resonance sequence, and determine a slice selection offset value based on the excitation mode;

[0111] The fourth determining module 205 is configured to determine position information of the data matrix in the MR coordinate system based on the gradient excitation matrix and the slice selection offset value.

[0112] The present invention discloses a VTK-based magnetic resonance scanning coordinate system conversion device, comprising: placing a preset phantom in a scanning coil in a preset manner and moving it to the scanning center, scanning the preset phantom based on a preset magnetic resonance sequence to obtain raw data; determining an MR coordinate system based on the raw data and a first preset gradient excitation matrix; determining a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and the position matrix of the current FOV in the VTK coordinate system; determining the excitation mode of the preset magnetic resonance sequence, and determining a slice selection offset value based on the excitation mode; and determining the position information of the image data matrix based on the gradient excitation matrix and the slice selection offset value. The above-mentioned coordinate system conversion process no longer needs to consider the scanning posture, and the conversion from the VTK coordinate system to the MR coordinate system can be achieved based on the determination of the gradient excitation matrix and the slice selection offset value.

[0113] In the embodiment of the present invention, the first determining module 202 includes:

[0114] A modification unit 206 , a reconstruction unit 207 , a comparison unit 208 and a first determination unit 209 .

[0115] in,

[0116] The modifying unit 206 is configured to cross-modify the encoding direction in the first preset gradient excitation matrix in the gradient coordinate system for a preset number of times;

[0117] The reconstruction unit 207 is configured to reconstruct the original data based on the modified encoding method to obtain a first image;

[0118] The comparison unit 208 is configured to compare the first image with its corresponding image based on the physical space;

[0119] The first determination unit 209 is configured to determine that the gradient coordinate system is the MR coordinate system when the comparison result meets the right-hand coordinate system criterion.

[0120] In the embodiment of the present invention, the second determining module 203 includes:

[0121] A first determining unit 210 and a second determining unit 211 .

[0122] in,

[0123] The first determining unit 210 is configured to determine a transformation matrix based on the MR coordinate system and the VTK coordinate system;

[0124] The second determining unit 211 is configured to determine the gradient excitation matrix based on the position matrix of the current FOV in the VTK coordinate system and the transformation matrix.

[0125] In this embodiment of the present invention, the third determining module 204 includes:

[0126] A changing unit 212 , a judging unit 213 , and a second determining unit 214 .

[0127] in,

[0128] The changing unit 212 is used to fix the second preset gradient excitation matrix and cross-change the layer selection offset value to a negative value, zero or a positive value;

[0129] The judging unit 213 is configured to judge whether the direction of the vector from the negative value to the positive value is consistent with the actual vector direction of the corresponding image;

[0130] The second determining unit 214 is configured to determine that if the two conditions are consistent, the excitation mode is a negative gradient; if not, the excitation mode is a positive gradient.

[0131] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0132] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0133] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0135] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0136] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0137] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0138] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0139] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0140] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A VTK-based magnetic resonance scanning coordinate system conversion method, characterized in that: include: placing a preset phantom into a scanning coil in a preset manner and moving it to a scanning center, and scanning the preset phantom based on a preset magnetic resonance sequence to obtain raw data; Cross-modify the encoding direction in the first preset gradient excitation matrix in the gradient coordinate system a preset number of times; reconstructing the original data based on the modified encoding method to obtain a first image; comparing the first image with its corresponding image based on the physical space; When the comparison result meets the right-hand coordinate system criterion, the gradient coordinate system is determined to be the MR coordinate system; Determine a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and a position matrix of the current FOV in the VTK coordinate system; determining an excitation mode of a preset magnetic resonance sequence, and determining a slice selection offset value based on the excitation mode; Position information of an image data matrix is determined based on the gradient excitation matrix and the slice selection offset value.

2. The method according to claim 1, characterized in that Determining a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and a position matrix of the current FOV in the VTK coordinate system includes: Determine a transformation matrix based on the MR coordinate system and the VTK coordinate system; The gradient excitation matrix is determined based on the position matrix of the current FOV in the VTK coordinate system and the transformation matrix.

3. The method according to claim 1, characterized in that Determine the excitation mode of the preset magnetic resonance sequence, including: Fix the second preset gradient excitation matrix and cross-change the selected layer offset value to a negative value, zero or a positive value; Determining whether the vector direction from the negative value to the positive value is consistent with the actual vector direction of the corresponding image; If they are consistent, the excitation mode is a negative gradient; if they are inconsistent, the excitation mode is a positive gradient.

4. The method according to claim 3, characterized in that Determining a layer selection offset value based on the excitation mode includes: Determining a mapping value Offset of the gradient excitation matrix; If the excitation mode is negative gradient, identify whether to replace the encoding direction. If not, the selected layer offset value DistanceSlice = offset[2]. If so, the selected layer offset value DistanceSlice = offset[2]-(SlicesNumber-1)*SG, where SlicesNumber is the number of scanning layers and SG is the distance between the scanning layer center and the layer center. If the excitation mode is positive gradient, identify whether to replace the encoding direction. If not, the layer selection offset value DistanceSlice = -offset[2]-(SlicesNumber-1)*SG. If so, the layer selection offset value DistanceSlice = -offset[2].

5. The method according to claim 1, wherein Also includes: The image origin and image orientation corresponding to the data matrix are calculated.

6. A VTK-based magnetic resonance scanning coordinate system conversion device, characterized in that: include: A scanning module is used to place a preset phantom into a scanning coil in a preset manner and move it to a scanning center, and scan the preset phantom based on a preset magnetic resonance sequence to obtain raw data; a first determining module, configured to determine an MR coordinate system based on the original data and a first preset gradient excitation matrix; A second determining module is configured to determine a gradient excitation matrix based on the MR coordinate system, the VTK coordinate system, and a position matrix of the current FOV in the VTK coordinate system; a third determining module, configured to determine an excitation mode of a preset magnetic resonance sequence, and determine a slice selection offset value based on the excitation mode; a fourth determining module, configured to determine position information of an image data matrix based on the gradient excitation matrix and the slice selection offset value; The first determining module includes: A modification unit, configured to cross-modify the encoding direction in the first preset gradient excitation matrix in the gradient coordinate system a preset number of times; a reconstruction unit, configured to reconstruct the original data based on the modified encoding method to obtain a first image; a comparing unit, configured to compare the first image with its corresponding image based on the physical space; The first determination unit is configured to determine that the gradient coordinate system is the MR coordinate system when the comparison result meets the right-hand coordinate system criterion.

7. The device according to claim 6, characterized in that The second determining module includes: a first determining unit, configured to determine a transformation matrix based on the MR coordinate system and the VTK coordinate system; The second determining unit is configured to determine the gradient excitation matrix based on the position matrix of the current FOV in the VTK coordinate system and the transformation matrix.

8. The device according to claim 6, characterized in that The third determining module includes: A changing unit, configured to fix the second preset gradient excitation matrix and cross-change the layer selection offset value to a negative value, zero or a positive value; a judging unit, configured to judge whether the direction of the vector from the negative value to the positive value is consistent with the actual vector direction of the corresponding image; The second judgment unit is configured to determine that if the two conditions are consistent, the excitation mode is a negative gradient; if the two conditions are inconsistent, the excitation mode is a positive gradient.

Citation Information

Patent Citations

  • Real-time navigation method and system for ultrasonic transducer

    CN110160517A

  • Magnetic resonance imaging method and system

    CN113534032A

  • MR image registration method and device based on device imaging coordinates, and MR image analysis method and device

    CN113808176A