Mercurial > hg > orthanc
comparison UnitTestsSources/FromDcmtkTests.cpp @ 3868:d5be23fc0106 transcoding
better negotiation of transfer syntaxes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 Apr 2020 08:43:48 +0200 |
parents | 594263db316a |
children | 5797d184de67 |
comparison
equal
deleted
inserted
replaced
3866:e1c2bc9a5cc1 | 3868:d5be23fc0106 |
---|---|
2518 params.SetLocalApplicationEntityTitle("ORTHANC"); | 2518 params.SetLocalApplicationEntityTitle("ORTHANC"); |
2519 params.SetRemoteApplicationEntityTitle("STORESCP"); | 2519 params.SetRemoteApplicationEntityTitle("STORESCP"); |
2520 params.SetRemotePort(2000); | 2520 params.SetRemotePort(2000); |
2521 | 2521 |
2522 DicomStoreUserConnection assoc(params); | 2522 DicomStoreUserConnection assoc(params); |
2523 assoc.PrepareStorageClass(UID_MRImageStorage, DicomTransferSyntax_JPEGProcess1); | 2523 assoc.RegisterStorageClass(UID_MRImageStorage, DicomTransferSyntax_JPEGProcess1); |
2524 assoc.PrepareStorageClass(UID_MRImageStorage, DicomTransferSyntax_JPEGProcess2_4); | 2524 assoc.RegisterStorageClass(UID_MRImageStorage, DicomTransferSyntax_JPEGProcess2_4); |
2525 //assoc.PrepareStorageClass(UID_MRImageStorage, DicomTransferSyntax_LittleEndianExplicit); | 2525 //assoc.RegisterStorageClass(UID_MRImageStorage, DicomTransferSyntax_LittleEndianExplicit); |
2526 | 2526 |
2527 //assoc.SetUncompressedSyntaxesProposed(false); // Necessary for transcoding | 2527 //assoc.SetUncompressedSyntaxesProposed(false); // Necessary for transcoding |
2528 //assoc.SetCommonClassesProposed(false); | 2528 //assoc.SetCommonClassesProposed(false); |
2529 TestTranscode(assoc, UID_MRImageStorage, DicomTransferSyntax_JPEG2000); | 2529 TestTranscode(assoc, UID_MRImageStorage, DicomTransferSyntax_JPEG2000); |
2530 TestTranscode(assoc, UID_MRImageStorage, DicomTransferSyntax_LittleEndianExplicit); | 2530 TestTranscode(assoc, UID_MRImageStorage, DicomTransferSyntax_LittleEndianExplicit); |
2531 } | 2531 } |
2532 | 2532 |
2533 | |
2534 TEST(Toto, DISABLED_Store2) | |
2535 { | |
2536 DicomAssociationParameters params; | |
2537 params.SetLocalApplicationEntityTitle("ORTHANC"); | |
2538 params.SetRemoteApplicationEntityTitle("STORESCP"); | |
2539 params.SetRemotePort(2000); | |
2540 | |
2541 DicomStoreUserConnection assoc(params); | |
2542 //assoc.SetCommonClassesProposed(false); | |
2543 assoc.SetRetiredBigEndianProposed(true); | |
2544 | |
2545 std::string s; | |
2546 Orthanc::SystemToolbox::ReadFile(s, "/tmp/i/" + std::string(GetTransferSyntaxUid(DicomTransferSyntax_BigEndianExplicit)) +".dcm"); | |
2547 | |
2548 std::string c, i; | |
2549 assoc.Store(c, i, s.c_str(), s.size()); | |
2550 printf("[%s] [%s]\n", c.c_str(), i.c_str()); | |
2551 } | |
2552 | |
2533 #endif | 2553 #endif |