Summary of the invention
The object of the present invention is to provide a kind of document generating method based on medical image and system; File in the present invention refers to the text that can feed back image information based on medical image, the set of data and image.The method can read medical image information and focus characteristic data from medical image, then automatically generate the structured document represented with natural language, the file of this generation can realize carrying out in the mode of What You See Is What You Get the operation editing, preserve and print.Present invention also offers the system implementing the method, system provides the intelligent prompt function of term when user inputs free text, and system stability is reliable, easy to operate.
A kind of document generating method based on medical image provided by the invention, it is characterized in that, the method comprises the steps:
1st step, according to video number, reads medical image information and focus characteristic data from medical image, and from computing machine, read the image template and focus template that prestore in the form of text; Image template is used to the string assemble describing medical image information, and content comprises medical image information element and reserved focus element; Focus template is the string assemble for describing focus characteristic in image, and content is focus characteristic element;
2nd step is resolved respectively to image template and focus template, generates report tree;
3rd step, in internal memory, sets up the concordance list of node to report tree; In concordance list, the data associated with it are shown according to the form specified in nodal community by displayable node, thus realize the display of file;
4th step user is to the operation map of display file in report tree, and the report tree after preserving amendment carries out inverse parsing, generates the image template after corresponding modify and focus template respectively.
A kind of filing system based on medical image provided by the invention, this system reads two kinds of templates prestored in the form of text from computing machine: image template and focus template; It is characterized in that, this system comprises data interface module, template parsing module, term dictionary reminding module and display module;
Data-interface template is responsible for the exchanges data between medical image and file, and it comprises following function: realize the storage and management of all data in internal memory in medical image; According to video number, from medical image, read medical image information and focus characteristic data submit to template parsing module; Read the image template in computing machine and focus template, submit to template parsing module, and amended template is write back in the template data table in calculator memory;
Template parsing module is used for resolving respectively the image template extracted from data interface module and focus template, and generates a report tree, and the report tree after preserving amendment carries out inverse parsing, generates corresponding image template and focus template respectively;
Display module for file being shown on the display device of specifying, and by user to the operation map of display file in the report tree of parsing module, be also better than and provide convenience interactive mode amendment interface succinct;
Term dictionary reminding module is responsible for, according to the key word of user's input, searching in term dictionary, and the frequency then used dictionary term according to user and context dependence sort to Query Result, push, realize prompt facility to result.
Different with edit methods from the file generated of correlation technique, the present invention directly reads the quantized data of medical image from medical image, dynamic file generated mode is provided, the document form of natural language to the image of multiple focus, and the file operation method of What You See Is What You Get mode.Present system also provides term dictionary prompt facility.
Embodiment
The present invention reads the two kinds of templates prestored in the form of text from computing machine: image template and focus template; Recycling storehouse analytical algorithm resolves this two kinds of templates respectively, and the contact between the template elements after parsing is represented with Multiway Tree Structure in internal memory, obtains report tree, an element in template that each node wherein set is corresponding; And set up tree interior joint and the image information in medical image and associating between focus data.
Then, from the root node of report tree, according to multiway tree depth-first search traversal method successively access tree interior joint, and according to nodal community, the data associated with it are shown, obtain required file.
Below in conjunction with accompanying drawing and example, the present invention is further detailed explanation, and advantage of the present invention is elucidated in following embodiment.
As shown in Figure 1, a kind of document generating method based on medical image provided by the invention, comprises the steps:
1st step, according to video number, reads medical image information and focus characteristic data from medical image, and image template and focus template.Image template is used to the string assemble describing medical image information, and content comprises medical image information element and reserved focus element.Focus template is the string assemble for describing focus characteristic in image, and content is focus characteristic element.
Medical image stores five tables of data in internal memory, is medical image information table, focus characteristic tables of data, information about doctor table, patient information table and template data table respectively, as shown in Figure 2.Obtain after wherein medical image information and focus characteristic data carry out treatment and analysis by external system to medical image; Information about doctor and patient information are directly obtained by external system; Template can predefine or by User Defined.The present invention directly adopts medical image quantitative information in medical image and focus characteristic data, and the image file of medical image self, does not relate to and carries out treatment and analyses to medical image.
Medical image is at calculator memory, and as Universal Database, Y has formatted file, and in unformatted object, the design of each tables of data is as follows:
1. medical image information table, this tables of data is the basic description to whole medical image data.The data item stored comprises: patient number, and doctor numbers, video number, and on the date, template describes, and focus describes.The content that wherein template description entry stores is the image template of acquiescence.
2. focus characteristic tables of data, this tables of data is the quantificational description to focus every feature in medical image.Be that Lung neoplasm/lump information is described as Tumor size, density, spicule sign, sign of lobulation in an embodiment, provided by external system.The data item stored comprises: focus is numbered, the text description description of every focus characteristic and the measured value of focus characteristic.
3. information about doctor table, this information table is the description of the information about doctor namely user being used to this system.The data item stored comprises: physician names, password, rank and doctor No. ID.
4. patient information table, this information table is the description of the patient information to source medical image.The data item stored comprises: patient name, sex, age and patient No. ID.
5. template data table, this tables of data describes the template for storing in the form of text in file.The data item stored comprises: image template and focus template.The content of image template comprises medical image information element and reserved focus element.And the content of focus template is focus characteristic element, as lesions position, length, volume, density, shape and focus morphological feature.
2nd step is resolved respectively to image template and focus template.The process of analysis of template as shown in Figure 3, resolves focus template, image template, and the idiographic flow generating report tree comprises:
First resolve focus template, generate focus tree.The whole focus of its root nodes stand, its property value is video number and focus numbering, and each focus characteristic child node represents the focus characteristic element extracted from focus template respectively, and the content that attribute of an element value is filled is focus characteristic data.In focus characteristic child node, according to the property value of node, focus characteristic child node can be divided into text child node and non-textual child node two class, the property value of its Chinese version child node is the static text data preserved in focus template, and the property value of non-textual child node is the focus characteristic data item read in medical image.
Then resolve image template, generate report tree.The whole file of its root nodes stand, its property value is video number, each child node represents each element extracted from image template respectively, obtain multiple image information child node and focus child node respectively, the content of the property value filling of image information child node is the data in medical image information table, and the content that the property value of focus child node is filled is the root node of the focus tree generated, after report tree generates, focus tree can be inserted in report tree.In this two classes child node in tree and image information child node and focus child node, according to child node property value, child node also can be divided into text child node and non-textual child node two class, and the property value of its Chinese version child node is the static text data in image template; Different according to the generating mode of non-textual child node again, non-textual child node can be divided into again non-focus child node and focus child node.
Finally focus tree is inserted into the focus child node in report tree, namely by the focus child node of the former report tree of the fills of the root node of focus tree, thus generates report tree finally to be shown.In final report tree, whole of root nodes stand tree, its property value is video number; The child node of report tree is divided into image information child node and focus characteristic child node according to content.This two seed node is except property value associates with the data item in tables of data, and other attribute items of child node are also associated with child node position in a template and character.The attribute item of child node also comprises: property value length, display position, Show Styles, child node index, parent node index.The structure of report tree as shown in Figure 4.The root node of report tree is medical image numbering, and ground floor child node comprises multiple image information child node and multiple reserved focus child node; Second layer child node comprises multiple focus characteristic child node.
3rd step, in internal memory, sets up the concordance list of node to report tree.In concordance list, from the root node of report tree, according to nodes all in multiway tree depth-first search traversal method successively access tree, when accessed node is displayable node, according to the form specified in nodal community, the data associated with it are shown, thus realize the display of file.
4th step user is to the operation map of display file in report tree, and the report tree after preserving amendment carries out inverse parsing, generates corresponding image template and focus template respectively.
From the root node of report tree, according to multiway tree depth-first search traversal method successively access tree interior joint, when accessed node is displayable node, according to nodal community, the data associated with it are shown.In order to realize the Show Styles of " What You See Is What You Get ", the present invention can provide three kinds of display interfaces, comprises static text interface, the drop-down frame interface of single choice and single choice data frame interface.User can utilize in systems in which the mode of operation of " What You See Is What You Get " to generate file modify operation and editing operation, also can by call output or display device if printer and display etc. are by final file output or display.
Filing system of the present invention reads two kinds of templates from medical image: image template and focus template.
As shown in Figure 5, present system comprises following 4 modules: data interface module, template parsing module, term dictionary reminding module and display module.
(1) data interface module
Data-interface template is responsible for the exchanges data between medical image and file, specifically comprises following several function: the storage and management 1. realizing medical image all tables of data in internal memory.2. according to video number, from medical image, medical image information is read and focus characteristic data submit to template parsing module.3. read the image template in medical image and focus template, submit to template parsing module, and in template data table during amended template is write back to.
The reading manner that data interface module realizes reading template is: first judge according to " template description " data item in medical image information table, if " template description " data item is empty, then search this user-defined image template or acquiescence template according to Customs Assigned Number; If " template description " data item is not empty, then directly read content in " template description " item as image template.Focus template, then by the value of " focus characteristic description " item in medical image information table, is searched template corresponding in focus template table, thus be it can be used as focus template.
(2) template parsing module
The major function of template parsing module comprises: 1. resolve respectively the image template extracted from data interface module and focus template, and generates a report tree.2. the report tree after preserving amendment carries out inverse parsing, generates corresponding image template and focus template respectively.Resolve the idiographic flow of template as shown in Figure 4, institute generates final report and sets, and its structure as shown in Figure 5.
(3) display module
Display module mainly comprises following several function: 1. shown by file on the display device of specifying.2. by user to the operation map of display file to parsing module report tree in.The interactive mode amendment interface of 3. providing convenience succinct.
Display file specific implementation is: from the root node of report tree, according to nodes all in multiway tree depth-first search traversal method successively access tree, when accessed node is displayable node, according to the form specified in nodal community, the data associated with it are shown.
The operation map specific implementation of display file is: in internal memory, set up the concordance list that data pool, operation pond and report are set.What data pool stored is content and the attribute of file.What operation pond stored is mode of operation, as the amendment of file, increase and deletion.Concordance list is the sequence list of storage report traversal of tree index value.When operating the file content of display, by the index value to current file content, in concordance list and report tree, search node corresponding to this file content.Then always obtain data and the mode of operation of this node from data pool and operation Chi, come executable operations and display.After complete, upgrade the data in concordance list, display file and data pool.Thus, complete the operation map of display file.
According to foregoing description, system has possessed quick amendment to file data part and data feedback function substantially.In addition, owing to using RichTextBox control, the manifestation mode of its mode of operation provided and Word there is no too big-difference, therefore, only needs to add some controlled condition and can complete the editor of file and the amendment of data element.
In order to complete the preservation of file efficiently, the preserving type for self all being provided for each node in file, like this, the preservation behavior of entirety can be divided into the preservation behavior of each node, more clear in performance aspect.
(4) term dictionary reminding module
Fig. 6 shows the process flow diagram of the term dictionary input prompt module of free text input portion.
Hereof, user can Freely input and supplement relative contents.And term is of a great variety, word specialty is complicated, is unfavorable for memory and writes.Therefore for user provides the prompt facility based on term dictionary.The workflow of this function, mainly according to the key word of user's input, search in term dictionary, the frequency then used dictionary term according to user and context dependence sort to Query Result, front 10 results are pushed user, realizes prompt facility.
The present invention is not only confined to above-mentioned embodiment; persons skilled in the art are according to content disclosed by the invention; other multiple embodiment can be adopted to implement the present invention; therefore; every employing project organization of the present invention and thinking; do the design that some simply change or change, all fall into the scope of protection of the invention.