Express PACS Import: 25 Projects in 25 Days

As part of the LEAD Technologies 25th anniversary, we are creating 25 projects in 25 days to celebrate LEAD’s depth of features and ease of use. Today’s project comes from James.

What it Does

This project will monitor a folder and import DICOM files into a PACS Storage Server using LEADTOOLS Version 19.

Features Used

Development Progress Journal

Hello, my name is James I’m going to write a service that monitors a folder that will automatically import DICOM files directly into the LEADTOOLS PACS Storage Server database without using DICOM C-STORE when you drop them into the folder. I will also be writing a Service Manager interface to go along with this.

Using LEADTOOLS Medical SDKs will save me valuable time while extracting and storing the information out of DICOM files. Otherwise, this would require many hours to learn and code.

First, I am going to need to determine a way to insert all of the data from the file into the PACS Storage Server database. I know there is a way to do this with the LEADTOOLS data access layer. Let me take a look at the documentation.

Ok, it looks like I can use the LEADTOOLS StorageSQLDbDataAccessAgent to take care of this for me.
Documentation: StorageSqlDbDataAccessAgent Class

I am going to need to use the LEADTOOLS DicomDataSet class as this, combined with the StorageSQLDbDataAccessAget, is going to make easy work of extracting and storing all of the information I am going to need from the DICOM files.
Documentation: DicomDataSet class

I have finished writing the Service Manager interface which controls the service, displays the current state of the service, and allows the user to configure their settings. This took approximately 1.5 hours to complete.

I am going to use the StoreDicom method of the StorageSQLDbDataAccessAgent class to store the information I need from the DICOM files.
Documentation: StoreDicom Method

I have finished writing out the StoreDicom method that will validate the file the user puts in the folder and extract all of the information I am going to need to proceed. This only took approximately 1 hour to complete with the help of the LEADTOOLS StorageSQLDbDataAccessAgent class.

I need to make sure I put the files that the service says are invalid somewhere so they can still be accessed later for review

Now, I just need to put all of this together in a Work class that I’ll create and wrap everything up.

Everything has been consolidated into my Work class. This took approximately 1 hour to complete.

I successfully stored a DICOM file to the PACS Storage Server by dragging it into the monitored folder. So far, I have 3.5 hours total invested in this application. Now, I want to test some DICOM files that do not have all the information in them to be sure they are caught and properly stored by the service.

I have added some more error checking to handle any type of file being dropped into the folder. I also added some comments to the code for easier reading.

This application is done and done! It only took me a total of 4.5 hours to put this together, including testing and debugging. Without LEADTOOLS Medical Imaging SDKs, I cannot even imagine how long a task like this would take.

Download the Project

The source code for this sample project can be downloaded from here. To run the project, extract it to the C:\LEADTOOLS 19\Examples\DotNet\CS directory.


LEAD Technologies, Inc.

This entry was posted in Medical Imaging and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *