comparison OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp @ 4507:b4c58795f3a8

widening the use of DicomTransferSyntax enum
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Feb 2021 09:33:48 +0100
parents d9473bd5ed43
children 8f9090b137f1
comparison
equal deleted inserted replaced
4506:ac69c9f76c71 4507:b4c58795f3a8
1681 FromDcmtkBridge::ExtractDicomSummary(target, *GetDcmtkObjectConst().getDataset(), 1681 FromDcmtkBridge::ExtractDicomSummary(target, *GetDcmtkObjectConst().getDataset(),
1682 maxTagLength, ignoreTagLength); 1682 maxTagLength, ignoreTagLength);
1683 } 1683 }
1684 1684
1685 1685
1686 bool ParsedDicomFile::LookupTransferSyntax(std::string& result) const 1686 bool ParsedDicomFile::LookupTransferSyntax(DicomTransferSyntax& result) const
1687 { 1687 {
1688 #if 0 1688 return FromDcmtkBridge::LookupOrthancTransferSyntax(result, GetDcmtkObjectConst());
1689 // This was the implementation in Orthanc <= 1.6.1
1690
1691 // TODO - Shouldn't "dataset.getCurrentXfer()" be used instead of
1692 // using the meta header?
1693 const char* value = NULL;
1694
1695 if (GetDcmtkObjectConst().getMetaInfo() != NULL &&
1696 GetDcmtkObjectConst().getMetaInfo()->findAndGetString(DCM_TransferSyntaxUID, value).good() &&
1697 value != NULL)
1698 {
1699 result.assign(value);
1700 return true;
1701 }
1702 else
1703 {
1704 return false;
1705 }
1706 #else
1707 DicomTransferSyntax s;
1708 if (FromDcmtkBridge::LookupOrthancTransferSyntax(s, GetDcmtkObjectConst()))
1709 {
1710 result.assign(GetTransferSyntaxUid(s));
1711 return true;
1712 }
1713 else
1714 {
1715 return false;
1716 }
1717 #endif
1718 } 1689 }
1719 1690
1720 1691
1721 bool ParsedDicomFile::LookupPhotometricInterpretation(PhotometricInterpretation& result) const 1692 bool ParsedDicomFile::LookupPhotometricInterpretation(PhotometricInterpretation& result) const
1722 { 1693 {
1785 1756
1786 bool ParsedDicomFile::LookupTransferSyntax(std::string& result) 1757 bool ParsedDicomFile::LookupTransferSyntax(std::string& result)
1787 { 1758 {
1788 return const_cast<const ParsedDicomFile&>(*this).LookupTransferSyntax(result); 1759 return const_cast<const ParsedDicomFile&>(*this).LookupTransferSyntax(result);
1789 } 1760 }
1761
1762 bool ParsedDicomFile::LookupTransferSyntax(std::string& result) const
1763 {
1764 DicomTransferSyntax s;
1765 if (LookupTransferSyntax(s))
1766 {
1767 result = GetTransferSyntaxUid(s);
1768 return true;
1769 }
1770 else
1771 {
1772 return false;
1773 }
1774 }
1790 1775
1791 bool ParsedDicomFile::GetTagValue(std::string& value, 1776 bool ParsedDicomFile::GetTagValue(std::string& value,
1792 const DicomTag& tag) 1777 const DicomTag& tag)
1793 { 1778 {
1794 return const_cast<const ParsedDicomFile&>(*this).GetTagValue(value, tag); 1779 return const_cast<const ParsedDicomFile&>(*this).GetTagValue(value, tag);