Mercurial > hg > orthanc
comparison OrthancServer/Internals/FindScp.cpp @ 1788:6a2d507ef064 worklists
getting rid of opaque data structures
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 18 Nov 2015 16:11:28 +0100 |
parents | 1b1d5470233f |
children | bdcc1dba4a53 |
comparison
equal
deleted
inserted
replaced
1787:1b1d5470233f | 1788:6a2d507ef064 |
---|---|
131 { | 131 { |
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 ParsedDicomFile query(*requestIdentifiers); |
137 /*std::auto_ptr<ParsedDicomFile> query(ParsedDicomFile::CreateFromDcmtkDataset(requestIdentifiers)); | 137 data.noCroppingOfResults_ = data.worklistHandler_->Handle(data.answers_, query, |
138 DicomWorklistAnswers a; | 138 *data.remoteIp_, *data.remoteAet_); |
139 data.worklistHandler_->Handle(a, *query, *data.remoteIp_, *data.remoteAet_);*/ | |
140 ok = true; | 139 ok = true; |
141 } | 140 } |
142 else | 141 else |
143 { | 142 { |
144 LOG(ERROR) << "No worklist handler is installed, cannot handle this C-FIND request"; | 143 LOG(ERROR) << "No worklist handler is installed, cannot handle this C-FIND request"; |
186 if (responseCount <= static_cast<int>(data.answers_.GetSize())) | 185 if (responseCount <= static_cast<int>(data.answers_.GetSize())) |
187 { | 186 { |
188 // There are pending results that are still to be sent | 187 // There are pending results that are still to be sent |
189 response->DimseStatus = STATUS_Pending; | 188 response->DimseStatus = STATUS_Pending; |
190 | 189 |
191 void* obj = data.answers_.GetAnswer(responseCount - 1).GetDcmtkObject(); | 190 DcmFileFormat& fileFormat = data.answers_.GetAnswer(responseCount - 1).GetDcmtkObject(); |
192 DcmFileFormat* fileFormat = static_cast<DcmFileFormat*>(obj); | 191 |
193 assert(fileFormat != NULL); | 192 // TODO Is there a way to avoid this copy? |
194 | 193 *responseIdentifiers = new DcmDataset(*fileFormat.getDataset()); |
195 *responseIdentifiers = new DcmDataset(*fileFormat->getDataset()); | |
196 } | 194 } |
197 else if (data.noCroppingOfResults_) | 195 else if (data.noCroppingOfResults_) |
198 { | 196 { |
199 // Success: All the results have been sent | 197 // Success: All the results have been sent |
200 response->DimseStatus = STATUS_Success; | 198 response->DimseStatus = STATUS_Success; |