newDicomElement.patch 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. Author: Gert Wollny <gewo@debian.org>
  2. Description: correct code for newDicomElement now being a member of DcmItem
  3. Bug: https://bugs.debian.org/865591
  4. --- a/imagepool/netloader.cpp
  5. +++ b/imagepool/netloader.cpp
  6. @@ -102,29 +102,29 @@ bool NetLoader::run() {
  7. DcmDataset query;
  8. DcmElement* e = NULL;
  9. - e = newDicomElement(DCM_QueryRetrieveLevel);
  10. + e = DcmItem::newDicomElement(DCM_QueryRetrieveLevel);
  11. e->putString("STUDY");
  12. query.insert(e);
  13. - e = newDicomElement(DCM_PatientName);
  14. + e = DcmItem::newDicomElement(DCM_PatientName);
  15. query.insert(e);
  16. - e = newDicomElement(DCM_PatientID);
  17. + e = DcmItem::newDicomElement(DCM_PatientID);
  18. query.insert(e);
  19. - e = newDicomElement(DCM_StudyDate);
  20. + e = DcmItem::newDicomElement(DCM_StudyDate);
  21. query.insert(e);
  22. - e = newDicomElement(DCM_StudyTime);
  23. + e = DcmItem::newDicomElement(DCM_StudyTime);
  24. query.insert(e);
  25. - e = newDicomElement(DCM_AccessionNumber);
  26. + e = DcmItem::newDicomElement(DCM_AccessionNumber);
  27. query.insert(e);
  28. - e = newDicomElement(DCM_StudyID);
  29. + e = DcmItem::newDicomElement(DCM_StudyID);
  30. query.insert(e);
  31. - e = newDicomElement(DCM_StudyInstanceUID);
  32. + e = DcmItem::newDicomElement(DCM_StudyInstanceUID);
  33. e->putString(studyinstanceuid.c_str());
  34. query.insert(e);
  35. @@ -150,22 +150,22 @@ bool NetLoader::run() {
  36. DcmDataset query;
  37. DcmElement* e = NULL;
  38. - e = newDicomElement(DCM_QueryRetrieveLevel);
  39. + e = DcmItem::newDicomElement(DCM_QueryRetrieveLevel);
  40. e->putString("SERIES");
  41. query.insert(e);
  42. - e = newDicomElement(DCM_StudyInstanceUID);
  43. + e = DcmItem::newDicomElement(DCM_StudyInstanceUID);
  44. e->putString(studyinstanceuid.c_str());
  45. query.insert(e);
  46. - e = newDicomElement(DCM_SeriesInstanceUID);
  47. + e = DcmItem::newDicomElement(DCM_SeriesInstanceUID);
  48. e->putString(i->c_str());
  49. query.insert(e);
  50. - e = newDicomElement(DCM_Modality);
  51. + e = DcmItem::newDicomElement(DCM_Modality);
  52. query.insert(e);
  53. - e = newDicomElement(DCM_SeriesNumber);
  54. + e = DcmItem::newDicomElement(DCM_SeriesNumber);
  55. query.insert(e);
  56. std::cout << "C-Move request:" << std::endl;
  57. --- a/imagepool/netquery.cpp
  58. +++ b/imagepool/netquery.cpp
  59. @@ -196,64 +196,64 @@ void query_from_net(
  60. DcmDataset query;
  61. DcmElement* e = NULL;
  62. - e = newDicomElement(DCM_QueryRetrieveLevel);
  63. + e = DcmItem::newDicomElement(DCM_QueryRetrieveLevel);
  64. e->putString("STUDY");
  65. query.insert(e);
  66. - e = newDicomElement(DCM_SpecificCharacterSet);
  67. + e = DcmItem::newDicomElement(DCM_SpecificCharacterSet);
  68. e->putString(dicom_enc.c_str());
  69. query.insert(e);
  70. - e = newDicomElement(DCM_PatientName);
  71. + e = DcmItem::newDicomElement(DCM_PatientName);
  72. e->putString(patientsname.c_str());
  73. query.insert(e);
  74. - e = newDicomElement(DCM_PatientID);
  75. + e = DcmItem::newDicomElement(DCM_PatientID);
  76. e->putString(convert_string_to(patientid.c_str(), system_enc).c_str());
  77. query.insert(e);
  78. - e = newDicomElement(DCM_SOPClassesInStudy);
  79. + e = DcmItem::newDicomElement(DCM_SOPClassesInStudy);
  80. query.insert(e);
  81. - e = newDicomElement(DCM_ModalitiesInStudy);
  82. + e = DcmItem::newDicomElement(DCM_ModalitiesInStudy);
  83. e->putString(modality.c_str());
  84. query.insert(e);
  85. - e = newDicomElement(DCM_PatientBirthDate);
  86. + e = DcmItem::newDicomElement(DCM_PatientBirthDate);
  87. query.insert(e);
  88. - e = newDicomElement(DCM_PatientSex);
  89. + e = DcmItem::newDicomElement(DCM_PatientSex);
  90. query.insert(e);
  91. - e = newDicomElement(DCM_StudyDate);
  92. + e = DcmItem::newDicomElement(DCM_StudyDate);
  93. e->putString(date.c_str());
  94. query.insert(e);
  95. - e = newDicomElement(DCM_StudyTime);
  96. + e = DcmItem::newDicomElement(DCM_StudyTime);
  97. query.insert(e);
  98. - e = newDicomElement(DCM_NumberOfStudyRelatedSeries);
  99. + e = DcmItem::newDicomElement(DCM_NumberOfStudyRelatedSeries);
  100. query.insert(e);
  101. - e = newDicomElement(DCM_NumberOfStudyRelatedInstances);
  102. + e = DcmItem::newDicomElement(DCM_NumberOfStudyRelatedInstances);
  103. query.insert(e);
  104. - e = newDicomElement(DCM_AccessionNumber);
  105. + e = DcmItem::newDicomElement(DCM_AccessionNumber);
  106. e->putString(accessionnumber.c_str());
  107. query.insert(e);
  108. - e = newDicomElement(DCM_StudyID);
  109. + e = DcmItem::newDicomElement(DCM_StudyID);
  110. query.insert(e);
  111. - e = newDicomElement(DCM_StudyInstanceUID);
  112. + e = DcmItem::newDicomElement(DCM_StudyInstanceUID);
  113. query.insert(e);
  114. - e = newDicomElement(DCM_StudyDescription);
  115. + e = DcmItem::newDicomElement(DCM_StudyDescription);
  116. e->putString(description.c_str());
  117. query.insert(e);
  118. // StationName not allowed in StudyRoot
  119. - /*e = newDicomElement(DCM_StationName);
  120. + /*e = DcmItem::newDicomElement(DCM_StationName);
  121. e->putString(station.c_str());
  122. query.insert(e);*/
  123. @@ -284,36 +284,36 @@ void query_series_from_net(const std::st
  124. DcmDataset query;
  125. DcmElement* e = NULL;
  126. - e = newDicomElement(DCM_QueryRetrieveLevel);
  127. + e = DcmItem::newDicomElement(DCM_QueryRetrieveLevel);
  128. e->putString("SERIES");
  129. query.insert(e);
  130. - e = newDicomElement(DCM_SpecificCharacterSet);
  131. + e = DcmItem::newDicomElement(DCM_SpecificCharacterSet);
  132. query.insert(e);
  133. - e = newDicomElement(DCM_StudyInstanceUID);
  134. + e = DcmItem::newDicomElement(DCM_StudyInstanceUID);
  135. e->putString(studyinstanceuid.c_str());
  136. query.insert(e);
  137. - e = newDicomElement(DCM_SeriesInstanceUID);
  138. + e = DcmItem::newDicomElement(DCM_SeriesInstanceUID);
  139. query.insert(e);
  140. - e = newDicomElement(DCM_SeriesNumber);
  141. + e = DcmItem::newDicomElement(DCM_SeriesNumber);
  142. query.insert(e);
  143. - e = newDicomElement(DCM_Modality);
  144. + e = DcmItem::newDicomElement(DCM_Modality);
  145. query.insert(e);
  146. - e = newDicomElement(DCM_SeriesDescription);
  147. + e = DcmItem::newDicomElement(DCM_SeriesDescription);
  148. query.insert(e);
  149. - e = newDicomElement(DCM_SeriesTime);
  150. + e = DcmItem::newDicomElement(DCM_SeriesTime);
  151. query.insert(e);
  152. - e = newDicomElement(DCM_StationName);
  153. + e = DcmItem::newDicomElement(DCM_StationName);
  154. query.insert(e);
  155. - e = newDicomElement(DCM_NumberOfSeriesRelatedInstances);
  156. + e = DcmItem::newDicomElement(DCM_NumberOfSeriesRelatedInstances);
  157. query.insert(e);
  158. @@ -357,22 +357,22 @@ int query_series_instances(const std::st
  159. DcmDataset query;
  160. DcmElement* e = NULL;
  161. - e = newDicomElement(DCM_QueryRetrieveLevel);
  162. + e = DcmItem::newDicomElement(DCM_QueryRetrieveLevel);
  163. e->putString("IMAGE");
  164. query.insert(e);
  165. - e = newDicomElement(DCM_StudyInstanceUID);
  166. + e = DcmItem::newDicomElement(DCM_StudyInstanceUID);
  167. e->putString(studyinstanceuid.c_str());
  168. query.insert(e);
  169. - e = newDicomElement(DCM_SeriesInstanceUID);
  170. + e = DcmItem::newDicomElement(DCM_SeriesInstanceUID);
  171. e->putString(seriesinstanceuid.c_str());
  172. query.insert(e);
  173. - e = newDicomElement(DCM_SOPInstanceUID);
  174. + e = DcmItem::newDicomElement(DCM_SOPInstanceUID);
  175. query.insert(e);
  176. - e = newDicomElement(DCM_InstanceNumber);
  177. + e = DcmItem::newDicomElement(DCM_InstanceNumber);
  178. query.insert(e);
  179. std::cout << "NEW QUERY:" << std::endl;
  180. @@ -394,21 +394,21 @@ int query_study_series(const std::string
  181. DcmDataset query;
  182. DcmElement* e = NULL;
  183. - e = newDicomElement(DCM_QueryRetrieveLevel);
  184. + e = DcmItem::newDicomElement(DCM_QueryRetrieveLevel);
  185. e->putString("SERIES");
  186. query.insert(e);
  187. - e = newDicomElement(DCM_StudyInstanceUID);
  188. + e = DcmItem::newDicomElement(DCM_StudyInstanceUID);
  189. e->putString(studyinstanceuid.c_str());
  190. query.insert(e);
  191. - e = newDicomElement(DCM_SeriesInstanceUID);
  192. + e = DcmItem::newDicomElement(DCM_SeriesInstanceUID);
  193. query.insert(e);
  194. - e = newDicomElement(DCM_SeriesNumber);
  195. + e = DcmItem::newDicomElement(DCM_SeriesNumber);
  196. query.insert(e);
  197. - e = newDicomElement(DCM_Modality);
  198. + e = DcmItem::newDicomElement(DCM_Modality);
  199. query.insert(e);
  200. std::cout << "NEW QUERY:" << std::endl;
  201. --- a/imagepool/poolassociation.h
  202. +++ b/imagepool/poolassociation.h
  203. @@ -101,7 +101,7 @@ public:
  204. return false;
  205. }
  206. - DcmElement *elem = newDicomElement(tag);
  207. + DcmElement *elem = DcmItem::newDicomElement(tag);
  208. if (elem == NULL) {
  209. printf("cannot create element for tag: (%04x,%04x)", g, e);
  210. return false;