changeset 994:1f74bc3459ba

fix build due to rename in Orthanc::DicomMap
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 12 Sep 2019 08:27:12 +0200
parents f270852d3180
children 9893fa8cd7a6
files Framework/Deprecated/Toolbox/DicomFrameConverter.cpp Framework/Deprecated/Toolbox/Slice.cpp Framework/Loaders/OrthancMultiframeVolumeLoader.cpp Framework/Toolbox/CoordinateSystem3D.cpp Framework/Toolbox/DicomInstanceParameters.cpp Framework/Toolbox/DicomStructureSet.cpp Framework/Toolbox/DicomStructureSet2.cpp Framework/Toolbox/LinearAlgebra.cpp Samples/WebAssembly/CMakeLists.txt
diffstat 9 files changed, 25 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Deprecated/Toolbox/DicomFrameConverter.cpp	Wed Sep 11 12:33:12 2019 +0200
+++ b/Framework/Deprecated/Toolbox/DicomFrameConverter.cpp	Thu Sep 12 08:27:12 2019 +0200
@@ -119,7 +119,7 @@
     }
 
     std::string photometric;
-    if (dicom.CopyToString(photometric, Orthanc::DICOM_TAG_PHOTOMETRIC_INTERPRETATION, false))
+    if (dicom.LookupStringValue(photometric, Orthanc::DICOM_TAG_PHOTOMETRIC_INTERPRETATION, false))
     {
       photometric = Orthanc::Toolbox::StripSpaces(photometric);
     }
--- a/Framework/Deprecated/Toolbox/Slice.cpp	Wed Sep 11 12:33:12 2019 +0200
+++ b/Framework/Deprecated/Toolbox/Slice.cpp	Thu Sep 12 08:27:12 2019 +0200
@@ -76,7 +76,7 @@
     {
       std::string increment;
 
-      if (dataset.CopyToString(increment, Orthanc::DICOM_TAG_FRAME_INCREMENT_POINTER, false))
+      if (dataset.LookupStringValue(increment, Orthanc::DICOM_TAG_FRAME_INCREMENT_POINTER, false))
       {
         Orthanc::Toolbox::ToUpperCase(increment);
         if (increment != "3004,000C")  // This is the "Grid Frame Offset Vector" tag
@@ -89,7 +89,7 @@
 
     std::string offsetTag;
 
-    if (!dataset.CopyToString(offsetTag, Orthanc::DICOM_TAG_GRID_FRAME_OFFSET_VECTOR, false) ||
+    if (!dataset.LookupStringValue(offsetTag, Orthanc::DICOM_TAG_GRID_FRAME_OFFSET_VECTOR, false) ||
         offsetTag.empty())
     {
       LOG(ERROR) << "Cannot read the \"GridFrameOffsetVector\" tag, check you are using Orthanc >= 1.3.1";
@@ -148,7 +148,7 @@
     type_ = Type_OrthancDecodableFrame;
     imageInformation_.reset(new Orthanc::DicomImageInformation(dataset));
 
-    if (!dataset.CopyToString(sopClassUid_, Orthanc::DICOM_TAG_SOP_CLASS_UID, false) ||
+    if (!dataset.LookupStringValue(sopClassUid_, Orthanc::DICOM_TAG_SOP_CLASS_UID, false) ||
         sopClassUid_.empty())
     {
       LOG(ERROR) << "Instance without a SOP class UID";
@@ -174,7 +174,7 @@
     thickness_ = 100.0 * std::numeric_limits<double>::epsilon();
 
     std::string tmp;
-    if (dataset.CopyToString(tmp, Orthanc::DICOM_TAG_SLICE_THICKNESS, false))
+    if (dataset.LookupStringValue(tmp, Orthanc::DICOM_TAG_SLICE_THICKNESS, false))
     {
       if (!tmp.empty() &&
           !ParseDouble(thickness_, tmp))
@@ -188,8 +188,8 @@
     OrthancStone::GeometryToolbox::GetPixelSpacing(pixelSpacingX_, pixelSpacingY_, dataset);
 
     std::string position, orientation;
-    if (dataset.CopyToString(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) &&
-        dataset.CopyToString(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false))
+    if (dataset.LookupStringValue(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) &&
+        dataset.LookupStringValue(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false))
     {
       geometry_ = OrthancStone::CoordinateSystem3D(position, orientation);
 
--- a/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp	Wed Sep 11 12:33:12 2019 +0200
+++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp	Thu Sep 12 08:27:12 2019 +0200
@@ -58,7 +58,7 @@
   static std::string GetSopClassUid(const Orthanc::DicomMap& dicom)
   {
     std::string s;
-    if (!dicom.CopyToString(s, Orthanc::DICOM_TAG_SOP_CLASS_UID, false))
+    if (!dicom.LookupStringValue(s, Orthanc::DICOM_TAG_SOP_CLASS_UID, false))
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat,
                                       "DICOM file without SOP class UID");
--- a/Framework/Toolbox/CoordinateSystem3D.cpp	Wed Sep 11 12:33:12 2019 +0200
+++ b/Framework/Toolbox/CoordinateSystem3D.cpp	Thu Sep 12 08:27:12 2019 +0200
@@ -131,8 +131,8 @@
   {
     std::string a, b;
 
-    if (dicom.CopyToString(a, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) &&
-        dicom.CopyToString(b, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false))
+    if (dicom.LookupStringValue(a, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) &&
+        dicom.LookupStringValue(b, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false))
     {
       Setup(a, b);
     }
--- a/Framework/Toolbox/DicomInstanceParameters.cpp	Wed Sep 11 12:33:12 2019 +0200
+++ b/Framework/Toolbox/DicomInstanceParameters.cpp	Thu Sep 12 08:27:12 2019 +0200
@@ -41,7 +41,7 @@
     {
       std::string increment;
 
-      if (dicom.CopyToString(increment, Orthanc::DICOM_TAG_FRAME_INCREMENT_POINTER, false))
+      if (dicom.LookupStringValue(increment, Orthanc::DICOM_TAG_FRAME_INCREMENT_POINTER, false))
       {
         Orthanc::Toolbox::ToUpperCase(increment);
         if (increment != "3004,000C")  // This is the "Grid Frame Offset Vector" tag (DICOM_TAG_GRID_FRAME_OFFSET_VECTOR)
@@ -76,15 +76,15 @@
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
     }
 
-    if (!dicom.CopyToString(studyInstanceUid_, Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, false) ||
-        !dicom.CopyToString(seriesInstanceUid_, Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, false) ||
-        !dicom.CopyToString(sopInstanceUid_, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false))
+    if (!dicom.LookupStringValue(studyInstanceUid_, Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, false) ||
+        !dicom.LookupStringValue(seriesInstanceUid_, Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, false) ||
+        !dicom.LookupStringValue(sopInstanceUid_, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false))
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
     }
         
     std::string s;
-    if (!dicom.CopyToString(s, Orthanc::DICOM_TAG_SOP_CLASS_UID, false))
+    if (!dicom.LookupStringValue(s, Orthanc::DICOM_TAG_SOP_CLASS_UID, false))
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
     }
@@ -101,8 +101,8 @@
     GeometryToolbox::GetPixelSpacing(pixelSpacingX_, pixelSpacingY_, dicom);
 
     std::string position, orientation;
-    if (dicom.CopyToString(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) &&
-        dicom.CopyToString(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false))
+    if (dicom.LookupStringValue(position, Orthanc::DICOM_TAG_IMAGE_POSITION_PATIENT, false) &&
+        dicom.LookupStringValue(orientation, Orthanc::DICOM_TAG_IMAGE_ORIENTATION_PATIENT, false))
     {
       geometry_ = CoordinateSystem3D(position, orientation);
     }
--- a/Framework/Toolbox/DicomStructureSet.cpp	Wed Sep 11 12:33:12 2019 +0200
+++ b/Framework/Toolbox/DicomStructureSet.cpp	Thu Sep 12 08:27:12 2019 +0200
@@ -677,7 +677,7 @@
 
     std::string s;
     Vector v;
-    if (dataset.CopyToString(s, Orthanc::DICOM_TAG_SLICE_THICKNESS, false) &&
+    if (dataset.LookupStringValue(s, Orthanc::DICOM_TAG_SLICE_THICKNESS, false) &&
         LinearAlgebra::ParseVector(v, s) &&
         v.size() > 0)
     {
@@ -685,8 +685,8 @@
     }
 
     std::string instance, series;
-    if (dataset.CopyToString(instance, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false) &&
-        dataset.CopyToString(series, Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, false))
+    if (dataset.LookupStringValue(instance, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false) &&
+        dataset.LookupStringValue(series, Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, false))
     {
       AddReferencedSlice(instance, series, slice, thickness);
     }
--- a/Framework/Toolbox/DicomStructureSet2.cpp	Wed Sep 11 12:33:12 2019 +0200
+++ b/Framework/Toolbox/DicomStructureSet2.cpp	Thu Sep 12 08:27:12 2019 +0200
@@ -677,7 +677,7 @@
 
     std::string s;
     Vector v;
-    if (dataset.CopyToString(s, Orthanc::DICOM_TAG_SLICE_THICKNESS, false) &&
+    if (dataset.LookupStringValue(s, Orthanc::DICOM_TAG_SLICE_THICKNESS, false) &&
         LinearAlgebra::ParseVector(v, s) &&
         v.size() > 0)
     {
@@ -685,8 +685,8 @@
     }
 
     std::string instance, series;
-    if (dataset.CopyToString(instance, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false) &&
-        dataset.CopyToString(series, Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, false))
+    if (dataset.LookupStringValue(instance, Orthanc::DICOM_TAG_SOP_INSTANCE_UID, false) &&
+        dataset.LookupStringValue(series, Orthanc::DICOM_TAG_SERIES_INSTANCE_UID, false))
     {
       AddReferencedSlice(instance, series, slice, thickness);
     }
--- a/Framework/Toolbox/LinearAlgebra.cpp	Wed Sep 11 12:33:12 2019 +0200
+++ b/Framework/Toolbox/LinearAlgebra.cpp	Thu Sep 12 08:27:12 2019 +0200
@@ -112,7 +112,7 @@
                      const Orthanc::DicomTag& tag)
     {
       std::string value;
-      return (dataset.CopyToString(value, tag, false) &&
+      return (dataset.LookupStringValue(value, tag, false) &&
               ParseVector(target, value));
     }
 
--- a/Samples/WebAssembly/CMakeLists.txt	Wed Sep 11 12:33:12 2019 +0200
+++ b/Samples/WebAssembly/CMakeLists.txt	Thu Sep 12 08:27:12 2019 +0200
@@ -79,7 +79,7 @@
 if (ON)
   add_executable(BasicScene
     BasicScene.cpp
-    ${CMAKE_CURRENT_LIST_DIR}/../Shared/SharedBasicScene.h
+    #${CMAKE_CURRENT_LIST_DIR}/../Shared/SharedBasicScene.h
     ${CMAKE_CURRENT_LIST_DIR}/../Shared/SharedBasicScene.cpp
     )