Mercurial > hg > orthanc
comparison Core/DicomNetworking/DicomUserConnection.cpp @ 3785:763533d6dd67 SylvainRouquette/fix-issue169-95b752c
add PreferredTransferSyntax to RemoteModalityParameters
DicomUserConnection can now use RemoteModalityParameters.PreferredTransferSyntax instead of using the default transfer syntax (LE-implicit).
This way we can transcode by default in LE-explicit.
fix issue #169
author | sylvain.rouquette@incepto-medical.com |
---|---|
date | Wed, 18 Mar 2020 08:59:06 +0100 |
parents | cf31b5bacce3 |
children | 3801435e34a1 |
comparison
equal
deleted
inserted
replaced
3541:4beabcea3a5c | 3785:763533d6dd67 |
---|---|
124 **/ | 124 **/ |
125 #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX | 125 #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX |
126 #endif | 126 #endif |
127 | 127 |
128 | 128 |
129 static const char* DEFAULT_PREFERRED_TRANSFER_SYNTAX = UID_LittleEndianImplicitTransferSyntax; | 129 static const std::string DEFAULT_PREFERRED_TRANSFER_SYNTAX = UID_LittleEndianImplicitTransferSyntax; |
130 | 130 |
131 /** | 131 /** |
132 * "If we have more than 64 storage SOP classes, tools such as | 132 * "If we have more than 64 storage SOP classes, tools such as |
133 * storescu will fail because they attempt to negotiate two | 133 * storescu will fail because they attempt to negotiate two |
134 * presentation contexts for each SOP class, and there is a total | 134 * presentation contexts for each SOP class, and there is a total |
898 | 898 |
899 | 899 |
900 void DicomUserConnection::DefaultSetup() | 900 void DicomUserConnection::DefaultSetup() |
901 { | 901 { |
902 preferredTransferSyntax_ = DEFAULT_PREFERRED_TRANSFER_SYNTAX; | 902 preferredTransferSyntax_ = DEFAULT_PREFERRED_TRANSFER_SYNTAX; |
903 modalityPreferredTransferSyntax_ = DEFAULT_PREFERRED_TRANSFER_SYNTAX; | |
903 localAet_ = "STORESCU"; | 904 localAet_ = "STORESCU"; |
904 remoteAet_ = "ANY-SCP"; | 905 remoteAet_ = "ANY-SCP"; |
905 remoteHost_ = "127.0.0.1"; | 906 remoteHost_ = "127.0.0.1"; |
906 remotePort_ = 104; | 907 remotePort_ = 104; |
907 manufacturer_ = ModalityManufacturer_Generic; | 908 manufacturer_ = ModalityManufacturer_Generic; |
949 { | 950 { |
950 SetRemoteApplicationEntityTitle(parameters.GetApplicationEntityTitle()); | 951 SetRemoteApplicationEntityTitle(parameters.GetApplicationEntityTitle()); |
951 SetRemoteHost(parameters.GetHost()); | 952 SetRemoteHost(parameters.GetHost()); |
952 SetRemotePort(parameters.GetPortNumber()); | 953 SetRemotePort(parameters.GetPortNumber()); |
953 SetRemoteManufacturer(parameters.GetManufacturer()); | 954 SetRemoteManufacturer(parameters.GetManufacturer()); |
955 SetPreferredTransferSyntax(parameters.GetPreferredTransferSyntax()); | |
956 modalityPreferredTransferSyntax_ = parameters.GetPreferredTransferSyntax(); | |
954 } | 957 } |
955 | 958 |
956 | 959 |
957 void DicomUserConnection::SetLocalApplicationEntityTitle(const std::string& aet) | 960 void DicomUserConnection::SetLocalApplicationEntityTitle(const std::string& aet) |
958 { | 961 { |
981 } | 984 } |
982 } | 985 } |
983 | 986 |
984 void DicomUserConnection::ResetPreferredTransferSyntax() | 987 void DicomUserConnection::ResetPreferredTransferSyntax() |
985 { | 988 { |
986 SetPreferredTransferSyntax(DEFAULT_PREFERRED_TRANSFER_SYNTAX); | 989 SetPreferredTransferSyntax(modalityPreferredTransferSyntax_); |
987 } | 990 } |
988 | 991 |
989 void DicomUserConnection::SetPreferredTransferSyntax(const std::string& preferredTransferSyntax) | 992 void DicomUserConnection::SetPreferredTransferSyntax(const std::string& preferredTransferSyntax) |
990 { | 993 { |
991 if (preferredTransferSyntax_ != preferredTransferSyntax) | 994 if (preferredTransferSyntax_ != preferredTransferSyntax) |