Mercurial > hg > orthanc
comparison OrthancServer/ParsedDicomFile.cpp @ 2281:e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 09 Jun 2017 16:14:52 +0200 |
parents | a3a65de1840f |
children | b7fba68747f6 |
comparison
equal
deleted
inserted
replaced
2280:2e7a8ce24be2 | 2281:e002430baa41 |
---|---|
1407 | 1407 |
1408 bool ParsedDicomFile::LookupTransferSyntax(std::string& result) | 1408 bool ParsedDicomFile::LookupTransferSyntax(std::string& result) |
1409 { | 1409 { |
1410 return FromDcmtkBridge::LookupTransferSyntax(result, *pimpl_->file_); | 1410 return FromDcmtkBridge::LookupTransferSyntax(result, *pimpl_->file_); |
1411 } | 1411 } |
1412 | |
1413 | |
1414 bool ParsedDicomFile::LookupPhotometricInterpretation(PhotometricInterpretation& result) const | |
1415 { | |
1416 DcmTagKey k(DICOM_TAG_PHOTOMETRIC_INTERPRETATION.GetGroup(), | |
1417 DICOM_TAG_PHOTOMETRIC_INTERPRETATION.GetElement()); | |
1418 | |
1419 DcmDataset& dataset = *pimpl_->file_->getDataset(); | |
1420 | |
1421 const char *c = NULL; | |
1422 if (dataset.findAndGetString(k, c).good() && | |
1423 c != NULL) | |
1424 { | |
1425 result = StringToPhotometricInterpretation(c); | |
1426 return true; | |
1427 } | |
1428 else | |
1429 { | |
1430 return false; | |
1431 } | |
1432 } | |
1412 } | 1433 } |