Summary of the invention
What the present invention solved is the problem that in prior art, multiple customer services are called the resource redundancy consumption causing in image processing algorithm storehouse simultaneously.
In order to address the above problem, technical solution of the present invention provides a kind of medical image processing method, described method is processed source images according to customer service request service unit, described service unit has polyalgorithm storehouse, described method comprises: registered user's business, generates and share storage and the log-on message corresponding with described customer service according to described customer service; Load source images; Send image and process request, process described source images and generate target image, based on described log-on message, described target image is write to described shared storage; Read described target image.
Alternatively, described registered user's business, comprises according to the shared storage of described customer service generation and the log-on message corresponding with described customer service: send registration request; Described registration request is carried out to protocal analysis, extract the protocol fields content of described registration request, obtain customer service label; Generate the log-on message corresponding with described customer service based on described customer service label, generate and share storage, and obtain shared storage tags; Described shared storage tags is returned to described customer service.
Alternatively, described loading source images comprises: send the image source request that arranges; The described image source that arranges is asked to carry out protocal analysis, extract the described protocol fields content that the request of image source is set, obtain image descriptor; Load described source images according to described image descriptor, bind described image descriptor and described customer service label.
Alternatively, described image descriptor is associated with at least one in network site or the physical storage of described source images.
Alternatively, described source images has the first parameter combinations, and described the first parameter combinations is associated with noise reduction intensity, bilateral filtering intensity, multi-scale enhancement intensity, shows look-up table curve comparison degree or shows the displacement of look-up table curve level.
Alternatively, described transmission image is processed request, processes described source images and generates target image, based on described log-on message, described target image is write to described shared storage and comprises: send image and process request; Described image is processed to request and carry out protocal analysis, extract described image and process the protocol fields content of asking, obtain the second parameter combinations; Merge described the first parameter combinations and described the second parameter combinations, obtain the 3rd parameter combinations; Described the 3rd parameter combinations is mated with the algorithms library in described service unit and form matching result, process described source images based on described matching result, generate target image; Based on described log-on message, described target image is write to described shared storage.
Alternatively, described the second parameter combinations is associated with noise reduction intensity, bilateral filtering intensity, multi-scale enhancement intensity, shows look-up table curve comparison degree or shows the displacement of look-up table curve level.
Alternatively, in the time merging described the first parameter combinations and described the second parameter combinations, if described the first parameter combinations is different from described the second parameter combinations, be as the criterion with described the second parameter combinations.
Alternatively, described medical image processing method also comprises: discharge described shared storage.
Alternatively, described medical image processing method is processed in the following way described registration request that multiple customer services send, describedly the request of image source is set and described image is processed request: the queue one that gives information, the registration request sending for preserving multiple customer services; The registration request that described customer service sends inserts described message queue one tail of the queue, and described service unit processing is positioned at the registration request of described message queue one team's head; The queue two that gives information, the image source request that arranges sending for preserving multiple customer services; What described customer service sent arranges described message queue two tails of the queue of image source request insertion, and described service unit processing is positioned at the image source request that arranges of described message queue two team's heads; The queue three that gives information, processes request for preserving the image that multiple customer services send; The image that described customer service sends is processed request and is inserted described message queue three tails of the queue, and described service unit processing is positioned at the image of described message queue three team's heads and processes request.
Technical solution of the present invention also provides a kind of client, has at least one customer service, and for sending registration request to server to generate the shared storage corresponding with described customer service, described registration request comprises customer service label; Or for sending the image source request that arranges, image descriptor is asked to comprise in the described image source that arranges; Or process request for sending image; Or for reading from described shared storage the target image that source images obtains after treatment.
Technical solution of the present invention also provides a kind of server, comprise service unit, the registration request sending for receiving customer service, generates and shares storage and the log-on message corresponding with described customer service according to customer service, and described registration request comprises customer service label; Or for loading source images; Or for the treatment of described source images and generate target image, and based on described log-on message, described target image is write to described shared storage.
Correspondingly, technical solution of the present invention also provides a kind of magic magiscan, comprises described client and described server.
Alternatively, between described client and described server, set up communication port by socket.
Compared with prior art, in technical solution of the present invention, the customer service of process registration, in the time processing medical image, need to send request to service unit; Service unit distributes independently shares storage for depositing the target image obtaining after source images is processed.Above-mentioned image processing operations is independent of each customer service by service unit by algorithms library, and tool has the following advantages:
Between algorithms library and application program, rely on without interface, the algorithms library in service unit can arbitrary extension, and the algorithms library after customer service invoke extensions does not need to recompilate to adapt to the variation of interface; Algorithms library runs on server end, can be prior to customer service and independent startup, and toggle speed is fast; In addition, due to customer service, to take resource few, therefore, can start multiple customer services and the unlikely system resource anxiety that causes has reduced multiple customer services to call the resource redundancy consumption that algorithms library causes simultaneously simultaneously, improve stability and the efficiency of system.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can more be become apparent, below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in detail.Set forth detail in the following description so that fully understand the present invention.But the present invention can be different from alternate manner described here and implements with multiple, and those skilled in the art can do similar popularization without prejudice to intension of the present invention in the situation that.Therefore the present invention is not subject to the restriction of following public embodiment.
As stated in the Background Art, in the workstation of Medical Devices, each application program, as separate process, need to be distinguished load image Processing Algorithm storehouse, and independent Resources allocation is for image processing algorithm storehouse.For instance, consult Fig. 1, Fig. 1 is the image processing method schematic diagram that repeats loading algorithm storehouse in existing medical equipments work station.When the first application A pplication1 processes source images, distribute a memory field to be used for loading the first algorithms library AlgorithmLibrary1; When the second application A pplication2 processes source images, distribute another piece memory field for loading the second algorithms library AlgorithmLibrary2; When the 3rd application A pplication3 processes source images, distribute another memory field for loading the first algorithms library AlgorithmLibrary1 and the second algorithms library AlgorithmLibrary2.
The memory field that the memory field that the first application A pplication1 distributes and the 3rd application A pplication3 distribute has all loaded the first algorithms library AlgorithmLibrary1; The memory field that the memory field that the second application A pplication2 distributes and the 3rd application A pplication3 distribute has all loaded the second algorithms library AlgorithmLibrary2.
Inventor finds through research, the independent loading algorithm of each application program storehouse, and corresponding algorithms library just can be by repeated loading, repeats to take resource.Operation simultaneously needs the different application in identical image Processing Algorithm storehouse, can cause the waste of system resource, and processing speed reduces.For the algorithms library that comprises complicated algorithm, treatment effeciency reduces especially obvious.In addition, the algorithms library that each application program need to load is incomplete same, if certain application program changes with the interface of corresponding algorithms library, for example increase interface, may cause the function entrance point of this algorithms library to change, other application programs cannot this algorithms library of normal load, and reload after needing to recompilate.
Based on this, technical solution of the present invention provides a kind of medical image processing method, and described method is processed source images according to customer service request service unit, and described service unit has polyalgorithm storehouse.Consult Fig. 2, Fig. 2 is the process flow diagram of the medical image processing method of embodiment of the present invention.Described method comprises:
S10: registered user's business, generates and share storage and the log-on message corresponding with described customer service according to described customer service;
S20: load source images;
S30: send image and process request, process described source images and generate target image, based on described log-on message, described target image is write to described shared storage;
S40: read described target image, discharge described shared storage.
Described source images refers to the original image directly being obtained by the electric signal of detector output in Medical Devices.Described source images has the first parameter combinations, and described the first parameter combinations is associated with noise reduction intensity, bilateral filtering intensity, multi-scale enhancement intensity, shows look-up table curve comparison degree or shows the displacement of look-up table curve level.
Source images can be stored in the physical storage in medical equipments work station, can be stored in the network site outside medical equipments work station.Described Medical Devices can be digital radiography (Digital Radiography, DR) equipment, digital subtraction angiography (Digital Subtract Angiography, DSA) equipment, computer tomography (Computed tomography, CT) equipment, magnetic resonance imaging (Magnetic Resonance Imaging, MRI) equipment or positron emission tomography scanning (Positron Emission Tomography, PET) equipment.
Below in conjunction with specific embodiment, above-mentioned medical image processing method is elaborated.In the present embodiment, first user service needed utilizes the first algorithms library to process source images, and the second customer service need to utilize the second algorithms library to process source images, and the 3rd customer service need to utilize the first algorithms library and the second algorithms library to process source images.
S10: registered user's business, generates and share storage and the log-on message corresponding with described customer service according to described customer service.Consult Fig. 3, Fig. 3 is the process flow diagram of registered user's business in the medical image processing method of embodiment of the present invention.Step S10 comprises:
S11. send registration request.Customer service 100 needed first in service unit 200, to register before request service unit 200 is processed source images.Customer service 100 sends registration request CMD_REG to service unit 200.
S12. described registration request is carried out to protocal analysis, extract the protocol fields content of described registration request, obtain customer service label.Service unit 200 carries out protocal analysis to described registration request CMD_REG, extracts the protocol fields content of described registration request CMD_REG, obtains customer service label.Customer service label is the field for identifying user business, can be the title of customer service, can be also the ID of customer service.
S13. generate the log-on message corresponding with described customer service based on described customer service label, generate and share storage 300, obtain shared storage tags.The log-on message of customer service is associated with customer service label, and as previously mentioned, customer service label is the field for identifying user business, it can be the title of customer service, also can be the ID of customer service, therefore, the log-on message of customer service also can identifying user business.Except identifying user business, log-on message can also comprise that customer service sends the qualifications of the time of registration request, carries out image processing operation etc.Shared storage tags is the field of sharing storage for identifying, can be the title of sharing storage, can be also the ID that shares storage.
S14. described shared storage tags is returned to described customer service.
In the present embodiment, first register first user business, generate first according to described first user business and share storage and first log-on message corresponding with described first user business.Particularly:
Execution step S11, first user business sends registration request CMD_REG_1 to service unit.
Execution step S12, described service unit carries out protocal analysis to described registration request CMD_REG_1, extracts the protocol fields content of described registration request CMD_REG_1, obtains first user service label.
Execution step S13, described service unit generates first log-on message corresponding with described first user business based on described first user service label, and described service unit generates first and shares storage, obtains described first and shares storage tags.
Execution step S14, described service unit is shared storage tags by described first and is returned to described first user business.
Seemingly, this does not repeat for the register method of the second customer service and the 3rd customer service and described first user service class.
It should be noted that, if multiple customer service sends registration request to service unit, the queue one that gives information, the registration request sending for preserving multiple customer services.The registration request that described customer service sends inserts described message queue one tail of the queue, and described service unit processing is positioned at the registration request of described message queue one team's head.
In the present embodiment, if first user business, the second customer service and the 3rd customer service send registration request CMD_REG_1, registration request CMD_REG_2, registration request CMD_REG_3 to service unit respectively successively, first the registration request CMD_REG_1 that first user business sends inserts message queue one tail of the queue; Then the registration request CMD_REG_2 that the second customer service sends inserts message queue one tail of the queue again, after coming registration request CMD_REG_1; The registration request CMD_REG_3 that last the 3rd customer service sends inserts message queue one tail of the queue again, after coming registration request CMD_REG_2.
When service unit is processed the registration request of customer service, first process from the registration request CMD_REG_1 of message queue one team's head taking-up first user business, the registration request CMD_REG_2 that takes out again the second customer service processes, and the registration request CMD_REG_3 that finally takes out the 3rd customer service processes.
S20: load source images.Consult Fig. 4, Fig. 4 is the process flow diagram that loads source images in the medical image processing method of embodiment of the present invention.Step S20 comprises:
S21. send the image source request that arranges.
Customer service, before request service unit is processed image, needs to send the image source request that arranges, and as shown in Figure 4, customer service 100 sends and request CMD_SET_IMAGE in image source is set to service unit 200.
S22. the described image source that arranges is asked to carry out protocal analysis, extract the described protocol fields content that the request of image source is set, obtain image descriptor.
Service unit 200 carries out protocal analysis to request CMD_SET_IMAGE in image source is set, and obtains image descriptor.Described image descriptor is associated with at least one in network site or the physical storage of described source images.For example, image descriptor can be associated with memory address, data-base recording, physical pathway or the network path of the described source images of storage.
S23. load described source images according to described image descriptor, bind described image descriptor and described customer service label.
Service unit 200 loads source images according to the memory address of the source images carrying in image descriptor.As previously mentioned, source images can be stored in the physical storage in medical equipments work station, can be stored in the network site outside medical equipments work station.Service unit 200 just loads source images from corresponding position.
In the present embodiment, service unit loads source images.Particularly:
Execution step S21, first user business sends request CMD_SET_IMAGE_1 in image source is set.
Execution step S22, service unit carries out protocal analysis to the described image source request CMD_SET_IMAGE_1 that arranges, and extracts the described protocol fields content that request CMD_SET_IMAGE_1 in image source is set, and obtains the first image descriptor.
Execution step S23, loads described source images according to described the first image descriptor, binds described the first image descriptor and described first user service label.
For the second customer service and the 3rd customer service, seemingly, this does not repeat for the method for its loading source images and first user service class.
It should be noted that, the request of image source is set to service unit if multiple customer service sends, the queue two that gives information, the image source request that arranges sending for preserving multiple customer services.What described customer service sent arranges described message queue two tails of the queue of image source request insertion, and described service unit processing is positioned at the image source request that arranges of described message queue two team's heads.
Illustrate, image source request CMD_SET_IMAGE_1 is set, image source request CMD_SET_IMAGE_2 is set and request CMD_SET_IMAGE_3 in image source is set if first user business, the second customer service and the 3rd customer service send to service unit successively, first what first user business sent arrange image source request CMD_SET_IMAGE_1 inserts message queue two tails of the queue; What then the second customer service sent arrange image source request CMD_SET_IMAGE_2 inserts message queue two tails of the queue again, after coming request CMD_SET_IMAGE_1 in image source being set; What last the 3rd customer service sent arrange image source request CMD_SET_IMAGE_3 inserts message queue two tails of the queue again, after coming request CMD_SET_IMAGE_2 in image source being set.
When service unit carries out protocal analysis to request CMD_SET_IMAGE in image source is set, first carry out protocal analysis from the image source request that the arranges CMD_SET_IMAGE_1 of message queue two team's heads taking-up first user business, the image source request that the arranges CMD_SET_IMAGE_2 that takes out again the second customer service carries out protocal analysis, and the registration request CMD_SET_IMAGE_3 that finally takes out the 3rd customer service carries out protocal analysis.
S30: send image and process request, process described source images and generate target image, based on described log-on message, described target image is write to described shared storage.Consult Fig. 5, Fig. 5 is the process flow diagram of processing source images in the medical image processing method of embodiment of the present invention.Step S30 comprises:
S31. send image and process request.Customer service 100 sends image to service unit 200 and processes request.
S32. described image is processed to request and carry out protocal analysis, extract described image and process the protocol fields content of asking, obtain the second parameter combinations.Described the second parameter combinations is associated with noise reduction intensity, bilateral filtering intensity, multi-scale enhancement intensity, shows look-up table curve comparison degree or shows the displacement of look-up table curve level.
S33. merge described the first parameter combinations and described the second parameter combinations, obtain the 3rd parameter combinations.In the time merging described the first parameter combinations and described the second parameter combinations, if described the first parameter combinations is identical with the parameter in described the second parameter combinations, the 3rd parameter combinations can be selected the first parameter combinations, also can select the second parameter combinations; If described the first parameter combinations is different from described the second parameter combinations, be as the criterion with described the second parameter combinations.
S34. described the 3rd parameter combinations is mated with the algorithms library in described service unit and form matching result, process described source images based on described matching result, generate target image.
S35. based on described log-on message, described target image is write to described shared storage.Described target image is write described shared storage 300 by service unit 200.
In the present embodiment, first user business sends image and processes request, and service unit is processed described source images and generated target image, based on described the first log-on message, described target image is write to first and shares storage.Particularly:
Execution step S31, first user business sends image to service unit and processes request CMD_PROCESS_IMAGE_1.
Execution step S32, described service unit is processed request CMD_PROCESS_IMAGE_1 to described image and is carried out protocal analysis, extracts described image and processes the protocol fields content of asking CMD_PROCESS_IMAGE_1, obtains the second parameter combinations.
Execution step S33, merges described the first parameter combinations and described the second parameter combinations, obtains the 3rd parameter combinations.
Execution step S34, service unit mates described the 3rd parameter combinations formation matching result with the algorithms library in described service unit, process described source images based on described matching result, generates target image.
Execution step S35, service unit writes described first based on described the first log-on message by described target image and shares storage.
Seemingly, this does not repeat for the method for the second customer service and the 3rd customer service processing source images and first user service class.
It should be noted that, process request to service unit if multiple customer service sends image, the queue three that gives information, the image processing request sending for preserving multiple customer services; The image that described customer service sends is processed request and is inserted described message queue three tails of the queue, and described service unit processing is positioned at the image of described message queue three team's heads and processes request.
Illustrate, if first user business, the second customer service and the 3rd customer service send to service unit respectively successively, image is processed request CMD_PROCESS_IMAGE_1, image processes request CMD_PROCESS_IMAGE_1 and image is processed request CMD_PROCESS_IMAGE_1, the image that first user business sends process request CMD_PROCESS_IMAGE_1 first insert message queue three to tail; Then the second customer service sends image processing request CMD_PROCESS_IMAGE_2 and inserts message queue three tails of the queue again, after coming image processing request CMD_PROCESS_IMAGE_1; The image that last the 3rd customer service sends is processed the tail of the queue of asking CMD_PROCESS_IMAGE_3 to insert again message queue three, after coming image processing request CMD_PROCESS_IMAGE_2.
When service unit carries out protocal analysis to image processing request CMD_PROCESS_IMAGE, first process request CMD_PROCESS_IMAGE_1 from the image of message queue three team's heads taking-up first user business and carry out protocal analysis, the image processing request CMD_PROCESS_IMAGE_2 that takes out again the second customer service carries out protocal analysis, and the image processing request CMD_PROCESS_IMAGE_3 that finally takes out the 3rd customer service carries out protocal analysis.
S40: read described target image.Continue to consult Fig. 4, customer service 100 reads described target image from described shared storage 300.
In the present embodiment, customer service 100 reads after target image, and service unit 200 discharges shares storage 300.In other embodiments, customer service 100 reads after target image, and service unit 200 also can retain shares storage 300, preserves target image for customer service 100 while sending the request of image processing next time.
It should be noted that, share storage and only distribute for different customer services.Different customer service request service unit generate different shared storages, and whether the algorithm no matter these customer services are used is identical.Same customer service request service unit generates same shared storage, if same customer service need to be used respectively the multiple different source images of different algorithm process, serves by same shared storage and returns to multiple target images.
Technical solution of the present invention also provides a kind of client, has at least one customer service, and for sending registration request to server to generate the shared storage corresponding with described customer service, described registration request comprises customer service label; Or for sending the image source request that arranges, image descriptor is asked to comprise in the described image source that arranges; Or process request for sending image; Or for reading from described shared storage the target image that source images obtains after treatment.Described image descriptor is associated with at least one in network site or the physical storage of described source images.
Technical solution of the present invention also provides a kind of server, comprise service unit, the registration request sending for receiving customer service, generates and shares storage and the log-on message corresponding with described customer service according to customer service, and described registration request comprises customer service label; Or for loading source images; Or for the treatment of described source images and generate target image, and based on described log-on message, described target image is write to described shared storage.
Described server also comprises message queue unit, and described message queue unit comprises:
Message queue one, the registration request sending for preserving multiple customer services; The registration request that described customer service sends inserts described message queue one tail of the queue, and described service unit processing is positioned at the registration request of described message queue one team's head.
Message queue two, the image source request that arranges sending for preserving multiple customer services; What described customer service sent arranges described message queue two tails of the queue of image source request insertion, and described service unit processing is positioned at the image source request that arranges of described message queue two team's heads.
Message queue three, the image processing request sending for preserving multiple customer services; The image that described customer service sends is processed request and is inserted described message queue three tails of the queue, and described service unit processing is positioned at the image of described message queue three team's heads and processes request.
Correspondingly, technical solution of the present invention also provides a kind of magic magiscan, comprises above-mentioned client and server.
Consult Fig. 6, Fig. 6 is the schematic diagram of the magic magiscan of embodiment of the present invention.As a specific embodiment of the present invention, described magic magiscan comprise client one, client two ..., client N.Wherein, client one has N customer service, and customer service 11 is to customer service 1n; Client two has N customer service, and customer service 21 is to customer service 2n ..., client N has n customer service, and customer service n1 is to customer service nn.
Described magic magiscan also comprises server, and described server comprises service unit and message queue unit.
Client one to the one or more customer services in client N can send registration request to server, the request of image source or image processing request are set, described registration request inserts the message queue one of message queue unit, the described message queue two that request insertion message queue unit, image source is set, described image is processed the message queue three of asking to insert message queue unit.
Service unit generates the shared storage corresponding with described customer service according to the registration request in message queue one.In the present embodiment, first shares storage shares storage corresponding to described customer service 12 corresponding to described for business 11, the second ..., N shares storage corresponding to client's business 1n.The shared storage that other customer services are corresponding, for example customer service 21 goes out out to the shared storage of customer service 2n or customer service n1 to the shared of customer service nn, not shown.
Service unit is according to image source request of loading source images is set in message queue two.Service unit is processed request according to the image of three kinds of message queues and is processed source images, and target image after treatment is stored to and correspondingly shares storage.
Each customer service in client is from correspondingly sharing storage and read target image.
In the present embodiment, between described client and described server, can set up communication port by socket (socket).In other embodiments, between described client and described server, also can set up communication port by mailslot (mailslot) or other modes.
In sum, in technical solution of the present invention, the customer service of process registration, in the time processing medical image, need to send request to service unit; Service unit distributes independently shares storage for depositing the target image obtaining after source images is processed.Above-mentioned image processing operations is independent of each customer service by service unit by algorithms library, and tool has the following advantages:
Between algorithms library and application program, rely on without interface, the algorithms library in service unit can arbitrary extension, and the algorithms library after customer service invoke extensions does not need to recompilate to adapt to the variation of interface; Algorithms library runs on server end, can be prior to customer service and independent startup, and toggle speed is fast; In addition, due to customer service, to take resource few, therefore, can start multiple customer services and the unlikely system resource anxiety that causes has reduced multiple customer services to call the resource redundancy consumption that algorithms library causes simultaneously simultaneously, improve stability and the efficiency of system.
More than disclose many aspects of the present invention and embodiment, it will be understood by those skilled in the art that other side of the present invention and embodiment.In the present invention, disclosed many aspects and embodiment, just for illustrating, are not limitation of the invention, and real protection domain of the present invention and spirit should be as the criterion with claims.