changeset 728:d380222b4c2a

Load a raw tag from the DICOM file
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 21 Feb 2014 10:12:33 +0100
parents 52b5316a2517
children 948720c72586
files Core/Enumerations.h OrthancCppClient/Instance.cpp OrthancCppClient/Instance.h OrthancCppClient/OrthancClientException.h OrthancCppClient/SharedLibrary/AUTOGENERATED/ExternC.cpp OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows32.def OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows64.def OrthancCppClient/SharedLibrary/Laaw/laaw-exports.h OrthancCppClient/SharedLibrary/Laaw/laaw.h OrthancCppClient/SharedLibrary/Laaw/laaw/laaw-exports.h OrthancCppClient/SharedLibrary/Laaw/laaw/laaw.h Resources/Samples/OrthancClient/Basic/main.cpp
diffstat 13 files changed, 299 insertions(+), 181 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Enumerations.h	Wed Feb 19 12:43:12 2014 +0100
+++ b/Core/Enumerations.h	Fri Feb 21 10:12:33 2014 +0100
@@ -32,7 +32,7 @@
 
 #pragma once
 
-#include "../OrthancCppClient/SharedLibrary/Laaw/laaw.h"
+#include <laaw/laaw.h>
 
 namespace Orthanc
 {
--- a/OrthancCppClient/Instance.cpp	Wed Feb 19 12:43:12 2014 +0100
+++ b/OrthancCppClient/Instance.cpp	Fri Feb 21 10:12:33 2014 +0100
@@ -265,4 +265,21 @@
     }
   }
 
+
+  void Instance::LoadTagContent(const char* path)
+  {
+    Orthanc::HttpClient client(connection_.GetHttpClient());
+    client.SetUrl(std::string(connection_.GetOrthancUrl()) + "/instances/" + id_ + "/content/" + path);
+
+    if (!client.Apply(content_))
+    {
+      throw OrthancClientException(Orthanc::ErrorCode_UnknownResource);
+    }
+  }
+
+
+  const char* Instance::GetLoadedTagContent() const
+  {
+    return content_.c_str();
+  }
 }
--- a/OrthancCppClient/Instance.h	Wed Feb 19 12:43:12 2014 +0100
+++ b/OrthancCppClient/Instance.h	Fri Feb 21 10:12:33 2014 +0100
@@ -57,6 +57,7 @@
     std::auto_ptr<Orthanc::PngReader> reader_;
     Orthanc::ImageExtractionMode mode_;
     std::auto_ptr<std::string> dicom_;
+    std::string content_;
 
     void DownloadImage();
 
@@ -185,5 +186,17 @@
 
     LAAW_API_INTERNAL void SplitVectorOfFloats(std::vector<float>& target,
                                                const char* tag);
+
+    /**
+     * {summary}{Load a raw tag from the DICOM file.}
+     * {param}{path The path to the tag of interest (e.g. "0020-000d").}
+     **/
+    void LoadTagContent(const char* path);
+
+    /**
+     * {summary}{Return the value of the raw tag that was loaded by LoadContent.}
+     * {returns}{The tag value.}
+     **/
+    const char* GetLoadedTagContent() const;
   };
 }
--- a/OrthancCppClient/OrthancClientException.h	Wed Feb 19 12:43:12 2014 +0100
+++ b/OrthancCppClient/OrthancClientException.h	Fri Feb 21 10:12:33 2014 +0100
@@ -33,7 +33,7 @@
 #pragma once
 
 #include "../Core/OrthancException.h"
-#include "SharedLibrary/Laaw/laaw.h"
+#include <laaw/laaw.h>
 
 namespace OrthancClient
 {
--- a/OrthancCppClient/SharedLibrary/AUTOGENERATED/ExternC.cpp	Wed Feb 19 12:43:12 2014 +0100
+++ b/OrthancCppClient/SharedLibrary/AUTOGENERATED/ExternC.cpp	Fri Feb 21 10:12:33 2014 +0100
@@ -30,7 +30,7 @@
  **/
 
 
-#include <laaw.h>
+#include <laaw/laaw.h>
 #include <string.h>  // For strcpy() and strlen()
 #include <stdlib.h>  // For free()
 
@@ -1412,6 +1412,52 @@
         }
       }
 
