Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/FindRequest.h @ 5621:732ec9feeea8 find-refactoring
introduction of FindRequest::ChildrenRetrieveSpecification
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 11 May 2024 15:43:07 +0200 |
parents | 1864b16bc7b1 |
children | 3f13db27b399 |
comparison
equal
deleted
inserted
replaced
5620:4bfd885fb45f | 5621:732ec9feeea8 |
---|---|
187 return metadata_; | 187 return metadata_; |
188 } | 188 } |
189 }; | 189 }; |
190 | 190 |
191 | 191 |
192 class ChildrenRetrieveSpecification : public boost::noncopyable | |
193 { | |
194 private: | |
195 bool identifiers_; | |
196 bool count_; | |
197 | |
198 public: | |
199 ChildrenRetrieveSpecification() : | |
200 identifiers_(false), | |
201 count_(false) | |
202 { | |
203 } | |
204 | |
205 void SetRetrieveIdentifiers(bool retrieve) | |
206 { | |
207 identifiers_ = retrieve; | |
208 } | |
209 | |
210 bool IsRetrieveIdentifiers() const | |
211 { | |
212 return identifiers_; | |
213 } | |
214 | |
215 void SetRetrieveCount(bool retrieve) | |
216 { | |
217 count_ = retrieve; | |
218 } | |
219 | |
220 bool IsRetrieveCount() const | |
221 { | |
222 return count_; | |
223 } | |
224 }; | |
225 | |
226 | |
192 private: | 227 private: |
193 // filter & ordering fields | 228 // filter & ordering fields |
194 ResourceType level_; // The level of the response (the filtering on tags, labels and metadata also happens at this level) | 229 ResourceType level_; // The level of the response (the filtering on tags, labels and metadata also happens at this level) |
195 OrthancIdentifiers orthancIdentifiers_; // The response must belong to this Orthanc resources hierarchy | 230 OrthancIdentifiers orthancIdentifiers_; // The response must belong to this Orthanc resources hierarchy |
196 std::deque<DatabaseConstraint> dicomTagConstraints_; // All tags filters (note: the order is not important) | 231 std::deque<DatabaseConstraint> dicomTagConstraints_; // All tags filters (note: the order is not important) |
208 bool retrieveAttachments_; | 243 bool retrieveAttachments_; |
209 bool retrieveParentIdentifier_; | 244 bool retrieveParentIdentifier_; |
210 ParentRetrieveSpecification retrieveParentPatient_; | 245 ParentRetrieveSpecification retrieveParentPatient_; |
211 ParentRetrieveSpecification retrieveParentStudy_; | 246 ParentRetrieveSpecification retrieveParentStudy_; |
212 ParentRetrieveSpecification retrieveParentSeries_; | 247 ParentRetrieveSpecification retrieveParentSeries_; |
213 bool retrieveChildrenIdentifiers_; | 248 ChildrenRetrieveSpecification retrieveChildrenStudies_; |
249 ChildrenRetrieveSpecification retrieveChildrenSeries_; | |
250 ChildrenRetrieveSpecification retrieveChildrenInstances_; | |
214 std::set<MetadataType> retrieveChildrenMetadata_; | 251 std::set<MetadataType> retrieveChildrenMetadata_; |
215 bool retrieveOneInstanceIdentifier_; | 252 bool retrieveOneInstanceIdentifier_; |
216 | 253 |
217 std::unique_ptr<MainDicomTagsRegistry> mainDicomTagsRegistry_; | 254 std::unique_ptr<MainDicomTagsRegistry> mainDicomTagsRegistry_; |
218 | 255 |
344 const ParentRetrieveSpecification& GetParentRetrieveSpecification(ResourceType level) const | 381 const ParentRetrieveSpecification& GetParentRetrieveSpecification(ResourceType level) const |
345 { | 382 { |
346 return const_cast<FindRequest&>(*this).GetParentRetrieveSpecification(level); | 383 return const_cast<FindRequest&>(*this).GetParentRetrieveSpecification(level); |
347 } | 384 } |
348 | 385 |
349 void SetRetrieveChildrenIdentifiers(bool retrieve); | 386 ChildrenRetrieveSpecification& GetChildrenRetrieveSpecification(ResourceType level); |
350 | 387 |
351 bool IsRetrieveChildrenIdentifiers() const | 388 const ChildrenRetrieveSpecification& GetChildrenRetrieveSpecification(ResourceType level) const |
352 { | 389 { |
353 return retrieveChildrenIdentifiers_; | 390 return const_cast<FindRequest&>(*this).GetChildrenRetrieveSpecification(level); |
354 } | 391 } |
355 | 392 |
356 void AddRetrieveChildrenMetadata(MetadataType metadata); | 393 void AddRetrieveChildrenMetadata(MetadataType metadata); |
357 | 394 |
358 bool IsRetrieveChildrenMetadata(MetadataType metadata) const | 395 bool IsRetrieveChildrenMetadata(MetadataType metadata) const |