A kind of method of the Dynamic controlling radiotherapy planning system based on external program
Technical field
The present invention relates to medicine equipment control technology field, especially a kind of method of Dynamic controlling radiotherapy planning system, specifically a kind of method of the Dynamic controlling radiotherapy planning system based on external program.
Background technology
Radiotherapy treatment planning system (Treatment Planning System, TPS) is that radiotherapy department physics teacher or dosage teacher are used for designing the technology platform of radiotherapy planning and important medicine equipment.Physics teacher or dosage teacher are by the 3-dimensional image of patient and doctor's dose prescription input TPS, then rule of thumb drawing target outline, vitals and accessory organ, the best launched field of placement, various optimization aim is set, the optimization finally carrying out planning calculates, calculate the distribution of most suitable beam and intensity, thus obtain radiotherapy planning.If result of calculation can not meet prescription requirements, operating personnel will adjust various parameter further and continue to optimize, until obtain satisfactory result.
What the optimisation technique of at present general in the world TPS adopted is based on multiobject unconfinement type optimisation technique.This technology uses modern optimization algorithm, as CG (Conjugate Gradient) algorithm or genetic algorithm, search optimum Intensity Modulation Radiated Therapy (IMRT) plan by minimizing a cost function combining multiple clinical target of vying each other and constraint condition according to different weight.This can be expressed by following formula based on multiobject unconfinement type optimization problem:
Wherein,
for the parameter sets of above-mentioned optimization problem, which represent the weight of various dosage distribution limitation and each optimization aim;
with
be respectively planned target number and vitals number,
for the intensity distributions of beam,
for the ray beam intensity of optimum distributes.Owing to only having a cost function, this algorithm has computing velocity advantage comparatively fast compared with traditional restricted type optimisation technique.If be combined with the clinical experience of tumour radiotherapy doctor, this algorithm can produce feasible treatment plan.At present, based on the Intensity Modulation Radiated Therapy (IMRT) planning system software TPS of this technology, as the Pinnacle system of Philips company and the Eclipse system etc. of Varian company, tumour hospital is at home and abroad widely applied.Wherein, although the function that Pinnacle system has partially restrained to optimize, this function is seldom used because operational efficiency is too low.
Although achieve very ten-strike based on the radiotherapy planning system (TPS) of multiobject unconfinement type optimisation technique in clinical practice, along with progressively going deep into of application, it encounters very large challenge in extensibility and configurability.Operationally see, current TPS is automanual.Radiotherapy department physics teacher or dosage teacher need manual by the 3-dimensional image of patient and doctor's dose prescription input TPS on this system, then rule of thumb drawing target outline, vitals and accessory organ, the best launched field of placement, various optimization aim is set, the optimization finally carrying out planning calculates.If result of calculation can not meet prescription requirements, operating personnel will adjust various parameter further and continue to optimize, until obtain satisfactory result.The physics teacher of each hospital has different plan design experiences, and has the demand of robotization manual steps in various degree.In order to meet the demand of the physics teacher robotization design experiences step separately of Different hospital, the TPS systems such as Pinnacle and Eclipse provide the inside script system that automatically can operate from internal system command system.But the grammer of these inner script system is too simple, is authoritatively substantially, flexibly and accurately control device such as Row control, object-oriented and the programming mode etc. that seldom have modern high-level programming language to have.This makes TPS have too many difficulties to cope with in expansion and the dirigibility configured, accuracy and automatism etc.
Summary of the invention
Technical matters to be solved by this invention is the present situation for above-mentioned prior art, and provides computing power strong, and precise control is good, efficiency is high, the method for a kind of Dynamic controlling radiotherapy planning system based on external program that automaticity is high.
The present invention solves the problems of the technologies described above a kind of method that adopted technical scheme is Dynamic controlling radiotherapy planning system based on external program, comprises the following steps:
Step one: radiotherapy planning system starting factor script, gathers the case information in radiotherapy planning system and computing 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 cloud gray model;
Step 5: the script segment running one or more operation external service program in main script one by one, draws dynamic TPS script and the last state of radiotherapy planning system is saved in external state database.
The measure taked also comprises:
Above-mentioned step 5 comprises the steps;
1), in each run script segment process, external service program all can read data from user's required parameter and external state database;
2) the radiotherapy planning system script, needed for user's required parameter and the request of radiotherapy planning system state dynamic calculation completing user;
3), result of calculation generated dynamic TPS script file and submit to main script;
4), main script performs dynamic TPS script in radiotherapy planning internal system;
5), dynamically the last state of radiotherapy planning system is saved in external state database by TPS script.
Above-mentioned radiotherapy planning system is at least one in Pinnacle, Eclipse, RayStation and XiO.
Above-mentioned external piloting control processing procedure sequence comprises described radiotherapy planning system cloud gray model on same calculation element.
Above-mentioned external service program is the program be set up same calculating with described radiotherapy planning system cloud gray model, or the distributed program be set up in different calculating from described radiotherapy planning system cloud gray model.
Above-mentioned external state database comprises at least one in file system, memory database, relational database, nosql and new sql database.
Compared with prior art, the method of a kind of Dynamic controlling radiotherapy planning system based on external program of the present invention compensate for the defect of inside script deficiency in computing power of existing radiotherapy treatment planning system, and the method has more fully carried out macroscopical flow layout by introducing outside master routine; By introducing external service program, and its information interaction of carrying out with radiotherapy planning system and outsidely to calculate, the constantly carrying out practically details of dynamically accurate control radiotherapy planning system.Because external program can utilize any high-level programming language to write, its dirigibility in structural design, Row control etc. drastically increases the configurability of radiotherapy planning system, the accuracy of extensibility and configuration, dirigibility, thus improves the automaticity of radiotherapy planning system.
In addition, because external service program wherein can also operate on other calculation element in a distributed manner, this method also has good guarantee in efficiency.
Accompanying drawing explanation
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 implements Dynamic controlling to obtain logical flow chart in step 5 in the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, embodiments of the invention are described in further detail.
Reference numeral is: radiotherapy planning system 101, boot script 102, main script 103, script segment 104, dynamically TPS script 105, external piloting control processing procedure sequence 106, external service program 107, external state database 108.
Based on a method for the Dynamic controlling radiotherapy planning system of external program, comprise the following steps:
Step one: radiotherapy planning system 101 (TPS) starting factor script 102 (bootstrap script), gather the case information in radiotherapy planning system 101 and computing platform configuration information, be saved in an external state database 108 (session store);
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: boot script 102 order radiotherapy planning system 101 runs main script 103;
Step 5: the script segment 104 running one or more operation external service program 107 (server program) in main script 103 one by one, draws dynamic TPS script 105 and the last state of radiotherapy planning system 101 is saved in external state database 108.
In embodiment, step 5 comprises the steps;
1), in each run script segment 104 process, external service program 107 all can read data from user's required parameter (request) and external state database 108;
2) the radiotherapy planning system script, needed for user's required parameter and the request of radiotherapy planning system 101 state dynamic calculation completing user;
3), result of calculation generated dynamic TPS script 105 file and submit to main script 103;
4), main script 103 performs dynamic TPS script 105 in radiotherapy planning system 101 inside;
5), dynamically the last state of radiotherapy planning system 101 is saved in external state database 108 by TPS script 105.
In embodiment, radiotherapy planning system 101 is at least one in Pinnacle, Eclipse, RayStation and XiO.
In embodiment, external piloting control processing procedure sequence 106 comprises described radiotherapy planning system 101 and operates on same calculation element.
In embodiment, external service program 107 is operate in the program that same calculating is set up with described radiotherapy planning system 101, or operates in from described radiotherapy planning system 101 distributed program that different calculating is set up.
In embodiment, external state database 108 comprises at least one in file system, memory database, relational database, nosql and new sql database.
Fig. 1 is the deployment architecture figure in the embodiment of the present invention.Be loaded with static boot script 102 in radiotherapy planning system 101, the script of the dynamic generation run is had main script 103 and dynamic TPS script 105 by it.External piloting control processing procedure sequence 106 is disposed and is operated in the machine the same with TPS, and external service program 107 is disposed and operated on the machine the same with TPS or remote computing device.External piloting control processing procedure sequence 106 is called by boot script 102, after mutual with external state database 108, produce main script 103; One or more script segment 104 that external service program 107 is comprised by main script 103 is constantly called, and after mutual with external state database 108, produce dynamic TPS script 105, and transfers to radiotherapy planning system 101 to perform.
Fig. 2 is logical flow chart in the embodiment of the present invention.TPS starting factor script step 201 can be implemented by clicking TPS graphical interfaces.Boot script is run an external piloting control program step 202 and is realized by TPS script.External piloting control processing procedure sequence reads the information of external state database and produces a main script step 203 any one high-level programming language (C++, Java, Python etc.) can be used to realize.Boot script order TPS runs main script step 204 and is realized by TPS script.One or more script segment step 205 running external service program that TPS runs in main script is one by one realized by TPS script.
Fig. 3 is the logical flow chart implementing Dynamic controlling in the embodiment of the present invention in step 5.External service program all can be read data step 301 and can be realized by system call by high-level programming language from user's required parameter and external state database.TPS script step 302 needed for user's required parameter and the request of TPS state dynamic calculation completing user can be realized by high-level programming language.Result of calculation is generated dynamic TPS script file and submit to main script step 303 and can be realized by high-level programming language and file I/O.Main script performs dynamic TPS script step 304 in TPS inside and can be realized by TPS script.The last state of TPS is saved in external state database step 305 to be realized by TPS script.
Most preferred embodiment of the present invention is illustrated, and the various change made by those of ordinary skill in the art or remodeling all can not depart from the scope of the present invention.