I have posted projects recently illustrating how to create DICOM files using H.264 compressed data (see:
HOW TO: Create DICOM files with H.264 compressed video). Creating the files was one hurdle, but in order to make use of this, it is also important to know how to enabled these files to be stored in a PACS server. By default, H.264 compression is not supported by the LEADTOOLS PACS Server Manager, but it is easy to add with a couple lines of code.
To make a change to the supported IODs we will need to update the sample store add-in. This project can be found in the SDK setup here:
\Examples\DotNet\PACSFramework\CS\Sample AddIns\Leadtools.AddIn.Store
We need to update the StoreAddin class in StoreAddin.cs. In my prior example, the SOP class I used was Video Photographic Image Storage. So I searched for this in the code, and added the DICOM UID types for MPEG-4 AVC/H.264 Blu-Ray Compatible and MPEG-4 AVC/H.264 High Profile Level 4.1. The change looks like this:
Code:[PresentationContext(DicomUidType.VideoPhotographicImageStorage, DicomUidType.ImplicitVRLittleEndian,
DicomUidType.JPEG2000,
DicomUidType.JPEG2000LosslessOnly,
DicomUidType.JPEGBaseline1,
DicomUidType.JPEGExtended2_4,
DicomUidType.ExplicitVRBigEndian,
DicomUidType.ExplicitVRLittleEndian,
DicomUidType.JPEGLosslessNonhier14,
DicomUidType.JPEGLosslessNonhier14B,
DicomUidType.Mpeg4AvcH264BdCompatibleHighProfileLevel_4_1,
DicomUidType.Mpeg4AvcH264HighProfileLevel4_1)]
If you wanted to also support MPEG-2 compression as well, this could also be done like so:
Code:[PresentationContext(DicomUidType.VideoPhotographicImageStorage, DicomUidType.ImplicitVRLittleEndian,
DicomUidType.JPEG2000,
DicomUidType.JPEG2000LosslessOnly,
DicomUidType.JPEGBaseline1,
DicomUidType.JPEGExtended2_4,
DicomUidType.ExplicitVRBigEndian,
DicomUidType.ExplicitVRLittleEndian,
DicomUidType.JPEGLosslessNonhier14,
DicomUidType.JPEGLosslessNonhier14B,
DicomUidType.Mpeg4AvcH264BdCompatibleHighProfileLevel_4_1,
DicomUidType.Mpeg4AvcH264HighProfileLevel4_1,
DicomUidType.MPEG2MainProfileHighLevel,
DicomUidType.MPEG2MainProfileMainLevel)]
With the code changed, now it's time to build. The DLL will be outputted into the PACSAddins directory, which in my case was here:
\Bin\DotNet4\x64\PACSAddIns\
The DLL needs to be copied into the addins directory for the PACS Server Manager. I configured and am running the x64 bit server, so the folder is here for me:
[LEADTOOLS install]\Bin\Dotnet4\x64\LT_SERVER64\AddIns
You will need to make sure to stop and restart the server for this change to take effect.
Note: I made sure to stop all of the x64 PACS services I had running and then restarted them. This was to make sure the Leadtools.Dicom.Server.exe was completely removed from memory and then re-loaded so no DLLs could be stored in memory. You may need to do the same as well.
Edited by user Friday, December 29, 2017 8:47:02 AM(UTC)
| Reason: Removed specific version number
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.