Mercurial > hg > orthanc
comparison OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp @ 5583:74cc31c8db2b find-refactoring
removed FindResponse::Item::responseContent_
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 27 Apr 2024 22:15:37 +0200 |
parents | 17da828f9443 |
children | fc3914c07dd3 |
comparison
equal
deleted
inserted
replaced
5582:17da828f9443 | 5583:74cc31c8db2b |
---|---|
3870 isStable_(false), | 3870 isStable_(false), |
3871 expectedNumberOfInstances_(0), | 3871 expectedNumberOfInstances_(0), |
3872 fileSize_(0), | 3872 fileSize_(0), |
3873 indexInSeries_(0) | 3873 indexInSeries_(0) |
3874 { | 3874 { |
3875 if (item.HasResponseContent(FindRequest::ResponseContent_MainDicomTags)) | 3875 if (request.HasResponseContent(FindRequest::ResponseContent_MainDicomTags)) |
3876 { | 3876 { |
3877 tags_.Assign(item.GetDicomMap()); | 3877 tags_.Assign(item.GetDicomMap()); |
3878 } | 3878 } |
3879 | 3879 |
3880 if (item.HasResponseContent(FindRequest::ResponseContent_Children)) | 3880 if (request.HasResponseContent(FindRequest::ResponseContent_Children)) |
3881 { | 3881 { |
3882 childrenIds_ = item.GetChildren(); | 3882 childrenIds_ = item.GetChildren(); |
3883 } | 3883 } |
3884 | 3884 |
3885 if (item.HasResponseContent(FindRequest::ResponseContent_Parent)) | 3885 if (request.HasResponseContent(FindRequest::ResponseContent_Parent)) |
3886 { | 3886 { |
3887 parentId_ = item.GetIdentifiers().GetLevel(GetParentResourceType(request.GetLevel())); | 3887 parentId_ = item.GetIdentifiers().GetLevel(GetParentResourceType(request.GetLevel())); |
3888 } | 3888 } |
3889 | 3889 |
3890 if (item.HasResponseContent(FindRequest::ResponseContent_Metadata)) | 3890 if (request.HasResponseContent(FindRequest::ResponseContent_Metadata)) |
3891 { | 3891 { |
3892 metadata_ = item.GetMetadata(); | 3892 metadata_ = item.GetMetadata(); |
3893 std::string value; | 3893 std::string value; |
3894 if (item.LookupMetadata(value, MetadataType_MainDicomTagsSignature)) | 3894 if (item.LookupMetadata(value, MetadataType_MainDicomTagsSignature)) |
3895 { | 3895 { |
3921 indexInSeries_ = boost::lexical_cast<int>(value); | 3921 indexInSeries_ = boost::lexical_cast<int>(value); |
3922 } | 3922 } |
3923 } | 3923 } |
3924 } | 3924 } |
3925 | 3925 |
3926 if (item.HasResponseContent(FindRequest::ResponseContent_Labels)) | 3926 if (request.HasResponseContent(FindRequest::ResponseContent_Labels)) |
3927 { | 3927 { |
3928 labels_ = item.GetLabels(); | 3928 labels_ = item.GetLabels(); |
3929 } | 3929 } |
3930 | 3930 |
3931 if (item.HasResponseContent(FindRequest::ResponseContent_Attachments)) | 3931 if (request.HasResponseContent(FindRequest::ResponseContent_Attachments)) |
3932 { | 3932 { |
3933 FileInfo attachment; | 3933 FileInfo attachment; |
3934 if (item.LookupAttachment(attachment, FileContentType_Dicom)) | 3934 if (item.LookupAttachment(attachment, FileContentType_Dicom)) |
3935 { | 3935 { |
3936 fileSize_ = attachment.GetUncompressedSize(); | 3936 fileSize_ = attachment.GetUncompressedSize(); |
3937 fileUuid_ = attachment.GetUuid(); | 3937 fileUuid_ = attachment.GetUuid(); |
3938 } | 3938 } |
3939 } | 3939 } |
3940 | 3940 |
3941 if (item.HasResponseContent(FindRequest::ResponseContent_ChildrenMetadata)) | 3941 if (request.HasResponseContent(FindRequest::ResponseContent_ChildrenMetadata)) |
3942 { | 3942 { |
3943 // TODO-FIND: the status_ is normally obtained from transaction.GetSeriesStatus(internalId, i) | 3943 // TODO-FIND: the status_ is normally obtained from transaction.GetSeriesStatus(internalId, i) |
3944 // but, that's an heavy operation for something that is rarely used -> we should have dedicated SQL code | 3944 // but, that's an heavy operation for something that is rarely used -> we should have dedicated SQL code |
3945 // to compute it AFAP and we should compute it only if the user request it ! | 3945 // to compute it AFAP and we should compute it only if the user request it ! |
3946 } | 3946 } |