Mercurial > hg > orthanc
comparison OrthancServer/ServerJobs/ResourceModificationJob.h @ 2868:abce036683cd
sharing code within OrthancRestAnonymizeModify
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 08 Oct 2018 17:05:19 +0200 |
parents | 8b00e4cb4a6b |
children | 4e43e67f8ecf |
comparison
equal
deleted
inserted
replaced
2867:251614c2edac | 2868:abce036683cd |
---|---|
38 | 38 |
39 namespace Orthanc | 39 namespace Orthanc |
40 { | 40 { |
41 class ResourceModificationJob : public SetOfInstancesJob | 41 class ResourceModificationJob : public SetOfInstancesJob |
42 { | 42 { |
43 public: | 43 private: |
44 class Output : public boost::noncopyable | 44 class Output; |
45 { | |
46 private: | |
47 boost::mutex mutex_; | |
48 ResourceType level_; | |
49 bool isFirst_; | |
50 std::string id_; | |
51 std::string patientId_; | |
52 | |
53 public: | |
54 Output(ResourceType level); | |
55 | |
56 ResourceType GetLevel() const | |
57 { | |
58 return level_; | |
59 } | |
60 | |
61 void Update(DicomInstanceHasher& hasher); | |
62 | |
63 bool Format(Json::Value& target); | |
64 | |
65 bool GetIdentifier(std::string& id); | |
66 }; | |
67 | 45 |
68 private: | |
69 ServerContext& context_; | 46 ServerContext& context_; |
70 std::auto_ptr<DicomModification> modification_; | 47 std::auto_ptr<DicomModification> modification_; |
71 boost::shared_ptr<Output> output_; | 48 boost::shared_ptr<Output> output_; |
72 bool isAnonymization_; | 49 bool isAnonymization_; |
73 DicomInstanceOrigin origin_; | 50 DicomInstanceOrigin origin_; |
86 | 63 |
87 ResourceModificationJob(ServerContext& context, | 64 ResourceModificationJob(ServerContext& context, |
88 const Json::Value& serialized); | 65 const Json::Value& serialized); |
89 | 66 |
90 void SetModification(DicomModification* modification, // Takes ownership | 67 void SetModification(DicomModification* modification, // Takes ownership |
68 ResourceType level, | |
91 bool isAnonymization); | 69 bool isAnonymization); |
92 | |
93 void SetOutput(boost::shared_ptr<Output>& output); | |
94 | 70 |
95 void SetOrigin(const DicomInstanceOrigin& origin); | 71 void SetOrigin(const DicomInstanceOrigin& origin); |
96 | 72 |
97 void SetOrigin(const RestApiCall& call); | 73 void SetOrigin(const RestApiCall& call); |
98 | 74 |