rcd/fo-dicom — pull request #66 by chafey (2014-06-06 12:45:42+00:00)
Title: CStoreSCP changes to add flexibility for how received SopInstances are handled 

This pull request includes changes that allow DicomService derived classes to specify the Stream to write received SopInstances when handling a CStoreSCP request. This change enables the following use cases:
1) Option to avoid writing a temporary file. The default implementation creates a temporary file for each received SopInstance but there are cases where it is desirable to avoid this extra write (e.g. when sop instance are not stored as files on disk - database, a zip file, object storage, etc)
2) Option to avoid parsing the DICOM file. This is a side effect of allowing non seekable streams to be used for writing sop instances. Ideally fo-dicom would support creation of DicomFiles from non seekable streams but this is a larger change and outside the scope of what I wanted to do here. In some cases it might be desirable to not parse the incoming instance at all to maximize performance. A drawback to doing this is that you won't be able to tell the CStore SCU that the received Sop Instance is not processed so this should be considered as part of such a design.

I also added some documentation to DicomFile.Open() to describe that large elements (like PixelData) are loaded on demand (since it wasn't obvious to me and I had to post a question to the forum to discover this)