Store Server Program Using C++ and DICOM Network Protocol
A storage server program is able to receive dicom images from a source AE such as console, store them on secure user account, which matches the key attribute of the image. Create scan sheet of the images that have been received, parse out important header information, and store that header information in a database.
It starts automatically at boot-in and running on port 104 in the background. If you don’t want the server running on port 104, edit store_server and run it on a new terminal window.
./store_server (no arguments)
To change port number you have to edit the port number as shown below.
store_server (Port number, './Temp', './handlerdb', 'store_server_config.cfg', 1);
After an images are received from a source AE, the store program will run another script (handlerdb). This script will be responsible for moving the images into the user account with a specific organization of the folder hierarchy, and store that header information into a database.
1. Waits for a source AE such as console to connect and initiate a DICOM association.
2. Receives the images from the console.
3. Moves the images to the user account.
4. Renames and sorts the images by file naming convention.
5. Generates a scan sheet for each study and saved under the user account
6. Writes the action to the log file and store it in /raid6/Dicom_code director
FILE NAMING CONVENTION
The image is saved under the requesting physician account if there is no account under requesting physician name, then it will saved into referral physician account, if the referral physician doesn't have an account too, than will saved under Guest account by requesting physician.
When there is no information in the image tags about requesting physician or referral physician fields, the image will be saved into Unknown account
In each account, has a Dicom folder in which the dicom files are stored in each Study folder and series folder with a .dcm file name convention 3-3-6 dgitis as shown below:
Study Folder/ Dicom/[series number_series name] Folder / [series number-echo number-Count].dcm
A diagram of typical folders and how they are organized is shown here
The server class program is made up three classes that handle tags, conversions, and network.
· load_tags(): Loads all of the tags from a DICOM file into an array.
· get_tag(): Returns the value of the group and element you specify.
· write_tags(): Writes the tags contained in an array you specify to a DICOM file.
· dcm_to_jpg(): DICOM to JPG. Converts a DICOM file into a JPEG
· dcm_to_tn(): DICOM to JPG thumbnail. Converts a DICOM file into a JPEG thumb nail.
· jpg_to_dcm(): JPG to DICOM. Takes the demographic info in an array you specify and a JPEG file, produces a DICOM file.
· storage(): Starts a DICOM receiver.
· echo(): Sends a DICOM ping.
· sender(): Sends a DICOM file to the AE host.
Post a Comment