comparison OrthancServer/Sources/ServerJobs/OrthancPeerStoreJob.h @ 4153:a4664f169cd7

"/peers/{id}/store": New option "Compress" to compress DICOM data using gzip
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 23 Aug 2020 12:13:27 +0200
parents 05b8fd21089c
children d07cd8133e56
comparison
equal deleted inserted replaced
4152:36257d6f348f 4153:a4664f169cd7
48 ServerContext& context_; 48 ServerContext& context_;
49 WebServiceParameters peer_; 49 WebServiceParameters peer_;
50 std::unique_ptr<HttpClient> client_; 50 std::unique_ptr<HttpClient> client_;
51 bool transcode_; 51 bool transcode_;
52 DicomTransferSyntax transferSyntax_; 52 DicomTransferSyntax transferSyntax_;
53 bool compress_;
54 uint64_t size_;
53 55
54 protected: 56 protected:
55 virtual bool HandleInstance(const std::string& instance); 57 virtual bool HandleInstance(const std::string& instance);
56 58
57 virtual bool HandleTrailingStep(); 59 virtual bool HandleTrailingStep();
58 60
59 public: 61 public:
60 OrthancPeerStoreJob(ServerContext& context) : 62 OrthancPeerStoreJob(ServerContext& context) :
61 context_(context), 63 context_(context),
62 transcode_(false) 64 transcode_(false),
65 transferSyntax_(DicomTransferSyntax_LittleEndianExplicit), // Dummy value
66 compress_(false),
67 size_(0)
63 { 68 {
64 } 69 }
65 70
66 OrthancPeerStoreJob(ServerContext& context, 71 OrthancPeerStoreJob(ServerContext& context,
67 const Json::Value& serialize); 72 const Json::Value& serialize);
76 bool IsTranscode() const 81 bool IsTranscode() const
77 { 82 {
78 return transcode_; 83 return transcode_;
79 } 84 }
80 85
86 bool IsCompress() const
87 {
88 return compress_;
89 }
90
81 DicomTransferSyntax GetTransferSyntax() const; 91 DicomTransferSyntax GetTransferSyntax() const;
82 92
83 void SetTranscode(DicomTransferSyntax syntax); 93 void SetTranscode(DicomTransferSyntax syntax);
84 94
85 void SetTranscode(const std::string& transferSyntaxUid); 95 void SetTranscode(const std::string& transferSyntaxUid);
86 96
87 void ClearTranscode(); 97 void ClearTranscode();
98
99 void SetCompress(bool compress);
88 100
89 virtual void Stop(JobStopReason reason); // For pausing jobs 101 virtual void Stop(JobStopReason reason); // For pausing jobs
90 102
91 virtual void GetJobType(std::string& target) 103 virtual void GetJobType(std::string& target)
92 { 104 {