Invention content
What the present invention solved is multiple customer services while to call resource caused by image processing algorithm library in the prior art
The problem of redundancy consumes.
To solve the above-mentioned problems, technical solution of the present invention provides a kind of medical image processing method, the method according to
Customer service request service unit handles source images, and the service unit has polyalgorithm library, the method includes:
Customer service is registered, shared storage and log-on message corresponding with the customer service are generated according to the customer service;Load
Source images;Image processing requests are sent, the source images is handled and generates target image, are based on the log-on message by the mesh
The shared storage is written in logo image;Read the target image.
Optionally, the registration customer service, according to the customer service generate shared storage and with the customer service
Corresponding log-on message includes:Send registration request;Protocal analysis is carried out to the registration request, extracts the registration request
Protocol fields content obtains customer service label;Note corresponding with the customer service is generated based on the customer service label
Volume information generates shared storage, and obtains shared storage label;The shared storage label is returned into the customer service.
Optionally, the load source images include:Setting image sources are sent to ask;The setting image sources are asked
Protocal analysis is carried out, the protocol fields content that the setting image sources are asked is extracted, obtains image descriptor;According to the figure
As descriptor loads the source images, binding described image descriptor and the customer service label.
Optionally, described image descriptor be associated with the network site of the source images or in physical storage at least one
Kind.
Optionally, there is the source images the first parameter combination, first parameter combination to be associated with noise reduction intensity, bilateral
Intensity filter, multi-scale enhancement intensity, display look-up table curve comparison degree or display look-up table curve level displacement.
Optionally, the transmission image processing requests handle the source images and generate target image, are based on the registration
The shared storage is written in the target image by information:Send image processing requests;To described image processing ask into
Row protocal analysis, the protocol fields content of extraction described image processing request, obtains the second parameter combination;Merge first ginseng
Array is closed and second parameter combination, obtains third parameter combination;It will be in the third parameter combination and the service unit
Algorithms library carry out matching and form matching result, the source images are handled based on the matching result, generate target image;It is based on
The shared storage is written in the target image by the log-on message.
Optionally, second parameter combination is associated with noise reduction intensity, bilateral filtering intensity, multi-scale enhancement intensity, shows
Show look-up table curve comparison degree or display look-up table curve level displacement.
Optionally, when merging first parameter combination and second parameter combination, if first parameter combination
It is different from second parameter combination, then it is subject to second parameter combination.
Optionally, the medical image processing method further includes:Discharge the shared storage.
Optionally, the medical image processing method handles the registration that multiple customer services are sent in the following way
Request, setting image sources request and described image processing request:Message queue one is provided, for preserving multiple user's industry
The registration request that business is sent;The registration request that the customer service is sent is inserted into one tail of the queue of message queue, and the service is single
Member processing is located at the registration request of one team of message queue head;Message queue two is provided, for preserving multiple customer service hairs
The setting image sources request sent;Two team of message queue is inserted into the setting image sources request that the customer service is sent
Tail, the service unit processing are located at the setting image sources request of two team of message queue head;Message queue three is provided, is used
In the image processing requests for preserving multiple customer services transmissions;The image processing requests that the customer service is sent disappear described in being inserted into
Three tail of the queue of queue is ceased, the service unit processing is located at the image processing requests of three team of message queue head.
Technical solution of the present invention also provides a kind of client, has at least one customer service, for being sent to server
For registration request to generate shared storage corresponding with the customer service, the registration request includes customer service label;Or it uses
It is asked in sending setting image sources, the setting image sources request includes image descriptor;Or for sending image procossing
Request;Or the target image obtained after processing for reading source images from the shared storage.
Technical solution of the present invention also provides a kind of server, including service unit, the note for receiving customer service transmission
Volume request generates shared storage and log-on message corresponding with the customer service, the registration request packet according to customer service
Include customer service label;Or for loading source images;Or for handling the source images and generating target image, and based on described
The shared storage is written in the target image by log-on message.
Correspondingly, technical solution of the present invention also provides a kind of magic magiscan, including the client and described
Server.
Optionally, communication port is established by socket between the client and the server.
Compared with prior art, in technical solution of the present invention, the customer service by registration is needed when handling medical image
It to send and ask to service unit;Service unit distributes independent shared storage for storing the target obtained after source images processing
Image.Above-mentioned image processing operations by service unit by algorithms library independently of each customer service, have the following advantages that:
It is relied on without interface between algorithms library and application program, the algorithms library in service unit can be with arbitrary extension, Yong Huye
Business calls the algorithms library after extension that need not recompilate to adapt to the variation of interface;Algorithms library runs on server end, can be with
It is fast to start speed for the independent startup prior to customer service;In addition, since customer service takes up less resources, therefore, it can start simultaneously
Multiple customer services and system resource will not be caused nervous, resource caused by reducing multiple customer services while calling algorithms library
Redundancy consumes, and improves the stability and efficiency of system.
Specific implementation mode
To make the above purposes, features and advantages of the invention more obvious and understandable, below in conjunction with the accompanying drawings to the present invention
Specific implementation mode be described in detail.Detail is elaborated in the following description in order to fully understand the present invention.But
It is the present invention with a variety of to implement different from other manner described here, those skilled in the art can be without prejudice to originally
Similar popularization is done in the case of invention intension.Therefore the present invention is not limited by following public specific implementation mode.
As stated in the background art, each application program is needed as mutually independent process in the work station of Medical Devices
Load image Processing Algorithm library respectively, and individually distribution resource is used for image processing algorithm library.For example, refering to fig. 1, scheme
1 is the image processing method schematic diagram that loading algorithm library is repeated in existing medical equipments work station.First application program
When Application1 handles source images, one piece of memory field is distributed for loading the first algorithms library
AlgorithmLibrary1;When second application program Application2 handles source images, another piece of memory field is distributed
For loading the second algorithms library AlgorithmLibrary2;Third application program Application3 handles source images
When, another piece of memory field is distributed for loading the first algorithms library AlgorithmLibrary1 and the second algorithms library
AlgorithmLibrary2。
What the memory field and third application program Application3 of the first application program Application1 distribution distributed
Memory field is all loaded with the first algorithms library AlgorithmLibrary1;The memory of second application program Application2 distribution
The memory field of area and the Application3 distribution of third application program is all loaded with the second algorithms library AlgorithmLibrary2.
Inventor has found that each independent loading algorithm library of application program, corresponding algorithms library will be more
Secondary load repeats to occupy resource.Operation needs the different application in identical image Processing Algorithm library simultaneously, system can be caused to provide
The waste in source, processing speed reduce.For the algorithms library comprising complicated algorithm, treatment effeciency reduction is especially apparent.In addition, each
Application program needs the algorithms library loaded not exactly the same, if some application program changes with the interface of corresponding algorithms library,
Such as increase interface, then the function entrance point of the algorithms library may be caused to change, other applications can not normal load
The algorithms library, and need to reload after recompilating.
Based on this, technical solution of the present invention provides a kind of medical image processing method, and the method is asked according to customer service
Service unit is asked to handle source images, the service unit has polyalgorithm library.Referring to Fig.2, Fig. 2 is implementation of the present invention
The flow chart of the medical image processing method of mode.The method includes:
S10:Customer service is registered, shared storage and note corresponding with the customer service are generated according to the customer service
Volume information;
S20:Load source images;
S30:Image processing requests are sent, the source images is handled and generates target image, it will based on the log-on message
The shared storage is written in the target image;
S40:The target image is read, the shared storage is discharged.
The source images refer to the original image that the electric signal exported by detector in Medical Devices directly obtains.The source
Image has the first parameter combination, and it is strong that first parameter combination is associated with noise reduction intensity, bilateral filtering intensity, multi-scale enhancement
Degree, display look-up table curve comparison degree or display look-up table curve level displacement.
Source images can be stored in the physical storage in medical equipments work station, can be stored in Medical Devices work
Network site except standing.The Medical Devices can be digital radiography(Digital Radiography, DR)If
Standby, 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 computed tomography(Positron Emission Tomography, PET)Equipment.
Above-mentioned medical image processing method is described in detail with reference to specific embodiment.In the present embodiment, first
Customer service needs to handle source images using the first algorithms library, and second user business needs to handle source figure using the second algorithms library
Picture, third customer service need to utilize the first algorithms library and the second algorithms library processing source images.
S10:Customer service is registered, shared storage and note corresponding with the customer service are generated according to the customer service
Volume information.The flow chart of customer service is registered in the medical image processing method for refering to Fig. 3, Fig. 3 being embodiment of the present invention.Step
Suddenly S10 includes:
S11. registration request is sent.Customer service 100 needs before request service unit 200 handles source images
First registered in service unit 200.Customer service 100 sends registration request CMD_REG to service unit 200.
S12. protocal analysis is carried out to the registration request, extracts the protocol fields content of the registration request, obtained and use
Family service label.Service unit 200 carries out protocal analysis to the registration request CMD_REG, extracts the registration request CMD_
The protocol fields content of REG obtains customer service label.Customer service label is the field for identity user business, can be with
It is the title of customer service, can also be the ID of customer service.
S13. it is based on the customer service label and generates log-on message corresponding with the customer service, generate shared storage
300, obtain shared storage label.The log-on message of customer service is associated with customer service label, as previously mentioned, customer service mark
Label are the fields for identity user business, can be the titles of customer service, can also be the ID of customer service, therefore, are used
The log-on message of family business can also identity user business.Other than identity user business, log-on message can also include user
Business sends out the time of registration request, executes the qualifications etc. of image processing operations.Shared storage label is for identifying altogether
The field of storage is enjoyed, can be the title of shared storage, can also be the ID of shared storage.
S14. the shared storage label is returned into the customer service.
In the present embodiment, the first customer service is registered first, and the first shared storage is generated according to first customer service
The first log-on message corresponding with first customer service.Specifically:
Step S11 is executed, the first customer service sends registration request CMD_REG_1 to service unit.
Step S12 is executed, the service unit carries out protocal analysis to the registration request CMD_REG_1, described in extraction
The protocol fields content of registration request CMD_REG_1 obtains the first customer service label.
Step S13 is executed, the service unit is based on the first customer service label and generates and the first user industry
It is engaged in corresponding first log-on message, the service unit generates the first shared storage, obtains the described first shared storage label.
Step S14 is executed, the described first shared storage label is returned to first customer service by the service unit.
The register method of second user business and third customer service is similar with first customer service, this is not repeated.
It should be noted that if multiple customer services send registration request to service unit, then message queue one is provided, used
In the registration request for preserving multiple customer services transmissions.The registration request that the customer service is sent is inserted into the message queue one
Tail of the queue, the service unit processing are located at the registration request of one team of message queue head.
In the present embodiment, if the first customer service, second user business and third customer service are single to service successively respectively
Member sends registration request CMD_REG_1, registration request CMD_REG_2, registration request CMD_REG_3, then the first customer service is sent out
The registration request CMD_REG_1 sent is firstly inserted into one tail of the queue of message queue;Then the registration request that second user business is sent
CMD_REG_2 is inserted into one tail of the queue of message queue, after coming registration request CMD_REG_1;Last third customer service is sent
Registration request CMD_REG_3 be inserted into one tail of the queue of message queue, after coming registration request CMD_REG_2.
When service unit handles the registration request of customer service, from one team of message queue, head takes out the first customer service first
Registration request CMD_REG_1 processing, further take out the registration request CMD_REG_2 processing of second user business, most
The registration request CMD_REG_3 processing of third customer service is taken out afterwards.
S20:Load source images.Source is loaded in the medical image processing method for refering to Fig. 4, Fig. 4 being embodiment of the present invention
The flow chart of image.Step S20 includes:
S21. setting image sources are sent to ask.
Customer service needs to send setting image sources request, such as before request service unit handles image
Shown in Fig. 4, customer service 100, which sends setting image sources, asks CMD_SET_IMAGE to service unit 200.
S22. the setting image sources are asked to carry out protocal analysis, extracts the agreement that the setting image sources are asked
Field contents obtain image descriptor.
Service unit 200 asks CMD_SET_IMAGE to carry out protocal analysis setting image sources, obtains iamge description
Symbol.Described image descriptor is associated at least one of network site or physical storage of the source images.For example, image
Descriptor can be associated with memory address, data-base recording, physical pathway or the network path for storing the source images.
S23. the source images are loaded according to described image descriptor, binds described image descriptor and the customer service
Label.
Service unit 200 loads source images according to the storage address of the source images carried in image descriptor.As previously mentioned,
Source images can be stored in the physical storage in medical equipments work station, can be stored in except medical equipments work station
Network site.Service unit 200 just loads source images from corresponding position.
In the present embodiment, service unit loads source images.Specifically:
Step S21 is executed, the first customer service sends setting image sources and asks CMD_SET_IMAGE_1.
Step S22 is executed, service unit carries out agreement point to setting image sources request CMD_SET_IMAGE_1
Analysis extracts the protocol fields content that the setting image sources ask CMD_SET_IMAGE_1, obtains the first image descriptor.
Step S23 is executed, the source images, binding described first image description are loaded according to described first image descriptor
Symbol and the first customer service label.
For second user business and third customer service, the method for loading source images is similar with the first customer service,
This is not repeated.
It asks to service unit, then to provide message it should be noted that if multiple customer services send setting image sources
Queue two, the setting image sources request sent for preserving multiple customer services.The setting image that the customer service is sent
Two tail of the queue of message queue is inserted into source request, and the service unit processing is located at the setting figure of two team of message queue head
As source is asked.
For example, if the first customer service, second user business and third customer service are sent to service unit successively
Image sources, which are arranged, asks CMD_SET_IMAGE_1, setting image sources to ask CMD_SET_IMAGE_2 and setting image sources
CMD_SET_IMAGE_3 is asked, then the setting image sources request CMD_SET_IMAGE_1 that the first customer service is sent is inserted first
Enter two tail of the queue of message queue;Then the setting image sources request CMD_SET_IMAGE_2 that second user business is sent is inserted into
Two tail of the queue of message queue comes and is arranged after image sources request CMD_SET_IMAGE_1;What last third customer service was sent
Setting image sources ask CMD_SET_IMAGE_3 to be inserted into two tail of the queue of message queue, come setting image sources and ask CMD_
After SET_IMAGE_2.
When service unit asks CMD_SET_IMAGE to carry out protocal analysis setting image sources, first from message queue
The setting image sources request CMD_SET_IMAGE_1 that two teams head takes out the first customer service carries out protocal analysis, further takes out the
The setting image sources request CMD_SET_IMAGE_2 of two customer services carries out protocal analysis, finally takes out third customer service
Registration request CMD_SET_IMAGE_3 carry out protocal analysis.
S30:Image processing requests are sent, the source images is handled and generates target image, it will based on the log-on message
The shared storage is written in the target image.Be refering to Fig. 5, Fig. 5 embodiment of the present invention medical image processing method in
Handle the flow chart of source images.Step S30 includes:
S31. image processing requests are sent.Customer service 100 sends image processing requests to service unit 200.
S32. protocal analysis is carried out to described image processing request, extraction described image is handled in the protocol fields of request
Hold, obtains the second parameter combination.It is strong that second parameter combination is associated with noise reduction intensity, bilateral filtering intensity, multi-scale enhancement
Degree, display look-up table curve comparison degree or display look-up table curve level displacement.
S33. merge first parameter combination and second parameter combination, obtain third parameter combination.Merging institute
When stating the first parameter combination and second parameter combination, if first parameter combination and the ginseng in second parameter combination
Number is identical, then third parameter combination can select the first parameter combination, can also select the second parameter combination;If first ginseng
Array is closed different from second parameter combination, then is subject to second parameter combination.
S34. the third parameter combination match forming matching result with the algorithms library in the service unit, base
In the matching result processing source images, target image is generated.
S35. it is based on the log-on message and the shared storage is written into the target image.Service unit 200 will be described
The shared storage 300 is written in target image.
In the present embodiment, the first customer service sends image processing requests, and the service unit processing source images simultaneously generate
Target image write-in first is shared storage by target image based on first log-on message.Specifically:
Step S31 is executed, the first customer service sends image processing requests CMD_PROCESS_IMAGE_ to service unit
1。
Step S32 is executed, the service unit carries out agreement to described image processing request CMD_PROCESS_IMAGE_1
Analysis, the protocol fields content of extraction described image processing request CMD_PROCESS_IMAGE_1, obtains the second parameter combination.
Step S33 is executed, first parameter combination and second parameter combination are merged, obtains third parameter combination.
Execute step S34, service unit carries out the algorithms library in the third parameter combination and the service unit
With matching result is formed, the source images are handled based on the matching result, generate target image.
Step S35 is executed, service unit is based on first log-on message and is total to target image write-in described first
Enjoy storage.
Second user business and the method for third customer service processing source images are similar with the first customer service, this does not go to live in the household of one's in-laws on getting married
It states.
It should be noted that if multiple customer services send image processing requests to service unit, then message queue is provided
Three, the image processing requests sent for preserving multiple customer services;The image processing requests that the customer service is sent are inserted into
Three tail of the queue of the message queue, the service unit processing are located at the image processing requests of three team of message queue head.
For example, if the first customer service, second user business and third customer service are respectively successively to service unit
Send image processing requests CMD_PROCESS_IMAGE_1, image processing requests CMD_PROCESS_IMAGE_1 and image procossing
CMD_PROCESS_IMAGE_1 is asked, then the image processing requests CMD_PROCESS_IMAGE_1 that the first customer service is sent is first
First be inserted into message queue three to tail;Then second user business sends image processing requests CMD_PROCESS_IMAGE_2 again
It is inserted into three tail of the queue of message queue, after coming image processing requests CMD_PROCESS_IMAGE_1;Last third customer service hair
The image processing requests CMD_PROCESS_IMAGE_3 sent is inserted into the tail of the queue of message queue three, comes image processing requests
After CMD_PROCESS_IMAGE_2.
When service unit carries out protocal analysis to image processing requests CMD_PROCESS_IMAGE, first from message queue
The image processing requests CMD_PROCESS_IMAGE_1 that three teams head takes out the first customer service carries out protocal analysis, further takes out the
The image processing requests CMD_PROCESS_IMAGE_2 of two customer services carries out protocal analysis, finally takes out third customer service
Image processing requests CMD_PROCESS_IMAGE_3 carry out protocal analysis.
S40:Read the target image.With continued reference to Fig. 4, customer service 100 is from described in 300 reading of shared storage
Target image.
In the present embodiment, after customer service 100 reads target image, the release of service unit 200 is shared to store 300.At it
In his embodiment, after customer service 100 reads target image, service unit 200 can also retain shared storage 300, for using
Family business 100 preserves target image when sending out image processing requests next time.
It should be noted that shared storage is distributed just for different customer services.Different customer service request services
Unit generates different shared storages, and no matter whether the algorithm that these customer services use is identical.Same customer service request clothes
Business unit generates same shared storage, if same customer service needs the source figure for using different algorithm process multiple and different respectively
Picture, then service return to multiple target images by same shared storage.
Technical solution of the present invention also provides a kind of client, has at least one customer service, for being sent to server
For registration request to generate shared storage corresponding with the customer service, the registration request includes customer service label;Or it uses
It is asked in sending setting image sources, the setting image sources request includes image descriptor;Or for sending image procossing
Request;Or the target image obtained after processing for reading source images from the shared storage.Described image descriptor closes
It is coupled at least one of network site or the physical storage of the source images.
Technical solution of the present invention also provides a kind of server, including service unit, the note for receiving customer service transmission
Volume request generates shared storage and log-on message corresponding with the customer service, the registration request packet according to customer service
Include customer service label;Or for loading source images;Or for handling the source images and generating target image, and based on described
The shared storage is written in the target image by log-on message.
The server further includes message queue unit, and the message queue unit includes:
Message queue one, the registration request sent for preserving multiple customer services;The registration that the customer service is sent
One tail of the queue of message queue is inserted into request, and the service unit processing is located at the registration request of one team of message queue head.
Message queue two, the setting image sources request sent for preserving multiple customer services;The customer service hair
Two tail of the queue of message queue is inserted into the setting image sources request sent, and the service unit processing is located at the message queue two
The setting image sources request of team's head.
Message queue three, the image processing requests sent for preserving multiple customer services;What the customer service was sent
Image processing requests are inserted into three tail of the queue of message queue, and the service unit processing is located at the figure of three team of message queue head
As processing request.
Correspondingly, technical solution of the present invention also provides a kind of magic magiscan, including above-mentioned client and service
Device.
It is the schematic diagram of the magic magiscan of embodiment of the present invention refering to Fig. 6, Fig. 6.One as the present invention
A specific embodiment, the magic magiscan include client one, client two ..., client N.Wherein, client
End one has N number of customer service, i.e. customer service 11 to customer service 1n;Client two has N number of customer service, i.e. user's industry
Business 21 to customer service 2n ... ..., client N have n customer service, i.e. customer service n1 to customer service nn.
The magic magiscan further includes server, and the server includes service unit and message queue list
Member.
Client one to one or more of client N customer services can send registration request to server, set
Image sources request or image processing requests are set, the registration request is inserted into the message queue one of message queue unit, described to set
The message queue two that message queue unit is inserted into image sources request is set, message queue unit is inserted into described image processing request
Message queue three.
Service unit generates shared storage corresponding with the customer service according to the registration request in message queue one.This
In embodiment, the first shared storage is used for business 11 corresponding to described, and the second shared storage is corresponding to the customer service
The shared storage of 12 ... ..., N corresponds to client traffic 1n.The corresponding shared storage of other users business, such as customer service 21
To shared storage or customer service n1 the sharing out out to customer service nn of customer service 2n, it is not shown in figure.
Service unit is according to setting image sources request of loading source images in message queue two.Service unit is according to message team
The image processing requests that three kinds of row handle source images, and target image is stored to correspondingly shared storage by treated.
Each customer service in client reads target image from correspondingly shared storage.
In the present embodiment, socket can be passed through between the client and the server(socket)It is logical to establish communication
Road.In other embodiments, mailslot can also be passed through between the client and the server(mailslot)Or its other party
Formula establishes communication port.
In conclusion in technical solution of the present invention, the customer service by registration when handling medical image, need to
Service unit sends request;Service unit distributes independent shared storage for storing the target figure obtained after source images processing
Picture.Above-mentioned image processing operations by service unit by algorithms library independently of each customer service, have the following advantages that:
It is relied on without interface between algorithms library and application program, the algorithms library in service unit can be with arbitrary extension, Yong Huye
Business calls the algorithms library after extension that need not recompilate to adapt to the variation of interface;Algorithms library runs on server end, can be with
It is fast to start speed for the independent startup prior to customer service;In addition, since customer service takes up less resources, therefore, it can start simultaneously
Multiple customer services and system resource will not be caused nervous, resource caused by reducing multiple customer services while calling algorithms library
Redundancy consumes, and improves the stability and efficiency of system.
The many aspects and embodiment of the present invention are disclosed above, it will be understood by those skilled in the art that its of the present invention
Its aspect and embodiment.Many aspects and embodiment disclosed in the present invention are only intended to for example, being not to this
The restriction of invention, real protection domain of the invention and spirit should be subject to claims.