+      LAAW_EXPORT_DLL_API char* LAAW_CALL_CONVENTION LAAW_EXTERNC_1710299d1c5f3b1f2b7cf3962deebbfd(void* thisObject, const char* arg0)
+      {
+        try
+        {
+          #ifdef LAAW_EXTERNC_START_FUNCTION
+          LAAW_EXTERNC_START_FUNCTION;
+          #endif
+
+          OrthancClient::Instance* this_ = static_cast<OrthancClient::Instance*>(thisObject);
+this_->LoadTagContent(reinterpret_cast< const char* >(arg0));
+
+          return NULL;
+        }
+        catch (::Laaw::LaawException& e)
+        {
+          return LAAW_EXTERNC_CopyString(e.What());
+        }
+        catch (...)
+        {
+          return LAAW_EXTERNC_CopyString("...");
+        }
+      }
+
+      LAAW_EXPORT_DLL_API char* LAAW_CALL_CONVENTION LAAW_EXTERNC_bb55aaf772ddceaadee36f4e54136bcb(const void* thisObject, const char** result)
+      {
+        try
+        {
+          #ifdef LAAW_EXTERNC_START_FUNCTION
+          LAAW_EXTERNC_START_FUNCTION;
+          #endif
+
+          const OrthancClient::Instance* this_ = static_cast<const OrthancClient::Instance*>(thisObject);
+*result = this_->GetLoadedTagContent();
+
+          return NULL;
+        }
+        catch (::Laaw::LaawException& e)
+        {
+          return LAAW_EXTERNC_CopyString(e.What());
+        }
+        catch (...)
+        {
+          return LAAW_EXTERNC_CopyString("...");
+        }
+      }
+
 
   LAAW_EXPORT_DLL_API const char* LAAW_CALL_CONVENTION LAAW_EXTERNC_GetDescription()
   {
--- a/OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h	Wed Feb 19 12:43:12 2014 +0100
+++ b/OrthancCppClient/SharedLibrary/AUTOGENERATED/OrthancCppClient.h	Fri Feb 21 10:12:33 2014 +0100
@@ -203,7 +203,7 @@
   {
   private:
     LAAW_ORTHANC_CLIENT_HANDLE_TYPE  handle_;
-    LAAW_ORTHANC_CLIENT_FUNCTION_TYPE  functionsIndex_[60 + 1];
+    LAAW_ORTHANC_CLIENT_FUNCTION_TYPE  functionsIndex_[62 + 1];
 
 
 
@@ -239,7 +239,7 @@
     void FreeString(char* str)
     {
       typedef void (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (char*);
-      Function function = (Function) GetFunction(60);
+      Function function = (Function) GetFunction(62);
       function(str);
     }
 
@@ -391,7 +391,7 @@
     throw ::OrthancClient::OrthancClientException("Mismatch between the C++ header and the library version");
   }
 
-  functionsIndex_[60] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_FreeString", "4");
+  functionsIndex_[62] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_FreeString", "4");
   functionsIndex_[3] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_557aee7b61817292a0f31269d3c35db7", "8");
   functionsIndex_[4] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_0b8dff0ce67f10954a49b059e348837e", "8");
   functionsIndex_[5] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_e05097c153f676e5a5ee54dcfc78256f", "4");
@@ -450,11 +450,13 @@
   functionsIndex_[57] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6f2d77a26edc91c28d89408dbc3c271e", "8");
   functionsIndex_[58] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_c0f494b80d4ff8b232df7a75baa0700a", "4");
   functionsIndex_[59] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c", "4");
+  functionsIndex_[60] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_1710299d1c5f3b1f2b7cf3962deebbfd", "8");
+  functionsIndex_[61] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_bb55aaf772ddceaadee36f4e54136bcb", "8");
   functionsIndex_[42] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d", "12");
   functionsIndex_[43] = LAAW_ORTHANC_CLIENT_GET_FUNCTION(handle_, "LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207", "4");
   
   /* Check whether the functions were properly loaded */
-  for (unsigned int i = 0; i <= 60; i++)
+  for (unsigned int i = 0; i <= 62; i++)
   {
     if (functionsIndex_[i] == (LAAW_ORTHANC_CLIENT_FUNCTION_TYPE) NULL)
     {
@@ -784,6 +786,8 @@
     inline const void* GetDicom();
     inline void DiscardImage();
     inline void DiscardDicom();
+    inline void LoadTagContent(const ::std::string& path);
+    inline ::std::string GetLoadedTagContent() const;
   };
 }
 
@@ -1746,5 +1750,35 @@
     char* error = function(pimpl_);
     ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
   }
+  /**
+  * @brief Load a raw tag from the DICOM file.
+  *
+  * Load a raw tag from the DICOM file.
+  *
+  * @param path The path to the tag of interest (e.g. "0020-000d").
+  **/
+  inline void Instance::LoadTagContent(const ::std::string& path)
+  {
+    typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (void*, const char*);
+    Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(60);
+    char* error = function(pimpl_, path.c_str());
+    ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
+  }
+  /**
+  * @brief Return the value of the raw tag that was loaded by LoadContent.
+  *
+  * Return the value of the raw tag that was loaded by LoadContent.
+  *
+  * @return The tag value.
+  **/
+  inline ::std::string Instance::GetLoadedTagContent() const
+  {
+    const char* result_;
+    typedef char* (LAAW_ORTHANC_CLIENT_CALL_CONV* Function) (const void*, const char**);
+    Function function = (Function) ::OrthancClient::Internals::Library::GetInstance().GetFunction(61);
+    char* error = function(pimpl_, &result_);
+    ::OrthancClient::Internals::Library::GetInstance().ThrowExceptionIfNeeded(error);
+    return std::string(result_);
+  }
 }
 
