comparison Core/DicomNetworking/DicomFindAnswers.cpp @ 3786:3801435e34a1 SylvainRouquette/fix-issue169-95b752c

integration Orthanc-1.6.0->SylvainRouquette
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 19 Mar 2020 11:48:30 +0100
parents 2a170a8f1faf
children 884b55ce01f6
comparison
equal deleted inserted replaced
3785:763533d6dd67 3786:3801435e34a1
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium 4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium 5 * Copyright (C) 2017-2020 Osimis S.A., Belgium
6 * 6 *
7 * This program is free software: you can redistribute it and/or 7 * This program is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as 8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation, either version 3 of the 9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version. 10 * License, or (at your option) any later version.
44 44
45 namespace Orthanc 45 namespace Orthanc
46 { 46 {
47 void DicomFindAnswers::AddAnswerInternal(ParsedDicomFile* answer) 47 void DicomFindAnswers::AddAnswerInternal(ParsedDicomFile* answer)
48 { 48 {
49 std::auto_ptr<ParsedDicomFile> protection(answer); 49 std::unique_ptr<ParsedDicomFile> protection(answer);
50 50
51 if (isWorklist_) 51 if (isWorklist_)
52 { 52 {
53 // These lines are necessary when serving worklists, otherwise 53 // These lines are necessary when serving worklists, otherwise
54 // Orthanc does not behave as "wlmscpfs" 54 // Orthanc does not behave as "wlmscpfs"
164 // http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1.1.3 164 // http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1.1.3
165 // https://groups.google.com/d/msg/orthanc-users/D3kpPuX8yV0/_zgHOzkMEQAJ 165 // https://groups.google.com/d/msg/orthanc-users/D3kpPuX8yV0/_zgHOzkMEQAJ
166 166
167 DcmDataset& source = *GetAnswer(index).GetDcmtkObject().getDataset(); 167 DcmDataset& source = *GetAnswer(index).GetDcmtkObject().getDataset();
168 168
169 std::auto_ptr<DcmDataset> target(new DcmDataset); 169 std::unique_ptr<DcmDataset> target(new DcmDataset);
170 170
171 for (unsigned long i = 0; i < source.card(); i++) 171 for (unsigned long i = 0; i < source.card(); i++)
172 { 172 {
173 const DcmElement* element = source.getElement(i); 173 const DcmElement* element = source.getElement(i);
174 assert(element != NULL); 174 assert(element != NULL);