Mercurial > hg > orthanc
comparison OrthancServer/Internals/FindScp.cpp @ 1787:1b1d5470233f worklists
refactoring of DicomFindAnswers
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 18 Nov 2015 15:50:32 +0100 |
parents | 164d78911382 |
children | 6a2d507ef064 |
comparison
equal
deleted
inserted
replaced
1786:164d78911382 | 1787:1b1d5470233f |
---|---|
85 #include "../FromDcmtkBridge.h" | 85 #include "../FromDcmtkBridge.h" |
86 #include "../ToDcmtkBridge.h" | 86 #include "../ToDcmtkBridge.h" |
87 #include "../../Core/Logging.h" | 87 #include "../../Core/Logging.h" |
88 #include "../../Core/OrthancException.h" | 88 #include "../../Core/OrthancException.h" |
89 | 89 |
90 | 90 #include <dcmtk/dcmdata/dcfilefo.h> |
91 | 91 |
92 namespace Orthanc | 92 namespace Orthanc |
93 { | 93 { |
94 namespace | 94 namespace |
95 { | 95 { |
132 if (sopClassUid == UID_FINDModalityWorklistInformationModel) | 132 if (sopClassUid == UID_FINDModalityWorklistInformationModel) |
133 { | 133 { |
134 if (data.worklistHandler_ != NULL) | 134 if (data.worklistHandler_ != NULL) |
135 { | 135 { |
136 // TODO | 136 // TODO |
137 std::auto_ptr<ParsedDicomFile> query(ParsedDicomFile::CreateFromDcmtkDataset(requestIdentifiers)); | 137 /*std::auto_ptr<ParsedDicomFile> query(ParsedDicomFile::CreateFromDcmtkDataset(requestIdentifiers)); |
138 DicomWorklistAnswers a; | 138 DicomWorklistAnswers a; |
139 data.worklistHandler_->Handle(a, *query, *data.remoteIp_, *data.remoteAet_); | 139 data.worklistHandler_->Handle(a, *query, *data.remoteIp_, *data.remoteAet_);*/ |
140 ok = true; | 140 ok = true; |
141 } | 141 } |
142 else | 142 else |
143 { | 143 { |
144 LOG(ERROR) << "No worklist handler is installed, cannot handle this C-FIND request"; | 144 LOG(ERROR) << "No worklist handler is installed, cannot handle this C-FIND request"; |
185 | 185 |
186 if (responseCount <= static_cast<int>(data.answers_.GetSize())) | 186 if (responseCount <= static_cast<int>(data.answers_.GetSize())) |
187 { | 187 { |
188 // There are pending results that are still to be sent | 188 // There are pending results that are still to be sent |
189 response->DimseStatus = STATUS_Pending; | 189 response->DimseStatus = STATUS_Pending; |
190 *responseIdentifiers = ToDcmtkBridge::Convert(data.answers_.GetAnswer(responseCount - 1)); | 190 |
191 void* obj = data.answers_.GetAnswer(responseCount - 1).GetDcmtkObject(); | |
192 DcmFileFormat* fileFormat = static_cast<DcmFileFormat*>(obj); | |
193 assert(fileFormat != NULL); | |
194 | |
195 *responseIdentifiers = new DcmDataset(*fileFormat->getDataset()); | |
191 } | 196 } |
192 else if (data.noCroppingOfResults_) | 197 else if (data.noCroppingOfResults_) |
193 { | 198 { |
194 // Success: All the results have been sent | 199 // Success: All the results have been sent |
195 response->DimseStatus = STATUS_Success; | 200 response->DimseStatus = STATUS_Success; |