My goal is to send a dicom file to a remote AE using c# in visual studio 2010, I plan to implement the clearcanvas library, I have divided the task into 5 parts:
// //1 initiate tcp\ip connection
// //2 negotiate the association parameters to agree what can be done
// //3 send the dicom object
// //4 close the association
// //5 close the TCP/IP connection
I know storagescu will be involved in the sending part3), I tried looking things up on clearcanvas forum, the codes do not make much sense yet, so I do not know where to start from exactly, can anyone who had experience in sending dicom file to a remote ae give some clue about how I should even do my research? am I on the right track?
Your help will be greatly appreciated!
I built this on Clear Canvas specifically to be able to send extremely large files. Other programs I wrote failed on large size images so I made a stripped down version to send DICOM files in the size of multiple GB and it worked. Only command line and program.cs in this program. This is the simplest answer to the question of how to send a DICOM file using Clear Canvas.
There is one thing to note. You need a way to communicate between the thread launching the request and Clear Canvas, in this case a C-Store request from program.cs and the class AssociationHandler : IDicomClientHandler.
Here I just use a Boolean and a while loop before allowing the thread creating the request to proceed. In other programs I have used a multi-dimensional string array to hold values for each association, and I can perform any DICOM operation, C-Store, C-Move, C-Find, N-Action, ect, in a multi-threaded fashion with Clear Canvas. There simply is no better open source DICOM toolkit.
All you have to do to run this code is create a console application and work out the references to the Clear Canvas libraries. Please ask any questions.
Command Line Arguments are listed in the code for the help output.