comparison OrthancServer/Internals/DicomFrameIndex.cpp @ 1957:b10a165e0e36

backward compatibility with DCMTK 3.6.0
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 06 Apr 2016 14:36:56 +0200
parents fc16ee04e71b
children b9bd52c72ba2
comparison
equal deleted inserted replaced
1956:fc16ee04e71b 1957:b10a165e0e36
319 319
320 320
321 321
322 bool DicomFrameIndex::IsVideo(DcmFileFormat& dicom) 322 bool DicomFrameIndex::IsVideo(DcmFileFormat& dicom)
323 { 323 {
324 if (dicom.getDataset()->getOriginalXfer() == EXS_MPEG2MainProfileAtMainLevel || 324 // Retrieve the transfer syntax from the DICOM header
325 dicom.getDataset()->getOriginalXfer() == EXS_MPEG2MainProfileAtHighLevel) 325 const char* value = NULL;
326 if (!dicom.getMetaInfo()->findAndGetString(DCM_TransferSyntaxUID, value).good() ||
327 value == NULL)
328 {
329 return false;
330 }
331
332 const std::string transferSyntax(value);
333
334 // Video standards supported in DICOM 2016a
335 // http://dicom.nema.org/medical/dicom/2016a/output/html/part05.html
336 if (transferSyntax == "1.2.840.10008.1.2.4.100" || // MPEG2 MP@ML option of ISO/IEC MPEG2
337 transferSyntax == "1.2.840.10008.1.2.4.101" || // MPEG2 MP@HL option of ISO/IEC MPEG2
338 transferSyntax == "1.2.840.10008.1.2.4.102" || // MPEG-4 AVC/H.264 High Profile / Level 4.1 of ITU-T H.264
339 transferSyntax == "1.2.840.10008.1.2.4.103" || // MPEG-4 AVC/H.264 BD-compat High Profile / Level 4.1 of ITU-T H.264
340 transferSyntax == "1.2.840.10008.1.2.4.104" || // MPEG-4 AVC/H.264 High Profile / Level 4.2 of ITU-T H.264
341 transferSyntax == "1.2.840.10008.1.2.4.105" || // MPEG-4 AVC/H.264 High Profile / Level 4.2 of ITU-T H.264
342 transferSyntax == "1.2.840.10008.1.2.4.106") // MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2 of the ITU-T H.264
326 { 343 {
327 return true; 344 return true;
328 } 345 }
329
330 #if DCMTK_VERSION_NUMBER > 360
331 // New transfer syntaxes introduced in the DICOM standard after DCMTK 3.6.0
332 if (dicom.getDataset()->getOriginalXfer() == EXS_MPEG4HighProfileLevel4_1 ||
333 dicom.getDataset()->getOriginalXfer() == EXS_MPEG4BDcompatibleHighProfileLevel4_1 ||
334 dicom.getDataset()->getOriginalXfer() == EXS_MPEG4HighProfileLevel4_2_For2DVideo ||
335 dicom.getDataset()->getOriginalXfer() == EXS_MPEG4HighProfileLevel4_2_For3DVideo ||
336 dicom.getDataset()->getOriginalXfer() == EXS_MPEG4StereoHighProfileLevel4_2)
337 {
338 return true;
339 }
340 #endif
341 346
342 return false; 347 return false;
343 } 348 }
344 349
345 350