Design of Automatic Programming Platform for Medical Image Visualization
Source: Internet
Author: User
Design of Automatic Programming Platform for Medical Image VisualizationChen Dexing, Guo Lei, and Yan jingxin(School of automation, Northwestern University of Technology, Xi'an 710072, China))Abstract: To make full use of existing medical image processing Algorithm To avoid repeated development and improve development efficiency, an automatic programming platform for Medical Image Visualization Based on opencv Image Processing Algorithm Library is designed and implemented. Source code The opencv Algorithm Library is fully integrated to avoid repeated development of algorithms. Through the study of visual programming technology, it realizes the visualization and automation of the programming process in this platform? Using the features unrelated to the opencv platform, makeflle files are used to control generation. Program Code Compilation, dance shows the portability of generated program code. The overall structure design of the platform and the specific implementation of each module are discussed. Finally, a development purchase example is provided to prove the efficiency and conciseness of the platform in algorithm testing and development. Key words: basic algorithm library; medical image processing; Visual Programming; cross-platform architecture
LIntroductionSince 1970s, with the maturity and development of CT, MRI, ultrasound and other advanced medical imaging technologies, medical image processing has become one of the fastest growing fields in medical technology. Medical image processing technology, as the basis for the development of these imaging technologies, drives profound changes in modern medical diagnostic technologies. A wide range of medical image processing algorithms meet different processing needs while also bringing about some new problems. Too many algorithms enable the biomedical researchers to spend a lot of time designing and testing some basic algorithms, seriously affecting the progress of research on biomedical science. And use different Programming Language The written algorithms are difficult to reuse and do not meet the simplification and automation requirements of processing tools in the biomedical research process. The automatic programming platform for Medical Image Visualization Based on opencv designed and implemented in this paper solves the above problems. The Platform implements Visual Programming and automatically generates and runs the source program under the user's guidance, which is simple and intuitive. The generated target program is portable.
2Structure Design of Automatic Programming Platform for Medical Image VisualizationTo facilitate algorithm testing and algorithm process development, the automatic programming platform for medical image visualization is designed as follows: ① integrated with a complete basic algorithm library, users can call various basic algorithms from the basic algorithm library for testing and process development, effectively improving users' work efficiency. ② The unified programming style enables different users to reuse and modify a specific algorithm in the platform algorithm database. ③ Visual programming directly uses the graphic module to operate the variables and functions in the source program. "1. It simplifies the process of program process design and writing. ④ Automated programming is based on the processing process established by the graphic module, which can automatically generate the corresponding program source code and executable programs. ⑤ Portability is to achieve the expected portability of the target program. According to the purpose and functional requirements of the automatic programming platform for Medical Image Visualization, the system framework of the platform is designed, as shown in figure 1. User Interface Design, as shown in figure 2. Taking calling a basic algorithm in opencv as an example, the workflow is described as follows: ① After the platform is started, the corresponding database is called according to the current database version number, and then the function in the module is read, read and store the database, and then use the tree list to display the database content. ② Select a specific algorithm from the tree list and drag the workspace of the platform to form a graphic module. ③ Set the algorithm attribute parameters in the algorithm parameter settings area and set the execution sequence in the sequence adjustment area. ④ Click Save token to generate the C source program. In the parameter input area, enter the parameters and click execute to perform the necessary processing.
3Implementation of Automatic Programming Platform for Medical Image VisualizationAccording to the previous system design, the automatic programming platform for medical image visualization is divided into four modules, and their relationship diagram is shown in 3. 1) The database operation module shows from the previous discussion that the platform must have a database containing information about Algorithm functions in opencv. Information in the database is the basis for the platform to implement various functions. to transfer information from the database to the platform, a database operation class that can read information from the database is also required. ① Database design and implementation because the platform database stores information about Algorithm functions in opencv, and XML files can meet the requirements. In an XML database, the dbversion attribute of the root node represents the database version number, and the functionset node represents a set of function-like Algorithm functions. The function node stores information about a function, the parameters node stores information about a variable. It can be seen that a functionset node can have multiple function nodes, while a function node can have multiple parameter nodes. ② Database reading takes into account the upgrade and development of the platform. the structure of the database may also change. Therefore, a database version selector is designed in the read part of the database to call the corresponding read program for different versions of the database. Because the entire database structure is completely recursive, a recursive read algorithm is used in a specific read program. 2) The data operation module can be seen from figure 3. The main function of the data operation module is to store and modify various data on the platform. It is the core of information storage, transfer and processing between modules. The data operation module mainly includes the underlying data storage structure and the data transmission path related to Algorithm functions in the platform. ① The underlying data structure must have a data structure for the information transmitted between the storage and description modules before the software performs all operations. The data transmitted between modules is mainly the function information in the database. The function information mentioned here includes the function name, function return value, function exit and population parameter information, and the description of the function in the database. The information transmitted can be divided into five types: data stream, function, input variable, output variable, and constant. As shown in figure 1, a program in XML format (also called a program flow chart) completed by visual programming can be opened and modified through the platform, the C language source file is generated only after the program flow chart passes through the format conversion module below. On the platform, a corresponding data storage class cdatamodel is used to store program flowcharts. All the operations for adding, removing, and modifying program Flowcharts are based on the underlying data structure, as shown in figure 4. ② The flow line of algorithm function-related data mainly consists of two visualized programming processes. If the user creates a data stream connection path. The first is to call the relevant algorithm function data from the database so that the input of an algorithm depends on the output stream of the algorithm. The second is to generate the data stream when a given variable is generated through the platform. Data will cause an endless loop of data streams. You can check the partial order relationship to view the effect of various classes involved in the stream, as shown in Figure 5. Among them, the more important is the model visualization part and the window status class. The model visualization part mainly serves to display the corresponding part of the cdatamodel class, such as positioning the mouse and deciding how to draw the image; the window status category is used to set the status of the window class and work with the document class to implement Platform rollback and forward operations. ③ In the visualization process, if a user creates a data stream connection, the input of an algorithm is indirectly dependent on the output of the algorithm, this will cause an endless loop of data streams. This problem can be found by detecting the partial order relationship. First, let's look at the definition of partial order: If a link meets the requirements of transmission and inverse, it is called partial order. If a is a non-empty Set A, B, and C are any elements in a, and P is a relationship on a, it is difficult to think that the transmission of data streams in a program is a partial order. You can use the features of the partial order relationship to determine whether a data stream will generate an endless loop. The transmission of partial order relationships can reduce the number of comparisons and improve the efficiency of the detection mechanism to a certain extent. 3) the structure of the data display module is similar to that of the data operation module. In fact, each class in the data operation module is encapsulated, implemented functions such as positioning, drawing the graphic module and its output population, and responding to the mouse action. 4) The format conversion module works together with the above modules to implement a series of operations from reading database data information to generating XML format program flowcharts. However, generating a program flowchart is not the final goal of the Platform. You must also convert the program flowchart in XML format into a C language source file that can be directly compiled and run. In this way, the process of program design can be greatly simplified and the work efficiency of users can be improved. The main process of format conversion is shown in Figure 6.
4Development of Automatic Programming Platform for Medical Image VisualizationTaking the use of the existing edge detection algorithm as an example, the algorithm process development based on this platform is briefly presented. The existing edge detection algorithm is a multilevel edge detection algorithm developed by John F in 1986. This detection algorithm can adapt to different occasions. Its parameters can be adjusted according to specific requirements of different implementations to identify different edge features. There are two main parameters of the "well" algorithm: The Gini value and the size of the Gaussian filter. In this platform, the following uses the "quick bi" operator to process the nucleus image. 1) drag the algorithm function node in the tree structure on the left to the work zone to build a program flow chart, as shown in figure 7. 2) Select the graphic module corresponding to the algorithm function to set the algorithm parameters, as shown in figure 7. 3) You can also set the sequence of algorithm function execution through the sequence adjustment area. 4) execution. This platform supports parameter-based batch processing and can process multiple target objects at a time to automate the processing. The above four steps conceal tedious function calls and variable definitions. All you need to do is to drag the graphic module, connect the port, and adjust parameters. You only need to select the appropriate parameter to obtain the expected result, as shown in result 8.
5ConclusionThe automated programming platform for Medical Image Visualization Based on opencv is programmed and debugged in the Visual C 10 +. NET 2003 environment. Running tests show that the platform can fully utilize various existing medical image processing algorithms to avoid repeated development of algorithms and achieve the goal of automated programming and improved development efficiency. This platform has been applied to research on the zebra fish and has been well evaluated. Currently, the platform only integrates the opencv Algorithm Library to further integrate common medical image processing algorithm libraries (such as Itk and VTK) and expand the application prospects of the platform, better Serve biomedical researchers.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.