DICOM data <--> buffer using ITK/GDCM


I need to write/read arbitrary DICOM Data Sets and Data Elements to/from memory buffers to facilitate data exchange between nodes in a distributed application. The Data Elements I’m interested in include Sequences (Value Representation=SQ) that contain other (nested) Data Elements. Can anyone advise on the best way to do this?

Specifically, are the Write() and Read() functions provided by the gdcm::DataSet and gdcm::DataElement classes enough for the above purpose? If yes, what template arguments should I provide to these functions’ template parameters TDE and TSwap to get best performance? I did some simple tests with these functions using gdcm::ImplicitDataElement and gdcm::SwapperNoOp as template arguments, and these tests have been successful. I’m looking for confirmation that this approach is the best available within ITK/GDCM, for any caveats or limitations regarding Read()/Write() that I should keep in mind, and the best options for TDE and TSwap.

Thanks much,