--- a/OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows32.def	Wed Feb 19 12:43:12 2014 +0100
+++ b/OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows32.def	Fri Feb 21 10:12:33 2014 +0100
@@ -58,6 +58,8 @@
   _LAAW_EXTERNC_6f2d77a26edc91c28d89408dbc3c271e@8 = LAAW_EXTERNC_6f2d77a26edc91c28d89408dbc3c271e@8
   _LAAW_EXTERNC_c0f494b80d4ff8b232df7a75baa0700a@4 = LAAW_EXTERNC_c0f494b80d4ff8b232df7a75baa0700a@4
   _LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c@4 = LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c@4
+  _LAAW_EXTERNC_1710299d1c5f3b1f2b7cf3962deebbfd@8 = LAAW_EXTERNC_1710299d1c5f3b1f2b7cf3962deebbfd@8
+  _LAAW_EXTERNC_bb55aaf772ddceaadee36f4e54136bcb@8 = LAAW_EXTERNC_bb55aaf772ddceaadee36f4e54136bcb@8
   _LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d@12 = LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d@12
   _LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207@4 = LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207@4
   _LAAW_EXTERNC_GetDescription@0 = LAAW_EXTERNC_GetDescription@0
--- a/OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows64.def	Wed Feb 19 12:43:12 2014 +0100
+++ b/OrthancCppClient/SharedLibrary/AUTOGENERATED/Windows64.def	Fri Feb 21 10:12:33 2014 +0100
@@ -58,6 +58,8 @@
   LAAW_EXTERNC_6f2d77a26edc91c28d89408dbc3c271e
   LAAW_EXTERNC_c0f494b80d4ff8b232df7a75baa0700a
   LAAW_EXTERNC_d604f44bd5195e082e745e9cbc164f4c
+  LAAW_EXTERNC_1710299d1c5f3b1f2b7cf3962deebbfd
+  LAAW_EXTERNC_bb55aaf772ddceaadee36f4e54136bcb
   LAAW_EXTERNC_6c5ad02f91b583e29cebd0bd319ce21d
   LAAW_EXTERNC_4068241c44a9c1367fe0e57be523f207
   LAAW_EXTERNC_GetDescription
