Skip to main content

Store server application for dicom images



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. 



Comments

Popular posts from this blog

Analyzing Net Promoter Score using Machine Learning

Overview This article presents a reference implementation of a Net Promoter score analysis project that is built by using Machine Learning. In this article, we will discuss associated generic models for holistically solving the problem of industrial Net Promoter score. We also measure the accuracy of models that are built by using Machine Learning and assess directions for further development. Net Promoter Score The Net Promoter Score is an index ranging from 0 to 10 that measures the customer’s loyalty to the brand. Calculation Customers are surveyed on one single question.  “On a scale of 0 to 10, how likely are you to recommend this company’s product or service to a friend or a colleague?” Based on their rating, customers are then classified into 3 categories: detractors, passives, and promoters. continue.......

3D Medical Image Segmentation

This work is based on a Maximum a Posteriori (MAP) estimate of a log-likelihood function that accounts for the shape priori, the spatial interaction, and the current appearance of the tissues and its background (surrounding anatomical structures). Illustration of the Joint Markov-Gibbs random field (MGRF) image  model  Main references: Novel stochastic framework for accurate segmentation of prostate in dynamic contrast  enhanced MRI  International Workshop on Prostate Cancer Imaging, 121-130 A new 3D automatic segmentation framework for accurate segmentation of prostate from DCE-MRI  2011 IEEE International Symposium on Biomedical Imaging: From Nano to Macro

A NOVEL IMAGE-BASED APPROACH FOR EARLY DETECTION OF PROSTATE CANCER USING DCE-MRI

This blog presents a novel non-invasive approach for early diagnosis of prostate cancer from dynamic contrast enhanced magnetic resonance imaging (DCE-MRI).  In order to precisely analyze the complex 3D DCE-MRI of the prostate, a novel processing frame work that consists of four main steps is proposed. The first step is to isolate the prostate from the surrounding anatomical structures based on a Maximum a Posteriori (MAP) estimate of a log likelihood function that accounts for the shape priori, the spatial interaction, and the current appearance of the prostate tissues and its background (surrounding anatomical structures). In the second step, a non-rigid registration algorithm is employed to account for any local deformation that could occur in the prostate during the scanning process due to the patient’s breathing and local motion.  In the third step, the perfusion curves that show propagation of the contrast agent into the tissue are obtained fr...