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.
SYNOPSIS
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);
DESCRIPTION
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
Specifics
The server class program is made up three classes that handle tags, conversions, and network.
Class tag
· 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.
Class convert
· 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.
Class net
· storage(): Starts a DICOM receiver.
· echo(): Sends a DICOM ping.
· sender(): Sends a DICOM file to the AE host.

great
ReplyDeleteMedical Image Processing Projects A store server application for DICOM images is designed to securely receive, store, and manage medical imaging data in the DICOM format. These servers, often known as PACS (Picture Archiving and Communication Systems), handle large volumes of imaging data from modalities such as CT, MRI, and X-ray machines. The server typically supports DICOM protocols like C-STORE for image storage and C-FIND/C-MOVE for querying and retrieval. Efficient indexing, metadata management, and compression techniques are used to optimize storage and access speed.
ReplyDeleteFor image processing, the server integrates with processing pipelines or AI models to analyze medical images for tasks such as segmentation, detection, and diagnosis support. Open-source solutions like Orthanc and DCM4CHEE are commonly used to build such systems. These platforms can be extended with plugins or APIs to enable automated workflows, including preprocessing, feature extraction, and visualization. Security and compliance (such as HIPAA) are crucial, requiring encryption, access control, and audit logging to protect sensitive patient data while enabling efficient and scalable image processing. Image Processing Projects For Final Year