--- a/OrthancCppClient/SharedLibrary/Laaw/laaw-exports.h	Wed Feb 19 12:43:12 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/**
- * Laaw - Lightweight, Automated API Wrapper
- * Copyright (C) 2010-2013 Jomago - Alain Mazy, Benjamin Golinvaux,
- * Sebastien Jodogne
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * In addition, as a special exception, the copyright holders of this
- * program give permission to link the code of its release with the
- * OpenSSL project's "OpenSSL" library (or with modified versions of it
- * that use the same license as the "OpenSSL" library), and distribute
- * the linked executables. You must obey the GNU General Public License
- * in all respects for all of the code used other than "OpenSSL". If you
- * modify file(s) with this exception, you may extend this exception to
- * your version of the file(s), but you are not obligated to do so. If
- * you do not wish to do so, delete this exception statement from your
- * version. If you delete this exception statement from all source files
- * in the program, then also delete it here.
- * 
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- **/
-
-
-#pragma once
-
-/********************************************************************
- ** Windows target
- ********************************************************************/
-
-#if defined _WIN32
-
-#include <windows.h>
-
-#if defined(__GNUC__)
-// This is Mingw
-#define LAAW_EXPORT_DLL_API  // The exports are handled by the .DEF file
-#else
-// This is MSVC
-#define LAAW_EXPORT_DLL_API __declspec(dllexport)
-#endif
-
-#ifdef _M_X64
-// 64 bits target
-#define LAAW_CALL_CONVENTION
-#else
-// 32 bits target
-#define LAAW_CALL_CONVENTION  __stdcall  // Use the StdCall in Windows32 (for VB6)
-#endif
-
-
-/********************************************************************
- ** Linux target
- ********************************************************************/
-
-#elif defined(__linux)
-
-// Try the gcc visibility support
-// http://gcc.gnu.org/wiki/Visibility
-#if ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#define LAAW_EXPORT_DLL_API  __attribute__ ((visibility("default")))
-#define LAAW_CALL_CONVENTION
-#else
-#error No support for visibility in your version of GCC
-#endif
-
-
-/********************************************************************
- ** Max OS X target
- ********************************************************************/
-
-#else
-
-#define LAAW_EXPORT_DLL_API  __attribute__ ((visibility("default")))
-#define LAAW_CALL_CONVENTION
-
-#endif
--- a/OrthancCppClient/SharedLibrary/Laaw/laaw.h	Wed Feb 19 12:43:12 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/**
- * Laaw - Lightweight, Automated API Wrapper
- * Copyright (C) 2010-2013 Jomago - Alain Mazy, Benjamin Golinvaux,
- * Sebastien Jodogne
- *
- * This program is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * In addition, as a special exception, the copyright holders of this
- * program give permission to link the code of its release with the
- * OpenSSL project's "OpenSSL" library (or with modified versions of it
- * that use the same license as the "OpenSSL" library), and distribute
- * the linked executables. You must obey the GNU General Public License
- * in all respects for all of the code used other than "OpenSSL". If you
- * modify file(s) with this exception, you may extend this exception to
- * your version of the file(s), but you are not obligated to do so. If
- * you do not wish to do so, delete this exception statement from your
- * version. If you delete this exception statement from all source files
- * in the program, then also delete it here.
- * 
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- **/
-
-
-#pragma once
-
-#include "laaw-exports.h"
-#include <stddef.h>
-#include <string>
-
-#if (LAAW_PARSING == 1)
-
-#define LAAW_API   __attribute__((deprecated("")))
-#define LAAW_API_INTERNAL  __attribute__((deprecated("")))
-#define LAAW_API_OVERLOAD(name)  __attribute__((deprecated("")))
-#define LAAW_API_PROPERTY  __attribute__((deprecated("")))
-#define LAAW_API_STATIC_CLASS  __attribute__((deprecated("")))
-#define LAAW_API_CUSTOM(name, value)  __attribute__((deprecated("")))
-
-#else
-
-#define LAAW_API
-#define LAAW_API_INTERNAL
-#define LAAW_API_OVERLOAD(name)
-#define LAAW_API_PROPERTY
-#define LAAW_API_STATIC_CLASS
-#define LAAW_API_CUSTOM(name, value)
-
-#endif
-
-
-namespace Laaw
-{
-  /**
-   * This is the base class from which all the public exceptions in
-   * the SDK should derive.
-   **/
-  class LaawException
-  {
-  private:
-    std::string what_;
-
-  public:
-    LaawException()
-    {
-    }
-
-    LaawException(const std::string& what) : what_(what)
-    {
-    }
-
-    LaawException(const char* what) : what_(what)
-    {
-    }
-
-    virtual const char* What() const
-    {
-      return what_.c_str();
-    }
-  };
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancCppClient/SharedLibrary/Laaw/laaw/laaw-exports.h	Fri Feb 21 10:12:33 2014 +0100
@@ -0,0 +1,85 @@
+/**
+ * Laaw - Lightweight, Automated API Wrapper
+ * Copyright (C) 2010-2013 Jomago - Alain Mazy, Benjamin Golinvaux,
+ * Sebastien Jodogne
+ *
+ * This program is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * In addition, as a special exception, the copyright holders of this
+ * program give permission to link the code of its release with the
+ * OpenSSL project's "OpenSSL" library (or with modified versions of it
+ * that use the same license as the "OpenSSL" library), and distribute
+ * the linked executables. You must obey the GNU General Public License
+ * in all respects for all of the code used other than "OpenSSL". If you
+ * modify file(s) with this exception, you may extend this exception to
+ * your version of the file(s), but you are not obligated to do so. If
+ * you do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source files
+ * in the program, then also delete it here.
+ * 
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+
+#pragma once
+
+/********************************************************************
+ ** Windows target
+ ********************************************************************/
+
+#if defined _WIN32
+
+#include <windows.h>
+
+#if defined(__GNUC__)
+// This is Mingw
+#define LAAW_EXPORT_DLL_API  // The exports are handled by the .DEF file
+#else
+// This is MSVC
+#define LAAW_EXPORT_DLL_API __declspec(dllexport)
+#endif
+
+#ifdef _M_X64
+// 64 bits target
+#define LAAW_CALL_CONVENTION
+#else
+// 32 bits target
+#define LAAW_CALL_CONVENTION  __stdcall  // Use the StdCall in Windows32 (for VB6)
+#endif
+
+
+/********************************************************************
+ ** Linux target
+ ********************************************************************/
+
+#elif defined(__linux)
+
+// Try the gcc visibility support
+// http://gcc.gnu.org/wiki/Visibility
+#if ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#define LAAW_EXPORT_DLL_API  __attribute__ ((visibility("default")))
+#define LAAW_CALL_CONVENTION
+#else
+#error No support for visibility in your version of GCC
+#endif
+
+
+/********************************************************************
+ ** Max OS X target
+ ********************************************************************/
+
+#else
+
+#define LAAW_EXPORT_DLL_API  __attribute__ ((visibility("default")))
+#define LAAW_CALL_CONVENTION
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancCppClient/SharedLibrary/Laaw/laaw/laaw.h	Fri Feb 21 10:12:33 2014 +0100
@@ -0,0 +1,89 @@
+/**
+ * Laaw - Lightweight, Automated API Wrapper
+ * Copyright (C) 2010-2013 Jomago - Alain Mazy, Benjamin Golinvaux,
+ * Sebastien Jodogne
+ *
+ * This program is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * In addition, as a special exception, the copyright holders of this
+ * program give permission to link the code of its release with the
+ * OpenSSL project's "OpenSSL" library (or with modified versions of it
+ * that use the same license as the "OpenSSL" library), and distribute
+ * the linked executables. You must obey the GNU General Public License
+ * in all respects for all of the code used other than "OpenSSL". If you
+ * modify file(s) with this exception, you may extend this exception to
+ * your version of the file(s), but you are not obligated to do so. If
+ * you do not wish to do so, delete this exception statement from your
+ * version. If you delete this exception statement from all source files
+ * in the program, then also delete it here.
+ * 
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ **/
+
+
+#pragma once
+
+#include "laaw-exports.h"
+#include <stddef.h>
+#include <string>
+
+#if (LAAW_PARSING == 1)
+
+#define LAAW_API   __attribute__((deprecated("")))
+#define LAAW_API_INTERNAL  __attribute__((deprecated("")))
+#define LAAW_API_OVERLOAD(name)  __attribute__((deprecated("")))
+#define LAAW_API_PROPERTY  __attribute__((deprecated("")))
+#define LAAW_API_STATIC_CLASS  __attribute__((deprecated("")))
+#define LAAW_API_CUSTOM(name, value)  __attribute__((deprecated("")))
+
+#else
+
+#define LAAW_API
+#define LAAW_API_INTERNAL
+#define LAAW_API_OVERLOAD(name)
+#define LAAW_API_PROPERTY
+#define LAAW_API_STATIC_CLASS
+#define LAAW_API_CUSTOM(name, value)
+
+#endif
+
+
+namespace Laaw
+{
+  /**
+   * This is the base class from which all the public exceptions in
+   * the SDK should derive.
+   **/
+  class LaawException
+  {
+  private:
+    std::string what_;
+
+  public:
+    LaawException()
+    {
+    }
+
+    LaawException(const std::string& what) : what_(what)
+    {
+    }
+
+    LaawException(const char* what) : what_(what)
+    {
+    }
+
+    virtual const char* What() const
+    {
+      return what_.c_str();
+    }
+  };
+}
--- a/Resources/Samples/OrthancClient/Basic/main.cpp	Wed Feb 19 12:43:12 2014 +0100
+++ b/Resources/Samples/OrthancClient/Basic/main.cpp	Fri Feb 21 10:12:33 2014 +0100
@@ -57,6 +57,10 @@
           for (unsigned int l = 0; l < series.GetInstanceCount(); l++)
           {
             std::cout << "      Instance: " << series.GetInstance(l).GetId() << std::endl;
+
+            // Load and display some raw DICOM tag
+            series.GetInstance(l).LoadTagContent("0020-000d");
+            std::cout << "        SOP instance UID: " << series.GetInstance(l).GetLoadedTagContent() << std::endl;
           }
         }
       }