A kind of method of the dynamic control radiotherapy planning system based on external program
Technical field
The present invention relates to medicine equipment control technology field, a kind of especially method of dynamic control radiotherapy planning system,
The method of specifically a kind of dynamic control radiotherapy planning system based on external program.
Background technology
Radiotherapy treatment planning system (Treatment Planning System, TPS) is radiotherapy department physics teacher or agent
Amount teacher is used for designing the technology platform and important medicine equipment of radiotherapy planning.Physics teacher or dosage teacher are by the 3-dimensional image of patient
Input TPS with doctor's dose prescription, then rule of thumb drawing target outline, vitals and accessory organ, place optimal launched field,
The optimization for set various optimization aims, finally being planned is calculated, and calculates most suitable beam distribution and intensity, so that
To radiotherapy planning.If result of calculation can not meet prescription requirements, operating personnel will further adjust various parameters and continue to optimize,
Untill obtaining satisfactory result.
General TPS optimisation technique uses the unconfinement type optimisation technique based on multiple target in the world at present.Should
Technology uses modern optimization algorithm, such as CG (Conjugate Gradient) algorithms or genetic algorithm, by minimizing one
The cost function of a variety of clinical targets vied each other and constraints is combined according to different weights strong to search optimal tune
Radiotherapy treatment planning.This unconfinement type optimization problem based on multiple target can be expressed by below equation:
Wherein,For the parameter sets of above-mentioned optimization problem, it
Represent the weight of various dosage distribution limitation and each optimization aim;WithRespectively planned target number and
Vitals number,For the intensity distribution of beam,It is distributed for optimal ray beam intensity.Due to only one of which into
This function, the algorithm has the more quick advantage of calculating speed compared with traditional restricted type optimisation technique.If with tumour
The clinical experience of radiation technician is combined, and the algorithm can produce feasible treatment plan.At present, the tune based on the technology is radiated by force
Treatment planning systems software TPS, such as Philips companies Pinnacle systems and the Eclipse systems of Varian companies,
It is widely applied through tumour hospital at home and abroad.Wherein, although Pinnacle systems have the function that partially restrained optimizes,
But the function is because operational efficiency is too low and is rarely used.
Although the radiotherapy planning system (TPS) of the unconfinement type optimisation technique based on multiple target is achieved in clinical practice
Very ten-strike, but progressively going deep into application, it encounters very big challenge in scalability and configurability.From operation
On see, current TPS is automanual.Radiotherapy department physics teacher or dosage teacher are needed on this system by hand by the three of patient
Image and doctor's dose prescription input TPS are tieed up, then rule of thumb drawing target outline, vitals and accessory organ, placement are optimal
Launched field, the optimization for setting various optimization aims, finally being planned are calculated.If result of calculation can not meet prescription requirements, behaviour
Various parameters continuation optimization will further be adjusted by making personnel, untill obtaining satisfactory result.The physics teacher of each hospital has not
Same plan design experiences, and have the demand of different degrees of automation manual steps.In order to meet the physics of Different hospital
Teacher automates the demand of respective design experiences step, and the TPS such as Pinnacle and Eclipse systems are provided can be out of system
The inside script system that portion's command system is operated automatically.But the grammer of these internal script systems is excessively simple, substantially
Authoritatively, Row control, object-oriented and programming mode that few modern high-level programming languages are possessed etc. is flexibly and smart
Accurate control device.This causes TPS to be had too many difficulties to cope with terms of flexibility, accuracy and the automaticity for extending and configuring.
The content of the invention
The technical problems to be solved by the invention are that in view of the above-mentioned state of the art, and it is strong to provide computing capability, control
Accuracy processed is good, efficiency high, a kind of method of the high dynamic control radiotherapy planning system based on external program of automaticity.
The technical scheme that present invention solution above-mentioned technical problem is used is put for a kind of dynamic control based on external program
The method for treating planning system, comprises the following steps:
Step one:Radiotherapy planning system starts the case information in boot script, collection radiotherapy planning system and calculates flat
Platform configuration information, is saved in an external state database;
Step 2:Boot script runs an external piloting control processing procedure sequence;
Step 3:External piloting control processing procedure sequence (reads the information of external state database, produces a main script;
Step 4:The main script of boot script order radiotherapy planning system operation;
Step 5:The script segment of one or more operation external service program in main script is run one by one, is drawn
The last state of radiotherapy planning system is simultaneously saved in external state database by dynamic TPS scripts.
The measure taken also includes:
Above-mentioned step five comprises the following steps:
1), during each run script segment, external service program all can be from user's required parameter and external status
Data are read in database;
2), the radiotherapy meter according to needed for user's required parameter and radiotherapy planning system mode dynamic calculation complete user's request
Draw system script;
3) result of calculation, is generated into dynamic TPS script files and main script is submitted to;
4), main script performs dynamic TPS scripts in radiotherapy planning internal system;
5), the last state of radiotherapy planning system is saved in external state database by dynamic TPS scripts.
Above-mentioned radiotherapy planning system is at least one of Pinnacle, Eclipse, RayStation and XiO.
Above-mentioned external piloting control processing procedure sequence is with the radiotherapy planning system operation on same computing device.
Above-mentioned external service program is a journey with the radiotherapy planning system operation on same computing device
Sequence, or the distributed program from the radiotherapy planning system operation on different computing devices.
Above-mentioned external state database includes file system, memory database, relational database, nosql and new sql
At least one of database.
Compared with prior art, a kind of method of the dynamic control radiotherapy planning system based on external program of the present invention makes up
The defect that the inside script of existing radiotherapy treatment planning system is not enough in terms of computing capability, this method, which passes through, introduces outside main
Program has more fully carried out macroscopical flow layout;By introducing external service program, and it is carried out with radiotherapy planning system
Information exchange and it is outside calculate, be constantly dynamically precisely controlled the carrying out practically details of radiotherapy planning system.Due to outside journey
Sequence can be write using any high-level programming language, and its flexibility in terms of structure design, Row control is greatly enhanced
The configurability of radiotherapy planning system, the accuracy of scalability and configuration, flexibility, so as to improve radiotherapy planning
The automaticity of system.
Further, since external service program therein can also be operated on other computing devices in a distributed manner, this side
Method also has good guarantee in efficiency.
Brief description of the drawings
Fig. 1 is the deployment architecture figure in the embodiment of the present invention;
Fig. 2 is the logical flow chart in the embodiment of the present invention;
Fig. 3 is to implement dynamic control in the embodiment of the present invention in step 5 to obtain logical flow chart.
Embodiment
Embodiments of the invention are described in further detail below in conjunction with accompanying drawing.
Reference is:Radiotherapy planning system 101, boot script 102, main script 103, script segment 104, dynamic TPS
Script 105, external piloting control processing procedure sequence 106, external service program 107, external state database 108.
A kind of method of the dynamic control radiotherapy planning system based on external program, comprises the following steps:
Step one:Radiotherapy planning system 101 (TPS) starts boot script 102 (bootstrap script), gathers radiotherapy
Case information and calculating platform configuration information in planning system 101, are saved in (a session of external state database 108
Store in);
Step 2:Boot script 102 runs an external piloting control processing procedure sequence 106 (master program);
Step 3:External piloting control processing procedure sequence 106 reads the information of external state database 108, produces a main script 103
(master script);
Step 4:The order radiotherapy planning system 101 of boot script 102 runs main script 103;
Step 5:One or more operation external service program 107 (server in main script 103 is run one by one
Program script segment 104), draws dynamic TPS scripts 105 and is saved in the last state of radiotherapy planning system 101 outer
Portion's slip condition database 108.
In embodiment, step 5 comprises the following steps:
1), during each run script segment 104, external service program 107 all can be from user's required parameter
(request) data and in external state database 108 are read;
2), putting according to needed for user's required parameter and the state dynamic calculation of radiotherapy planning system 101 complete user's request
Treat planning system script;
3) result of calculation, is generated into the file of dynamic TPS scripts 105 and main script 103 is submitted to;
4), main script 103 performs dynamic TPS scripts 105 inside radiotherapy planning system 101;
5), the last state of radiotherapy planning system 101 is saved in external state database 108 by dynamic TPS scripts 105.
In embodiment, radiotherapy planning system 101 is at least one in Pinnacle, Eclipse, RayStation and XiO
Kind.
In embodiment, external piloting control processing procedure sequence 106 operates in same computing device with the radiotherapy planning system 101
On.
In embodiment, external service program 107 is to be operated in the radiotherapy planning system 101 on same computing device
A program, or the distributed program operated in from the radiotherapy planning system 101 on different computing devices.
In embodiment, external state database 108 include file system, memory database, relational database, nosql and
At least one of new sql databases.
Fig. 1 is the deployment architecture figure in the embodiment of the present invention.The boot script of static state is loaded with radiotherapy planning system 101
102, the script that the dynamic of operation is produced is had main script 103 and dynamic TPS scripts 105 by it.External piloting control processing procedure sequence 106 is disposed
And the machine operated in as TPS, the machine or long-range meter that external service program 107 is disposed and operated in as TPS
Calculate on device.External piloting control processing procedure sequence 106 is called by boot script 102, by being produced after being interacted with external state database 108
Main script 103;One or more script segment 104 that external service program 107 is included by main script 103 is constantly called, and is led to
Cross after being interacted with external state database 108, produce dynamic TPS scripts 105, and transfer to radiotherapy planning system 101 to perform.
Fig. 2 is logical flow chart in the embodiment of the present invention.TPS starts boot script step 201 can be by clicking on TPS figures
Implemented at shape interface.Boot script is run an external piloting control program step 202 and realized by TPS scripts.Outside is main
Control program reads the information of external state database and produces a main script step 203 can be with any senior volume
Cheng Yuyan (C++, Java, Python etc.) is realized.It is real by TPS scripts that boot script order TPS runs main script step 204
It is existing.TPS runs the script segment step 205 of one or more operation external service program in main script by TPS pin one by one
This language is realized.
Fig. 3 is the logical flow chart for implementing dynamic control in the embodiment of the present invention in step 5.External service program all can
Data step 301 is read from user's required parameter and external state database to be called by high-level programming language by system
Realize.TPS scripts step 302 according to needed for user's required parameter and TPS states dynamic calculation complete user's request can be by
High-level programming language is realized.Generating dynamic TPS script files and submit to main script step 303 result of calculation can be compiled by senior
Cheng Yuyan and file I/O are realized.Main script performs dynamic TPS scripts step 304 inside TPS can be real by TPS scripts
It is existing.TPS last state is saved in into external state database step 305 to be realized by TPS scripts.
Highly preferred embodiment of the present invention has been illustrated, and the various change or remodeling made by those of ordinary skill in the art are not
It can depart from the scope of the present invention.