comparison OrthancFramework/Sources/DicomParsing/Internals/DicomImageDecoder.cpp @ 4138:1a26daefc3fe

DicomImageInformation::USEFUL_TAG_LENGTH
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 06 Aug 2020 17:56:10 +0200
parents 6774605d4341
children dbd74fa2f446
comparison
equal deleted inserted replaced
4137:6774605d4341 4138:1a26daefc3fe
249 249
250 // See also: http://support.dcmtk.org/wiki/dcmtk/howto/accessing-compressed-data 250 // See also: http://support.dcmtk.org/wiki/dcmtk/howto/accessing-compressed-data
251 251
252 DicomMap m; 252 DicomMap m;
253 std::set<DicomTag> ignoreTagLength; 253 std::set<DicomTag> ignoreTagLength;
254 FromDcmtkBridge::ExtractDicomSummary(m, dataset, ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); 254 FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::USEFUL_TAG_LENGTH, ignoreTagLength);
255 255
256 /** 256 /**
257 * Create an accessor to the raw values of the DICOM image. 257 * Create an accessor to the raw values of the DICOM image.
258 **/ 258 **/
259 259
322 ImageAccessor* DicomImageDecoder::CreateImage(DcmDataset& dataset, 322 ImageAccessor* DicomImageDecoder::CreateImage(DcmDataset& dataset,
323 bool ignorePhotometricInterpretation) 323 bool ignorePhotometricInterpretation)
324 { 324 {
325 DicomMap m; 325 DicomMap m;
326 std::set<DicomTag> ignoreTagLength; 326 std::set<DicomTag> ignoreTagLength;
327 FromDcmtkBridge::ExtractDicomSummary(m, dataset, ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); 327 FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::USEFUL_TAG_LENGTH, ignoreTagLength);
328 328
329 DicomImageInformation info(m); 329 DicomImageInformation info(m);
330 PixelFormat format; 330 PixelFormat format;
331 331
332 if (!info.ExtractPixelFormat(format, ignorePhotometricInterpretation)) 332 if (!info.ExtractPixelFormat(format, ignorePhotometricInterpretation))
603 throw OrthancException(ErrorCode_BadFileFormat); 603 throw OrthancException(ErrorCode_BadFileFormat);
604 } 604 }
605 605
606 DicomMap m; 606 DicomMap m;
607 std::set<DicomTag> ignoreTagLength; 607 std::set<DicomTag> ignoreTagLength;
608 FromDcmtkBridge::ExtractDicomSummary(m, dataset, ORTHANC_MAXIMUM_TAG_LENGTH, ignoreTagLength); 608 FromDcmtkBridge::ExtractDicomSummary(m, dataset, DicomImageInformation::USEFUL_TAG_LENGTH, ignoreTagLength);
609 DicomImageInformation info(m); 609 DicomImageInformation info(m);
610 610
611 std::unique_ptr<ImageAccessor> target(CreateImage(dataset, true)); 611 std::unique_ptr<ImageAccessor> target(CreateImage(dataset, true));
612 612
613 Uint32 startFragment = 0; // Default 613 Uint32 startFragment = 0; // Default