Mercurial > hg > orthanc
changeset 3766:711d2ec2db34 transcoding
cont
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 17 Mar 2020 13:11:44 +0100 |
parents | 4a25727401cd |
children | 66e18aad0654 |
files | Core/DicomParsing/FromDcmtkBridge.cpp UnitTestsSources/FromDcmtkTests.cpp |
diffstat | 2 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/DicomParsing/FromDcmtkBridge.cpp Mon Mar 16 18:39:23 2020 +0100 +++ b/Core/DicomParsing/FromDcmtkBridge.cpp Tue Mar 17 13:11:44 2020 +0100 @@ -1317,7 +1317,7 @@ throw OrthancException(ErrorCode_InternalError); } else - { + { return (dicom.getDataset()->chooseRepresentation(xfer, representation).good() && dicom.getDataset()->canWriteXfer(xfer) && SaveToMemoryBufferInternal(buffer, dicom, xfer));
--- a/UnitTestsSources/FromDcmtkTests.cpp Mon Mar 16 18:39:23 2020 +0100 +++ b/UnitTestsSources/FromDcmtkTests.cpp Tue Mar 17 13:11:44 2020 +0100 @@ -2132,6 +2132,7 @@ return true; } else if (syntaxes.find(DicomTransferSyntax_JPEGProcess1) != syntaxes.end() && + allowNewSopInstanceUid && FromDcmtkBridge::Transcode(target, *dicom_, DicomTransferSyntax_JPEGProcess1, &rpLossy)) { return true; @@ -2303,7 +2304,8 @@ std::string s; //SystemToolbox::ReadFile(s, "/home/jodogne/Subversion/orthanc-tests/Database/TransferSyntaxes/1.2.840.10008.1.2.4.50.dcm"); //SystemToolbox::ReadFile(s, "/home/jodogne/DICOM/Alain.dcm"); - SystemToolbox::ReadFile(s, "/home/jodogne/Subversion/orthanc-tests/Database/Brainix/Epi/IM-0001-0002.dcm"); + //SystemToolbox::ReadFile(s, "/home/jodogne/Subversion/orthanc-tests/Database/Brainix/Epi/IM-0001-0002.dcm"); + SystemToolbox::ReadFile(s, "/home/jodogne/Subversion/orthanc-tests/Database/TransferSyntaxes/1.2.840.10008.1.2.1.dcm"); std::auto_ptr<DcmFileFormat> dicom(FromDcmtkBridge::LoadFromMemoryBuffer(s.c_str(), s.size())); @@ -2315,7 +2317,7 @@ #if 0 E_TransferSyntax target = EXS_LittleEndianExplicit; p = NULL; -#elif 1 +#elif 0 E_TransferSyntax target = EXS_JPEGProcess14SV1; DJ_RPLossless rp_lossless(6, 0); p = &rp_lossless; @@ -2335,7 +2337,7 @@ SystemToolbox::WriteFile(t, "target.dcm"); } - if (1) + if (0) { const char* const PATH = "/home/jodogne/Subversion/orthanc-tests/Database/TransferSyntaxes"; @@ -2355,7 +2357,7 @@ TestFile("/home/jodogne/Subversion/orthanc-tests/Database/Issue44/Monochrome1-Jpeg.dcm"); } - if (0) + if (1) { TestFile("/home/jodogne/Subversion/orthanc-tests/Database/TransferSyntaxes/1.2.840.10008.1.2.1.dcm"); }