Author: gert-guest
Date: 2016-01-28 18:44:18 +0000 (Thu, 28 Jan 2016)
New Revision: 21320

Added:
   trunk/packages/ginkgocadx/trunk/debian/patches/01_vtk6.patch
   trunk/packages/ginkgocadx/trunk/debian/patches/03-dcmtk_361.patch
Modified:
   trunk/packages/ginkgocadx/trunk/debian/changelog
   trunk/packages/ginkgocadx/trunk/debian/control
   trunk/packages/ginkgocadx/trunk/debian/patches/series
Log:
Update package to build against latest dcmtk and vtk6

Modified: trunk/packages/ginkgocadx/trunk/debian/changelog
===================================================================
--- trunk/packages/ginkgocadx/trunk/debian/changelog    2016-01-28 10:02:37 UTC 
(rev 21319)
+++ trunk/packages/ginkgocadx/trunk/debian/changelog    2016-01-28 18:44:18 UTC 
(rev 21320)
@@ -1,3 +1,13 @@
+ginkgocadx (3.7.1.1573.41+dfsg-5) UNRELEASED; urgency=medium
+
+  [Team upload] 
+  * d/control: Update VTK build dependecy to libvtk6-dev 
+  * d/p: Add patch 01_vtk6.patch to build against VTK6 
+  * d/p: Add patch 03_dcmtk_361.patch to build against 
+    dcmtk-3.6.1-20150924 
+
+ -- Gert Wollny <[email protected]>  Thu, 28 Jan 2016 19:41:30 +0100
+
 ginkgocadx (3.7.1.1573.41+dfsg-4) unstable; urgency=medium
 
   * Build-Depends: libdcmtk2-dev --> libdcmtk-dev (Closes: #804574).

Modified: trunk/packages/ginkgocadx/trunk/debian/control
===================================================================
--- trunk/packages/ginkgocadx/trunk/debian/control      2016-01-28 10:02:37 UTC 
(rev 21319)
+++ trunk/packages/ginkgocadx/trunk/debian/control      2016-01-28 18:44:18 UTC 
(rev 21320)
@@ -19,7 +19,7 @@
               ,libmysqlclient-dev (>= 5.1.57)
               ,libsqlite3-dev
               ,libssl-dev
-              ,libvtk5-dev (>= 5.6.0)
+              ,libvtk6-dev
               ,libwrap0
               ,libwrap0-dev
               ,libwxgtk3.0-dev (>= 3.0.1-2~)

Added: trunk/packages/ginkgocadx/trunk/debian/patches/01_vtk6.patch
===================================================================
--- trunk/packages/ginkgocadx/trunk/debian/patches/01_vtk6.patch                
                (rev 0)
+++ trunk/packages/ginkgocadx/trunk/debian/patches/01_vtk6.patch        
2016-01-28 18:44:18 UTC (rev 21320)
@@ -0,0 +1,702 @@
+Last-Update: 2016-01-28
+Forwarded: no
+Author: Gert Wollny <[email protected]>
+Description: Fix build with VTK6
+ This patch fixes all the build failures with VTK6. However,
+ some changes in the pipeline handling can not be mapped properly,
+ which means, the software might not work as intended. 
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/api/istudycontext.cpp
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/api/istudycontext.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/api/istudycontext.cpp
+@@ -574,8 +574,8 @@ void GNC::GCS::IStudyContext::CreateUnsi
+ 
+               //se inicializan valores de dimensions, scalartype...
+               pMapa->SetDimensions(dimensions[0],dimensions[1],1);
+-              pMapa->SetScalarTypeToUnsignedChar();
+-              pMapa->SetNumberOfScalarComponents(1);
++
++                pMapa->AllocateScalars(VTK_UNSIGNED_CHAR, 1); 
+               pMapa->SetSpacing(spacing[0],spacing[1],spacing[2]);
+               pMapa->SetOrigin(origin[0],origin[1],origin[2]);
+ 
+@@ -591,12 +591,10 @@ void GNC::GCS::IStudyContext::CreateUnsi
+                       }
+               }
+ 
+-              vtkSmartPointer<vtkUnsignedCharArray> dataImagen = 
vtkSmartPointer<vtkUnsignedCharArray>::New();
+-              dataImagen->SetNumberOfComponents(1);
+-              unsigned int size = pMapa->GetDimensions()[0] * 
pMapa->GetDimensions()[1];
+-              dataImagen->SetArray(pTagPrivado->GetValor(),size,1);
+-
+-              pMapa->GetPointData()->SetScalars(dataImagen);
++                unsigned int size = pMapa->GetDimensions()[0] * 
pMapa->GetDimensions()[1];
++                unsigned char *in_data =  pTagPrivado->GetValor();
++                unsigned char *out_ptr =  reinterpret_cast<unsigned 
char*>(pMapa->GetScalarPointer()); 
++                std::copy(in_data, in_data + size, out_ptr); 
+       }
+ }
+ 
+@@ -616,8 +614,7 @@ void GNC::GCS::IStudyContext::CreateChar
+ 
+               //se inicializan valores de dimensions, scalartype...
+               pMapa->SetDimensions(dimensions[0],dimensions[1],1);
+-              pMapa->SetScalarTypeToChar();
+-              pMapa->SetNumberOfScalarComponents(1);
++                pMapa->AllocateScalars(VTK_CHAR, 1); 
+               pMapa->SetSpacing(spacing[0],spacing[1],spacing[2]);
+               pMapa->SetOrigin(origin[0],origin[1],origin[2]);
+ 
+@@ -633,12 +630,10 @@ void GNC::GCS::IStudyContext::CreateChar
+                       }
+               }
+ 
+-              vtkSmartPointer<vtkCharArray> dataImagen = 
vtkSmartPointer<vtkCharArray>::New();
+-              dataImagen->SetNumberOfComponents(1);
+-              unsigned int size = pMapa->GetDimensions()[0] * 
pMapa->GetDimensions()[1];
+-              dataImagen->SetArray((char*)pTagPrivado->GetValor(),size,1);
+-
+-              pMapa->GetPointData()->SetScalars(dataImagen);
++                unsigned int size = pMapa->GetDimensions()[0] * 
pMapa->GetDimensions()[1];
++                unsigned char *in_data =  pTagPrivado->GetValor();
++                unsigned char *out_ptr =  reinterpret_cast<unsigned 
char*>(pMapa->GetScalarPointer()); 
++                std::copy(in_data, in_data + size, out_ptr); 
+       }
+ }
+ 
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/api/initwx.cpp
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/api/initwx.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/api/initwx.cpp
+@@ -64,7 +64,6 @@
+ #include <vtkPolyDataMapper.h>
+ 
+ #include <itkObject.h>
+-#include <vtkThreadedStreamingPipeline.h>
+ #include <itkMultiThreader.h>
+ #if defined(_GINKGO_DEBUG) && !defined(OMITIR_VENTANA_ERRORES_VTK)
+ #include <vtkObject.h>
+@@ -515,8 +514,6 @@ bool Ginkgo::OnInit()
+ 
+       itk::MultiThreader::SetGlobalDefaultNumberOfThreads(4);
+       itk::MultiThreader::SetGlobalMaximumNumberOfThreads(16);
+-      vtkThreadedStreamingPipeline::SetMultiThreadedEnabled(true);
+-      vtkThreadedStreamingPipeline::SetAutoPropagatePush(true);
+ 
+       /*
+       vtkPolyDataMapper* m = vtkPolyDataMapper::New();
+@@ -769,4 +766,4 @@ void Ginkgo::DoProgress(wxString str)
+ void Ginkgo::WriteHeaderLog(){
+       LOG_INFO("Core", _Std("Starting") << " " << 
GNC::Entorno::Instance()->GetApplicationName() << " " << 
GNC::GCS::IEntorno::Instance()->GetGinkgoVersionString());
+ }
+-//endregion
+\ No newline at end of file
++//endregion
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/controladorcarga.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/controladorcarga.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/controladorcarga.cpp
+@@ -287,8 +287,6 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+               img->SetSpacing(chk_spacing);
+       }
+ 
+-      img->SetNumberOfScalarComponents(dicomIO->GetNumberOfComponents());
+-
+       itk::ProcessObject::Pointer processObject;
+       switch(dicomIO->GetComponentType()) {
+               case ImageIOType::UCHAR:
+@@ -297,9 +295,8 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToUnsignedChar();
+                               try {
+-                                      img->AllocateScalars();
++                                      img->AllocateScalars(VTK_UNSIGNED_CHAR, 
dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -330,9 +327,8 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToChar();
+                               try {
+-                                      img->AllocateScalars();
++                                        img->AllocateScalars(VTK_CHAR, 
dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -363,9 +359,8 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToUnsignedShort();
+                               try {
+-                                      img->AllocateScalars();
++                                        
img->AllocateScalars(VTK_UNSIGNED_SHORT, dicomIO->GetNumberOfComponents());
+                               }
+                               catch(const std::bad_alloc&)
+                               {
+@@ -400,9 +395,8 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToShort();
+                               try {
+-                                      img->AllocateScalars();
++                                        img->AllocateScalars(VTK_SHORT, 
dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -433,9 +427,9 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToUnsignedInt();
++
+                               try {
+-                                      img->AllocateScalars();
++                                        
img->AllocateScalars(VTK_UNSIGNED_INT, dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -466,9 +460,9 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToInt();
++
+                               try {
+-                                      img->AllocateScalars();
++                                        img->AllocateScalars(VTK_INT, 
dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -499,9 +493,9 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToUnsignedLong();
++
+                               try {
+-                                      img->AllocateScalars();
++                                        
img->AllocateScalars(VTK_UNSIGNED_LONG, dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -532,9 +526,8 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToLong();
+                               try {
+-                                      img->AllocateScalars();
++                                        img->AllocateScalars(VTK_LONG, 
dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -565,9 +558,8 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToFloat();
+                               try {
+-                                      img->AllocateScalars();
++                                        img->AllocateScalars(VTK_FLOAT, 
dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -598,9 +590,8 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+                               typedef itk::Image<TypedPixelType, 3 > 
TypedImageType;
+                               typedef itk::ImageSeriesReader<TypedImageType> 
TypedReaderType;
+ 
+-                              img->SetScalarTypeToDouble();
+                               try {
+-                                      img->AllocateScalars();
++                                        img->AllocateScalars(VTK_DOUBLE, 
dicomIO->GetNumberOfComponents());
+                               }
+                               catch (...) {
+                                       throw 
GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of 
memory"), "ControladorCarga/CargaMultidimensional");
+@@ -923,13 +914,10 @@ vtkSmartPointer<vtkImageData> GNC::GCS::
+               img->SetSpacing(chk_spacing);
+       }
+ 
+-      img->SetNumberOfScalarComponents(dicomIO->GetNumberOfComponents());
+-
+       //std::cout << "number of scalar components" << 
dicomIO->GetNumberOfComponents();
+ 
+-      img->SetScalarTypeToUnsignedChar();
+       try {
+-              img->AllocateScalars();
++                img->AllocateScalars(VTK_UNSIGNED_CHAR, 
dicomIO->GetNumberOfComponents());
+       }
+       catch (...) {
+               throw GNC::GCS::ControladorCargaException( _Std("Error loading 
the study: Out of memory"), "ControladorCarga/CargaMultidimensionalRGB");
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/gui/import/selectimagesimportation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/gui/import/selectimagesimportation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/gui/import/selectimagesimportation.cpp
+@@ -367,8 +367,8 @@ namespace GNC {
+                               double origin[3] = {0.0f,0.0f,0.0f};
+ 
+                               
data->SetDimensions(m_pwxImagePreview->GetWidth(), 
m_pwxImagePreview->GetHeight(), 1);
+-                              data->SetNumberOfScalarComponents(3);
+-                              data->SetScalarTypeToUnsignedChar();
++                              //data->SetNumberOfScalarComponents(3);
++                              //data->SetScalarTypeToUnsignedChar();
+                               
data->SetSpacing(spacing[0],spacing[1],spacing[2]);
+                               data->SetOrigin(origin[0],origin[1],origin[2]);
+ 
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/vtk/vtkSmartVolumeMapper.cxx
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/vtk/vtkSmartVolumeMapper.cxx
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/vtk/vtkSmartVolumeMapper.cxx
+@@ -495,7 +495,7 @@ void vtkSmartVolumeMapper::ConnectMapper
+     // make sure we not create a shallow copy each time to avoid
+     // performance penalty.
+     input2=vtkImageData::New();
+-    m->SetInputConnection(input2->GetProducerPort());
++    m->SetInputData(input2);
+     input2->Delete();
+     needShallowCopy=true;
+     }
+@@ -521,7 +521,7 @@ void vtkSmartVolumeMapper::ConnectFilter
+     // make sure we not create a shallow copy each time to avoid
+     // performance penalty.
+     input2=vtkImageData::New();
+-    f->SetInputConnection(input2->GetProducerPort());
++    f->SetInputData(input2);
+     input2->Delete();
+     needShallowCopy=true;
+     }
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/vtk/vtkginkgoimageviewer.cpp
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/vtk/vtkginkgoimageviewer.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/vtk/vtkginkgoimageviewer.cpp
+@@ -237,10 +237,10 @@ public:
+               TexturaOverlay->GetLookupTable()->SetRange(0, 1);
+               tblover->Delete();
+ 
+-              
MapperPlano->SetInput(vtkPolyData::SafeDownCast(PlaneSource->GetOutput()));
++              
MapperPlano->SetInputData(vtkPolyData::SafeDownCast(PlaneSource->GetOutput()));
+               MapperPlano->ScalarVisibilityOff();
+               MapperPlanoOverlay->ScalarVisibilityOff();
+-              
MapperPlanoOverlay->SetInput(vtkPolyData::SafeDownCast(PlaneSource->GetOutput()));
++              
MapperPlanoOverlay->SetInputData(vtkPolyData::SafeDownCast(PlaneSource->GetOutput()));
+ 
+               WindowLevel = 
vtkSmartPointer<vtkImageMapToWindowLevelColors>::New();
+ 
+@@ -651,7 +651,7 @@ void vtkGinkgoImageViewer::SetOverlay(co
+                       //overlay???
+                       if (p.OverlayData != NULL)
+                       {
+-                              p.TexturaOverlay->SetInput(p.OverlayData);
++                              p.TexturaOverlay->SetInputData(p.OverlayData);
+                               p.TexturaOverlay->Modified();
+                               p.OverlayActor->Modified();
+                               p.OverlayActor->VisibilityOn();
+@@ -695,7 +695,9 @@ void vtkGinkgoImageViewer::UpdateDisplay
+               }
+       }
+       else {
+-              p.ImageData->UpdateInformation();
++                // vtk 6 deleted this function, and since we have no 
InputConnection
++                // we must pray that the information doesn't need updating. 
++              // p.ImageData->UpdateInformation();
+               p.ImageData->GetOrigin(origin);
+               p.ImageData->GetSpacing(spacing);
+       }
+@@ -934,7 +936,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+       unsigned int nc = 0;
+ 
+       if (p.ImageData != NULL) {
+-              p.ImageData->UpdateInformation();
++              //p.ImageData->UpdateInformation();
+               nc = p.ImageData->GetNumberOfScalarComponents();
+       }
+       else if (p.InputConnection != NULL) {
+@@ -980,7 +982,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+                       p.Textura->MapColorScalarsThroughLookupTableOn();
+                       if (p.ImageData != NULL) {
+                               GNC::GCS::ILocker lock(p.Textura);
+-                              p.Textura->SetInput(p.ImageData);
++                              p.Textura->SetInputData(p.ImageData);
+                       }
+                       else {
+                               GNC::GCS::ILocker lock(p.Textura);
+@@ -992,7 +994,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+                       //overlay???
+                       if (p.OverlayData != NULL)
+                       {
+-                              p.TexturaOverlay->SetInput(p.OverlayData);
++                              p.TexturaOverlay->SetInputData(p.OverlayData);
+                               p.TexturaOverlay->Modified();
+                               p.OverlayActor->Modified();
+                               p.OverlayActor->VisibilityOn();
+@@ -1004,7 +1006,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+                       p.Textura->MapColorScalarsThroughLookupTableOff();
+                       if (p.ImageData != NULL) {
+                               GNC::GCS::ILocker lock(p.Textura);
+-                              p.Textura->SetInput(p.ImageData);
++                              p.Textura->SetInputData(p.ImageData);
+                       }
+                       else {
+                               GNC::GCS::ILocker lock(p.Textura);
+@@ -1032,7 +1034,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+                               //p.StreamConnector->RemoveAllInputs();
+                               if (p.ImageData != NULL) {
+                                       GNC::GCS::ILocker lock(p.Textura);
+-                                      p.Textura->SetInput(p.ImageData);
++                                      p.Textura->SetInputData(p.ImageData);
+                               }
+                               else {
+                                       GNC::GCS::ILocker lock(p.Textura);
+@@ -1043,7 +1045,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+                               //overlay???
+                               if (p.OverlayData != NULL)
+                               {
+-                                      
p.TexturaOverlay->SetInput(p.OverlayData);
++                                      
p.TexturaOverlay->SetInputData(p.OverlayData);
+                                       p.TexturaOverlay->Modified();
+                                       p.OverlayActor->Modified();
+                                       p.OverlayActor->VisibilityOn();
+@@ -1058,7 +1060,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+ 
+                               if (p.ImageData != NULL) {
+                                       GNC::GCS::ILocker lock(p.Textura);
+-                                      p.Textura->SetInput(p.ImageData);
++                                      p.Textura->SetInputData(p.ImageData);
+                               }
+                               else {
+                                       GNC::GCS::ILocker lock(p.Textura);
+@@ -1074,7 +1076,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+                               
p.Textura->MapColorScalarsThroughLookupTableOn();
+                               if (p.OverlayData != NULL)
+                               {
+-                                      
p.TexturaOverlay->SetInput(p.OverlayData);
++                                      
p.TexturaOverlay->SetInputData(p.OverlayData);
+                                       p.TexturaOverlay->Modified();
+                                       p.OverlayActor->Modified();
+                                       p.OverlayActor->VisibilityOn();
+@@ -1088,7 +1090,7 @@ void vtkGinkgoImageViewer::SetupPipeline
+                       }
+                       if (p.ImageData != NULL) {
+                               GNC::GCS::ILocker lock(p.Textura);
+-                              p.Textura->SetInput(p.ImageData);
++                              p.Textura->SetInputData(p.ImageData);
+                       }
+                       else {
+                               GNC::GCS::ILocker lock(p.Textura);
+@@ -1523,6 +1525,7 @@ int vtkGinkgoImageViewer::GetNumberOfCom
+       int nc = 0;
+ 
+       if (p.InputConnection != NULL) {
++                p.InputConnection->GetProducer()->Update(); 
+               vtkInformationVector* iv = 
p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+               if (iv->GetNumberOfInformationObjects() > 0) {
+                       vtkInformation* io = iv->GetInformationObject(0);
+@@ -1541,74 +1544,33 @@ int vtkGinkgoImageViewer::GetNumberOfCom
+ 
+ vtkDataArray* vtkGinkgoImageViewer::GetScalars()
+ {
+-      Pipeline& p  = members->Pipeline;
+-
+-      vtkImageData* pImgData = NULL;
+-      if (p.InputConnection != NULL) {
+-              if (p.InputConnection->GetProducer() &&  
p.InputConnection->GetProducer()->GetExecutive()) {
+-                      vtkInformationVector* iv = 
p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+-                      if (iv && iv->GetNumberOfInformationObjects() > 0) {
+-                              vtkInformation* io = 
iv->GetInformationObject(0);
+-                              pImgData = 
vtkImageData::SafeDownCast(io->Get(vtkDataObject::DATA_OBJECT()));
+-                      }
+-              }
+-      } else if (p.ImageData != NULL) {
+-              pImgData = p.ImageData;
+-      }
+-
++        vtkSmartPointer<vtkImageData> pImgData = GetDataObject();
++        
+       if (pImgData == NULL)
+               return NULL;
+ 
+-      pImgData->Update();
++      //pImgData->Update();
+       return pImgData->GetPointData()->GetScalars();
+ }
+ 
+ 
+ void* vtkGinkgoImageViewer::GetScalarPointer()
+ {
+-      Pipeline& p  = members->Pipeline;
+-
+-      vtkImageData* pImgData = NULL;
+-      if (p.InputConnection != NULL) {
+-              if (p.InputConnection->GetProducer() &&  
p.InputConnection->GetProducer()->GetExecutive()) {
+-                      vtkInformationVector* iv = 
p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+-                      if (iv && iv->GetNumberOfInformationObjects() > 0) {
+-                              vtkInformation* io = 
iv->GetInformationObject(0);
+-                              pImgData = 
vtkImageData::SafeDownCast(io->Get(vtkDataObject::DATA_OBJECT()));
+-                      }
+-              }
+-      } else if (p.ImageData != NULL) {
+-              pImgData = p.ImageData;
+-      }
+-
++      vtkSmartPointer<vtkImageData> pImgData = GetDataObject();
++        
+       if (pImgData == NULL)
+               return NULL;
+ 
+-      pImgData->Update();
+-      return pImgData->GetScalarPointer();
++        return pImgData->GetScalarPointer();
+ }
+ 
+ int vtkGinkgoImageViewer::GetScalarType()
+ {
+-      Pipeline& p  = members->Pipeline;
+-
+-      vtkImageData* pImgData = NULL;
+-      if (p.InputConnection != NULL) {
+-              if (p.InputConnection->GetProducer() &&  
p.InputConnection->GetProducer()->GetExecutive()) {
+-                      vtkInformationVector* iv = 
p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+-                      if (iv && iv->GetNumberOfInformationObjects() > 0) {
+-                              vtkInformation* io = 
iv->GetInformationObject(0);
+-                              pImgData = 
vtkImageData::SafeDownCast(io->Get(vtkDataObject::DATA_OBJECT()));
+-                      }
+-              }
+-      } else if (p.ImageData != NULL) {
+-              pImgData = p.ImageData;
+-      }
++      vtkSmartPointer<vtkImageData> pImgData = GetDataObject();
+ 
+       if (pImgData == NULL)
+               return -1;
+ 
+-      pImgData->Update();
+       return pImgData->GetScalarType();
+ }
+ 
+@@ -1619,6 +1581,7 @@ vtkSmartPointer<vtkImageData> vtkGinkgoI
+       vtkSmartPointer<vtkImageData> pImgData = NULL;
+       if (p.InputConnection != NULL ) {
+               if (p.InputConnection->GetProducer() &&  
p.InputConnection->GetProducer()->GetExecutive()) {
++                        p.InputConnection->GetProducer()->Update(); 
+                       //if 
(p.InputConnection->GetProducer()->GetExecutive()->Update())
+                       //{
+                       vtkInformationVector* iv = 
p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+@@ -1787,7 +1750,8 @@ bool vtkGinkgoImageViewer::GetWholeExten
+       }
+       else if (p.ImageData != NULL)
+       {
+-              p.ImageData->GetWholeExtent(extent);
++                // essentially pray
++              p.ImageData->GetExtent(extent);
+       }
+ 
+       return ok;
+@@ -1802,6 +1766,7 @@ bool vtkGinkgoImageViewer::SetUpdateExte
+ 
+       if (p.InputConnection != NULL) {
+               if (p.InputConnection->GetProducer() &&  
p.InputConnection->GetProducer()->GetExecutive()) {
++                        
p.InputConnection->GetProducer()->SetUpdateExtent(extent); 
+                       vtkInformationVector* iv = 
p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                       if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                               vtkInformation* io = 
iv->GetInformationObject(0);
+@@ -1810,10 +1775,6 @@ bool vtkGinkgoImageViewer::SetUpdateExte
+                       }
+               }
+       }
+-      else if (p.ImageData != NULL)
+-      {
+-              p.ImageData->SetUpdateExtent(extent);
+-      }
+ 
+       return ok;
+ }
+@@ -1996,6 +1957,7 @@ void vtkGinkgoImageViewer::SetAutoDefaul
+       vtkImageData* pImgData = NULL;
+       if (p.InputConnection != NULL) {
+               if (p.InputConnection->GetProducer() &&  
p.InputConnection->GetProducer()->GetExecutive()) {
++                        p.InputConnection->GetProducer()->Update(); 
+                       vtkInformationVector* iv = 
p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                       if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                               vtkInformation* io = 
iv->GetInformationObject(0);
+@@ -2017,8 +1979,9 @@ void vtkGinkgoImageViewer::SetAutoDefaul
+ 
+       double range[2];
+       // TODO PETA
+-      pImgData->UpdateInformation();
+-      pImgData->UpdateData();
++        // vtk6 doesn't have these 
++      //pImgData->UpdateInformation();
++      //pImgData->UpdateData();
+       pImgData->GetScalarRange(range);
+       //std::cout << range[0] << ", " << range[1] << std::endl;
+ 
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/vtk/vtkopenglginkgotexture.cpp
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/vtk/vtkopenglginkgotexture.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/vtk/vtkopenglginkgotexture.cpp
+@@ -55,9 +55,6 @@ PURPOSE.  See the above copyright notice
+ #include <vtkOpenGL.h>
+ #include <vtkgl.h> // vtkgl namespace
+ 
+-#include <vtkGLSLShaderProgram.h>
+-#include <vtkShader.h>
+-
+ #include <main/controllers/controladorlog.h>
+ #include <main/controllers/controladorpermisos.h>
+ 
+@@ -349,7 +346,7 @@ void vtkGinkgoOpenGLTexture::Load(vtkRen
+                       input->GetDimensions(size);
+ 
+                       int e[6] = {0, 0, 0, 0, 0, 0};
+-                      input->GetUpdateExtent(e);
++                      input->GetExtent(e);
+ 
+                       //std::cout << "Update extent: [ " << e[0] << ", " << 
e[1] << ", " << e[2] << ", " << e[3] << ", " << e[4] << ", " << e[5] << " ] " 
<< std::endl;
+ 
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/commands/thumbnailscommand.cpp
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/commands/thumbnailscommand.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/commands/thumbnailscommand.cpp
+@@ -309,17 +309,17 @@ namespace GADAPI {
+                                       pReslice->SetOutputOrigin(origin);
+ 
+                                       pReslice->SetInterpolationModeToCubic();
+-
++                                        
++                                        pReslice->Update();
++                                        pReslice->UpdateInformation();
++                                        
+                                       vtkSmartPointer<vtkImageData> timg = 
pReslice->GetOutput();
+-                                      timg->UpdateInformation();
+-
++                                        
+                                       if(timg->GetNumberOfScalarComponents() 
> 1) {
+                                               
normalizeFilter->SetInputConnection(pReslice->GetOutputPort());
+                                               
normalizeFilter->SetOutputScalarTypeToUnsignedChar();
+ 
+                                               if (timg->GetScalarType() != 
VTK_UNSIGNED_CHAR) {
+-
+-                                                      timg->Update();
+                                                       double range[2];
+                                                       
timg->GetScalarRange(range);
+ 
+@@ -354,7 +354,7 @@ namespace GADAPI {
+                                                               double v_max = 
level + 0.5 * window;    
+                                                               
pImageMap->GetLookupTable()->SetRange(v_min, v_max);
+                                                       } else {
+-                                                              timg->Update();
++                                                              
pImageMap->Update();
+                                                               double range[2];
+                                                               
timg->GetScalarRange(range);
+ 
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/itk/itkVTKImageToImageFilter.h
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/itk/itkVTKImageToImageFilter.h
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/itk/itkVTKImageToImageFilter.h
+@@ -135,7 +135,7 @@ namespace itk {
+       void
+               VTKImageToImageFilter<TOutputImage>
+               ::SetInput(vtkImageData * inputImage) {
+-                      m_Exporter->SetInput(inputImage);
++                      m_Exporter->SetInputData(inputImage);
+       }
+ 
+       /**
+Index: 
ginkgocadx-3.7.1.1573.41/src/visualizator/visualizator/estudios/visualizatorstudy.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/visualizator/visualizator/estudios/visualizatorstudy.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/visualizator/visualizator/estudios/visualizatorstudy.cpp
+@@ -141,8 +141,6 @@ GNC::GCS::Ptr<GNKVisualizator::TListaOve
+                                                       over.img = pimg;
+                                                       pimg->Delete();
+                                                       
over.img->SetDimensions(columnas,filas,1);
+-                                                      
over.img->SetScalarTypeToUnsignedChar();
+-                                                      
over.img->SetNumberOfScalarComponents(1);
+                                                       {                       
                                        
+                                                               float x,y;
+                                                               x=1.0f;
+@@ -158,7 +156,7 @@ GNC::GCS::Ptr<GNKVisualizator::TListaOve
+                                                               }
+                                                               
over.img->SetOrigin(x,y,1.0f);
+                                                       }
+-                                                      
over.img->AllocateScalars();
++                                                      
over.img->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
+ 
+                                                       unsigned char* pData = 
(unsigned char*)over.img->GetScalarPointer();
+                                                       const unsigned char * 
ptr = (const unsigned char *)overlayData.GetValor();
+@@ -189,8 +187,6 @@ GNC::GCS::Ptr<GNKVisualizator::TListaOve
+                                                               over.img = tmp;
+                                                               tmp->Delete();
+                                                               
over.img->SetDimensions(columnas,filas,1);
+-                                                              
over.img->SetScalarTypeToUnsignedChar();
+-                                                              
over.img->SetNumberOfScalarComponents(1);
+                                                               {               
                                                        
+                                                                       float 
x,y;
+                                                                       x=1.0f;
+@@ -206,7 +202,7 @@ GNC::GCS::Ptr<GNKVisualizator::TListaOve
+                                                                       }
+                                                                       
over.img->SetOrigin(x,y,1.0f);
+                                                               }
+-                                                              
over.img->AllocateScalars();
++                                                              
over.img->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
+ 
+                                                               unsigned char* 
pData = (unsigned char*)over.img->GetScalarPointer();
+                                                               const unsigned 
char * ptr = (const unsigned char *)overlayData.GetValor();
+Index: 
ginkgocadx-3.7.1.1573.41/src/visualizator/visualizator/wxvtk/gvistasimple.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/visualizator/visualizator/wxvtk/gvistasimple.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/visualizator/visualizator/wxvtk/gvistasimple.cpp
+@@ -217,15 +217,15 @@ void GVistaSimple::RefrescarOverlays(con
+                                       if(i==0) {
+                                               pBlend = 
vtkImageMathematics::New();
+                                               pBlend->SetOperationToMax();
+-                                              
pBlend->SetInput1((*itOverlays).img);
+-                                              
pBlend->SetInput2((*itOverlays).img);
++                                              
pBlend->SetInput1Data((*itOverlays).img);
++                                              
pBlend->SetInput2Data((*itOverlays).img);
+                                               pUltimoBlend = pBlend;
+                                       } else {
+                                               vtkImageMathematics* otroBlend 
= vtkImageMathematics::New();
+                                               otroBlend->SetOperationToMax();
+-                                              
pUltimoBlend->SetInput2(otroBlend->GetOutput());
+-                                              
otroBlend->SetInput1((*itOverlays).img);
+-                                              
otroBlend->SetInput2((*itOverlays).img);
++                                              
pUltimoBlend->SetInput2Data(otroBlend->GetOutput());
++                                              
otroBlend->SetInput1Data((*itOverlays).img);
++                                              
otroBlend->SetInput2Data((*itOverlays).img);
+                                               pUltimoBlend = otroBlend;
+                                               otroBlend->Delete();
+                                       }
+Index: ginkgocadx-3.7.1.1573.41/src/visualizator/CMakeLists.txt
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/visualizator/CMakeLists.txt
++++ ginkgocadx-3.7.1.1573.41/src/visualizator/CMakeLists.txt
+@@ -68,9 +68,6 @@ IF (USE_CUSTOM_VTK)
+       LINK_DIRECTORIES(${VTK_DIR})
+ ELSE()
+       INCLUDE(${VTK_USE_FILE})
+-      SET(VTK_LIBRARIES vtkCommon vtkGraphics vtkFiltering vtkHybrid vtkIO 
vtkRendering vtkImaging
+-      vtkGenericFiltering vtkWidgets vtkftgl vtkVolumeRendering vtkexoIIc 
vtkDICOMParser CACHE INTERNAL "")
+-      #MESSAGE("VTKLIBS = ${VTK_LIBRARIES}")
+ ENDIF()
+ 
+ 
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/CMakeLists.txt
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/CMakeLists.txt
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/CMakeLists.txt
+@@ -167,9 +167,6 @@ IF (USE_CUSTOM_VTK)
+       LINK_DIRECTORIES(${VTK_DIR})
+ ELSE()
+       INCLUDE(${VTK_USE_FILE})
+-      SET(VTK_LIBRARIES vtkCommon vtkGraphics vtkFiltering vtkHybrid vtkIO 
vtkRendering vtkImaging
+-      vtkGenericFiltering vtkWidgets vtkftgl vtkVolumeRendering vtkexoIIc 
vtkDICOMParser CACHE INTERNAL "")
+-      #MESSAGE("VTKLIBS = ${VTK_LIBRARIES}")
+ ENDIF()
+ 
+ IF(USE_CUSTOM_ITK)

Added: trunk/packages/ginkgocadx/trunk/debian/patches/03-dcmtk_361.patch
===================================================================
--- trunk/packages/ginkgocadx/trunk/debian/patches/03-dcmtk_361.patch           
                (rev 0)
+++ trunk/packages/ginkgocadx/trunk/debian/patches/03-dcmtk_361.patch   
2016-01-28 18:44:18 UTC (rev 21320)
@@ -0,0 +1,1760 @@
+Last-Update: 2016-01-28
+Forwarded: no
+Author: Gert Wollny <[email protected]>
+Description: Fix build with DCMTK-3.6.1-20150924
+ This patch fixes all the build issues with the DCMTK snapshot.
+ Most changes are quite streightforward, but the changes to the
+ guilogappender are actually unsave, i.e. the logger nay no longer
+ be locked properly, because now the mutex is private in the used
+ DCMTK class. It may also be, that this locking is now propperly
+ done internally. 
+ DCMTK also seems to have a problem with UNICODE in the oflog/logger.h
+ header. The current solution is to define the header guards of the
+ according include files and so avoid the inclusion of these unused but
+ referenced header files. 
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/controladorlog.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/controladorlog.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/controladorlog.cpp
+@@ -14,6 +14,7 @@
+ #include <api/ientorno.h>
+ #include <api/internationalization/internationalization.h>
+ #include <dcmtk/oflog/oflog.h>
++#include <dcmtk/oflog/ndc.h>
+ #include <dcmtk/oflog/fileap.h>
+ #include <dcmtk/oflog/helpers/loglog.h>
+ #include <dcmtk/oflog/configrt.h>
+@@ -28,6 +29,7 @@
+ #define LOGGER_DEFECTO "default"
+ 
+ namespace GNC {
++using namespace dcmtk; 
+       //region "Patron singleton"
+       GNC::ControladorLog* GNC::ControladorLog::m_pInstance = 0;
+ 
+@@ -65,13 +67,13 @@ namespace GNC {
+                       #endif
+                       ostr << "GinkgoLog.log";
+                       log4cplus::SharedAppenderPtr 
append_0(gnkLog4cplus::GUIAppender::Instance());
+-                      append_0->setName(LOG4CPLUS_TEXT("AppenderGUI"));
++                      append_0->setName(DCMTK_LOG4CPLUS_TEXT("AppenderGUI"));
+                       append_0->setLayout( OFauto_ptr<log4cplus::Layout>(new 
log4cplus::PatternLayout("%D{%Y/%m/%d %H:%M:%S.%q} [%t] %-5p %c %x - %m%n")) );
+                       log4cplus::Logger::getRoot().addAppender(append_0);
+                       
+                       OFString tmpStr(ostr.str().c_str());
+                       log4cplus::SharedAppenderPtr append_1(new 
log4cplus::RollingFileAppender(tmpStr, 5*1024*1024, 5,true));
+-                      append_1->setName(LOG4CPLUS_TEXT("AppenderFichero"));
++                      
append_1->setName(DCMTK_LOG4CPLUS_TEXT("AppenderFichero"));
+                       append_1->setLayout( OFauto_ptr<log4cplus::Layout>(new 
log4cplus::PatternLayout("%D{%Y/%m/%d %H:%M:%S.%q} [%t] %-5p %c %x - %m%n")) );
+                       log4cplus::Logger::getRoot().addAppender(append_1);
+                       
+@@ -166,22 +168,22 @@ namespace GNC {
+       {
+               switch(logLevel) {
+                       case GNC::ControladorLog::FatalLog:
+-                              LOG4CPLUS_FATAL(log, mensaje.c_str());
++                              DCMTK_LOG4CPLUS_FATAL(log, mensaje.c_str());
+                               break;
+                       case GNC::ControladorLog::ErrorLog:
+-                              LOG4CPLUS_ERROR(log, mensaje.c_str());
++                              DCMTK_LOG4CPLUS_ERROR(log, mensaje.c_str());
+                               break;
+                       case GNC::ControladorLog::WarnLog:
+-                              LOG4CPLUS_WARN(log, mensaje.c_str());
++                              DCMTK_LOG4CPLUS_WARN(log, mensaje.c_str());
+                               break;
+                       case GNC::ControladorLog::InfoLog:
+-                              LOG4CPLUS_INFO(log, mensaje.c_str());
++                              DCMTK_LOG4CPLUS_INFO(log, mensaje.c_str());
+                               break;
+                       case GNC::ControladorLog::DebugLog:
+-                              LOG4CPLUS_DEBUG(log, mensaje.c_str());
++                              DCMTK_LOG4CPLUS_DEBUG(log, mensaje.c_str());
+                               break;
+                       case GNC::ControladorLog::TraceLog:
+-                              LOG4CPLUS_TRACE(log, mensaje.c_str());
++                              DCMTK_LOG4CPLUS_TRACE(log, mensaje.c_str());
+                               break;
+                       case GNC::ControladorLog::NoLog:
+                               break;
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomassociation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomassociation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomassociation.cpp
+@@ -112,27 +112,27 @@ Association::~Association() {
+       m_pNotificadorProgreso = NULL;
+ }
+ 
+-CONDITION Association::Drop(CONDITION cond) {
++OFCondition Association::Drop(OFCondition cond) {
+     // tear down association
+-    if (cond == DIMSE_NORMAL) {
++    if (cond == EC_Normal) {
+               /* release association */
+               cond = ASC_releaseAssociation(assoc);
+     }
+-    else if (cond == DIMSE_PEERREQUESTEDRELEASE) {
++    else if (cond == DUL_PEERREQUESTEDRELEASE) {
+                cond = ASC_acknowledgeRelease(assoc);
+-               if (SUCCESS(cond)) {
++               if (cond.good()) {
+                       cond = ASC_abortAssociation(assoc);
+-                      if (SUCCESS(cond)) {
++                      if (cond.good()) {
+                               return cond;
+                       }
+                }
+     }
+-    else if (cond == DIMSE_PEERABORTEDASSOCIATION) {
++    else if (cond == DUL_PEERABORTEDASSOCIATION) {
+               return cond;
+     }
+     else {
+               cond = ASC_abortAssociation(assoc);
+-              if (SUCCESS(cond)) {
++              if (cond.good()) {
+                       return cond;
+               }
+     }
+@@ -142,7 +142,7 @@ CONDITION Association::Drop(CONDITION co
+ }
+ 
+ void Association::Destroy() {
+-    CONDITION cond = ASC_destroyAssociation(&assoc);
++    OFCondition cond = ASC_destroyAssociation(&assoc);
+ 
+     Net = NULL;
+     assoc = NULL;
+@@ -153,8 +153,8 @@ void Association::Destroy() {
+ 
+ }
+ 
+-CONDITION Association::SendObject(DcmDataset *dataset) {
+-      CONDITION cond = EC_Normal;
++OFCondition Association::SendObject(DcmDataset *dataset) {
++      OFCondition cond = EC_Normal;
+     DcmDataset *statusDetail = NULL;
+ 
+        if (Stopped()) {
+@@ -200,7 +200,7 @@ CONDITION Association::SendObject(DcmDat
+     if (opt_oxferSyn.getXfer() != ori_oxferSyn) {
+               LOG_DEBUG(ambitolog, "Converting object into accepted 
Transfer-Syntax: " << opt_oxferSyn.getXferName());
+ 
+-              CONDITION cond;
++              OFCondition cond;
+               // create RepresentationParameter
+               DJ_RPLossless rp_lossless(6, 0);
+               DJ_RPLossy rp_lossy(70);
+@@ -209,10 +209,10 @@ CONDITION Association::SendObject(DcmDat
+ 
+               const DcmRepresentationParameter *rp = NULL;
+ 
+-              if (opt_oxferSyn.getXfer() == 
EXS_JPEGProcess14SV1TransferSyntax || opt_oxferSyn.getXfer() == 
EXS_JPEGProcess14TransferSyntax) {
++              if (opt_oxferSyn.getXfer() == EXS_JPEGProcess14SV1 || 
opt_oxferSyn.getXfer() == EXS_JPEGProcess14) {
+                       rp = &rp_lossless;
+               }
+-              else if (opt_oxferSyn.getXfer() == 
EXS_JPEGProcess1TransferSyntax || opt_oxferSyn.getXfer() == 
EXS_JPEGProcess2_4TransferSyntax) {
++              else if (opt_oxferSyn.getXfer() == EXS_JPEGProcess1 || 
opt_oxferSyn.getXfer() == EXS_JPEGProcess2_4) {
+                       rp = &rp_lossy;
+               }
+ 
+@@ -270,12 +270,12 @@ CONDITION Association::SendObject(DcmDat
+               delete statusDetail;
+     }
+ 
+-    if (cond != DIMSE_NORMAL) {
++    if (cond != EC_Normal) {
+               return cond;
+     }
+ 
+       if (rsp.DimseStatus == STATUS_Success) {
+-              return DIMSE_NORMAL;
++              return EC_Normal;
+       }
+       else {
+               LOG_ERROR(ambitolog, "DIMSE Status failed: " << 
rsp.DimseStatus);
+@@ -283,7 +283,7 @@ CONDITION Association::SendObject(DcmDat
+       }
+ }
+ 
+-CONDITION Association::SendObject(DcmFileFormat *dcmff) {
++OFCondition Association::SendObject(DcmFileFormat *dcmff) {
+       if (Stopped()) {
+               return DUL_NETWORKCLOSED;
+       }
+@@ -310,7 +310,7 @@ void Association::Create(const std::stri
+     presId = 0;
+ }
+ 
+-CONDITION Association::SendEchoRequest() {
++OFCondition Association::SendEchoRequest() {
+     DIC_US status;
+     DcmDataset *statusDetail = NULL;
+ 
+@@ -389,7 +389,7 @@ GIL::DICOM::DCMTK::Network* Association:
+     return Net;
+ }
+ 
+-CONDITION Association::Connect(GIL::DICOM::DCMTK::Network *network, int pdu) {
++OFCondition Association::Connect(GIL::DICOM::DCMTK::Network *network, int 
pdu) {
+     Net = network;
+     return network->ConnectAssociation(this, pdu);
+ }
+@@ -419,10 +419,10 @@ int Association::GetTimeout() {
+     return m_timeout;
+ }
+ 
+-CONDITION Association::addAllStoragePresentationContexts(T_ASC_Parameters 
*params, bool /*bProposeCompression*/, int /*lossy*/) {
++OFCondition Association::addAllStoragePresentationContexts(T_ASC_Parameters 
*params, bool /*bProposeCompression*/, int /*lossy*/) {
+     unsigned int pid = 1;
+ 
+-      CONDITION cond = ASC_addPresentationContext(params, pid, 
m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
++      OFCondition cond = ASC_addPresentationContext(params, pid, 
m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
+       if (cond.bad()) {
+               LOG_ERROR(ambitolog, "Unable to add presentation context for " 
<< m_abstractSyntax);
+               return cond;
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomassociation.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomassociation.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomassociation.h
+@@ -14,14 +14,11 @@
+  */
+ #pragma once
+ 
+-#include <api/dicom/idicomconformance.h>
+-
+ #ifdef verify
+ #define MACRO_QUE_ESTORBA verify
+ #undef verify
+ #endif
+ 
+-#include <dcmtk/config/osconfig.h>
+ #include <dcmtk/dcmnet/assoc.h>
+ #include <dcmtk/dcmnet/cond.h>
+ #include <dcmtk/dcmnet/dimse.h>
+@@ -34,6 +31,9 @@
+ #define verify MACRO_QUE_ESTORBA
+ #endif
+ 
++#include <api/dicom/idicomconformance.h>
++
++
+ namespace GIL {
+       namespace DICOM {
+               namespace DCMTK {
+@@ -82,29 +82,29 @@ public:
+       /**
+       Connect the association to a dicom network
+       */
+-      CONDITION Connect(GIL::DICOM::DCMTK::Network* network, int pdu = 
ASC_DEFAULTMAXPDU);
++      OFCondition Connect(GIL::DICOM::DCMTK::Network* network, int pdu = 
ASC_DEFAULTMAXPDU);
+ 
+       void Destroy();
+ 
+       /**
+       Drop the association
+       */
+-      CONDITION Drop(CONDITION cond = DIMSE_NORMAL);
++      OFCondition Drop(OFCondition cond = EC_Normal);
+ 
+       /**
+       Send a dataset through the association (C-Store)
+       */
+-      virtual CONDITION SendObject(DcmDataset* dataset);
++      virtual OFCondition SendObject(DcmDataset* dataset);
+ 
+       /**
+       Send a fileformat object through the association (C-Store)
+       */
+-      virtual CONDITION SendObject(DcmFileFormat* dcmff);
++      virtual OFCondition SendObject(DcmFileFormat* dcmff);
+ 
+       /**
+       Send a C-Echo request through the association
+       */
+-      CONDITION SendEchoRequest();
++      OFCondition SendEchoRequest();
+ 
+       /**
+       Return the DicomNetwork this association is connected to
+@@ -225,7 +225,7 @@ protected:
+       Callback function to add user defined presentation context to 
association parameters
+       */
+       virtual void OnAddPresentationContext(T_ASC_Parameters *params) = 0;
+-      CONDITION addAllStoragePresentationContexts(T_ASC_Parameters *params, 
bool bProposeCompression, int lossy);
++      OFCondition addAllStoragePresentationContexts(T_ASC_Parameters *params, 
bool bProposeCompression, int lossy);
+ 
+       /**
+       Protected data
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomcustomassociation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomcustomassociation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomcustomassociation.cpp
+@@ -11,9 +11,9 @@
+ *
+ */
+ 
+-#include <wx/string.h>
+-#include <wx/intl.h>
+-#include <wx/filename.h>
++#include "dicomcustomassociation.h"
++#include "helpercompresion.h"
++#include <main/controllers/pacscontroller.h>
+ 
+ #include <api/controllers/icontroladorlog.h>
+ #include <api/controllers/ipacscontroller.h>
+@@ -23,9 +23,6 @@
+ #include <main/controllers/dcmtk/ginkgouid.h>
+ #include <api/internationalization/internationalization.h>
+ 
+-#include "dicomcustomassociation.h"
+-#include "helpercompresion.h"
+-#include <main/controllers/pacscontroller.h>
+ 
+ #include <api/dicom/dcmdictionary.h>
+ //#include <main/controllers/dicommanager.h>
+@@ -47,6 +44,10 @@
+ #define verify MACRO_QUE_ESTORBA
+ #endif
+ 
++#include <wx/string.h>
++#include <wx/intl.h>
++#include <wx/filename.h>
++
+ 
+ void DIMSE_printNStatusString(std::ostream& dumpStream, int status)
+ {
+@@ -159,7 +160,7 @@ bool CustomAssociation::Connect(const st
+               local_aet
+               );
+ 
+-      CONDITION r = Association::Connect(Net, m_server->PDU);
++      OFCondition r = Association::Connect(Net, m_server->PDU);
+ 
+       if (r.bad()) {
+               LOG_ERROR(ambitolog, "Error al conectar:" << r.text());
+@@ -363,7 +364,7 @@ bool CustomAssociation::createRQ( const
+ {
+       if (assoc == NULL)
+       {
+-              LOG_ERROR(ambitolog, DIMSE_ILLEGALASSOCIATION.text());
++              LOG_ERROR(ambitolog, DIMSE_ILLEGALASSOCIATION.theText);
+               return false;
+       }
+       
+@@ -371,7 +372,7 @@ bool CustomAssociation::createRQ( const
+       T_ASC_PresentationContextID presCtx = 
findAcceptedPC(sopclassUID.c_str());
+       if (presCtx == 0)
+       {
+-              LOG_ERROR(ambitolog, DIMSE_NOVALIDPRESENTATIONCONTEXTID.text());
++              LOG_ERROR(ambitolog, 
DIMSE_NOVALIDPRESENTATIONCONTEXTID.theText);
+               return false;
+       }  
+ 
+@@ -421,7 +422,7 @@ bool CustomAssociation::setRQ( const std
+ {
+       if (assoc == NULL)
+       {
+-              LOG_ERROR(ambitolog, DIMSE_ILLEGALASSOCIATION.text());
++              LOG_ERROR(ambitolog, DIMSE_ILLEGALASSOCIATION.theText);
+               return false;
+       }
+       
+@@ -429,7 +430,7 @@ bool CustomAssociation::setRQ( const std
+       T_ASC_PresentationContextID presCtx = 
findAcceptedPC(sopclassUID.c_str());
+       if (presCtx == 0)
+       {
+-              LOG_ERROR(ambitolog, DIMSE_NOVALIDPRESENTATIONCONTEXTID.text());
++              LOG_ERROR(ambitolog, 
DIMSE_NOVALIDPRESENTATIONCONTEXTID.theText);
+               return false;
+       }  
+ 
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomechoassociation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomechoassociation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomechoassociation.cpp
+@@ -39,7 +39,7 @@ void EchoAssociation::OnAddPresentationC
+       
transfersyntaxes.copyFrom(GIL::DICOM::Conformance::GetScuSOPClasses().GetSupportedTransferSyntaxUIDs("VerificationSOPClass"));
+       
+       
+-      CONDITION cond = ASC_addPresentationContext(params, 1, 
m_abstractSyntax.c_str(), transfersyntaxes.array, transfersyntaxes.size);
++      OFCondition cond = ASC_addPresentationContext(params, 1, 
m_abstractSyntax.c_str(), transfersyntaxes.array, transfersyntaxes.size);
+       if (cond.bad()) {
+               LOG_ERROR(ambitolog, "Unable to add default presentation 
context");
+       }
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomfindassociation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomfindassociation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomfindassociation.cpp
+@@ -52,8 +52,8 @@ FindAssociation::~FindAssociation() {
+       DeleteResultStack();
+ }
+ 
+-CONDITION FindAssociation::findSCU(T_ASC_Association *assoc, DcmDataset 
*query) {
+-      CONDITION cond;
++OFCondition FindAssociation::findSCU(T_ASC_Association *assoc, DcmDataset 
*query) {
++      OFCondition cond;
+       DIC_US msgId = assoc->nextMsgID++;
+       T_ASC_PresentationContextID presId;
+       T_DIMSE_C_FindRQ req;
+@@ -101,7 +101,7 @@ CONDITION FindAssociation::findSCU(T_ASC
+               errorMessage = os.str();
+       }
+       
+-      if (cond == DIMSE_NORMAL) {
++      if (cond == EC_Normal) {
+               if (rsp.DimseStatus == STATUS_Success) {
+               }
+       }
+@@ -160,7 +160,7 @@ void FindAssociation::findCallback(void*
+       }
+ }
+ 
+-CONDITION FindAssociation::SendObject(DcmDataset *dataset) {
++OFCondition FindAssociation::SendObject(DcmDataset *dataset) {
+       return findSCU(assoc, dataset);
+ }
+ 
+@@ -210,7 +210,7 @@ int FindAssociation::GetMaxResults() {
+ }
+ 
+ void FindAssociation::OnAddPresentationContext(T_ASC_Parameters* params) {
+-      CONDITION cond = ASC_addPresentationContext(params, 1, 
m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
++      OFCondition cond = ASC_addPresentationContext(params, 1, 
m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
+       if (cond.bad()) {
+               LOG_ERROR(ambitolog, "Unable to add default presentation 
context");
+       }
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomfindassociation.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomfindassociation.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomfindassociation.h
+@@ -18,6 +18,11 @@
+ #include <list>
+ #include <api/autoptr.h>
+ 
++// This was defined in dcmtk3.5.4 but has been removed since
++// Redefing it here may blow right in your face
++// 
++#define UID_FINDGeneralPurposeWorklistInformationModel   
"1.2.840.10008.5.1.4.32.1"
++
+ class DicomServer;
+ namespace GIL {
+       namespace DICOM
+@@ -83,7 +88,7 @@ public:
+       /**
+        Send a query object (C-Find) through association
+        */
+-      CONDITION SendObject(DcmDataset *dataset);
++      OFCondition SendObject(DcmDataset *dataset);
+       
+       /**
+        Get the result stack of the last query
+@@ -136,7 +141,7 @@ private:
+       /**
+        C-Find service class user
+        */
+-      CONDITION findSCU(T_ASC_Association * assoc, DcmDataset * query);
++      OFCondition findSCU(T_ASC_Association * assoc, DcmDataset * query);
+       
+       /**
+        Callback function for C-Find service class user
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomgetassociation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomgetassociation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomgetassociation.cpp
+@@ -11,6 +11,16 @@
+ *
+ */
+ #define LOGGER "C-GET"
++#include "dicomnetwork.h"
++#include "dicomgetassociation.h"
++
++#include <dcmtk/dcmnet/diutil.h>
++#include <dcmtk/dcmjpeg/djencode.h>
++#include <dcmtk/dcmjpeg/djrplol.h>
++#include <dcmtk/dcmdata/dcuid.h>
++#include <dcmtk/dcmdata/dcdatset.h>
++#include <dcmtk/dcmdata/dcdeftag.h>
++
+ #include <api/controllers/icontroladorlog.h>
+ #include <main/controllers/controladorlog.h>
+ #include <api/dicom/imodelodicom.h>
+@@ -21,15 +31,7 @@
+ #include "istorecallback.h"
+ #include <wx/intl.h>
+ 
+-#include "dicomnetwork.h"
+-#include "dicomgetassociation.h"
+ 
+-#include <dcmtk/dcmnet/diutil.h>
+-#include <dcmtk/dcmjpeg/djencode.h>
+-#include <dcmtk/dcmjpeg/djrplol.h>
+-#include <dcmtk/dcmdata/dcuid.h>
+-#include <dcmtk/dcmdata/dcdatset.h>
+-#include <dcmtk/dcmdata/dcdeftag.h>
+ 
+ GetAssociation::GetAssociation(const std::string& _ambitolog, IModeloDicom* 
pModelo) : FindAssociation(_ambitolog),
+       m_maxReceivePDULength(ASC_DEFAULTMAXPDU),
+@@ -57,7 +59,7 @@ void GetAssociation::SetModelo(IModeloDi
+       m_pModelo = pModelo;
+ }
+ 
+-CONDITION GetAssociation::SendObject(DcmDataset *dataset) {
++OFCondition GetAssociation::SendObject(DcmDataset *dataset) {
+       return getSCU(dataset);
+ }
+ 
+@@ -70,7 +72,7 @@ void GetAssociation::OnAddPresentationCo
+ 
+       unsigned int pid = 1;
+ 
+-      CONDITION cond = ASC_addPresentationContext(params, pid, 
m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
++      OFCondition cond = ASC_addPresentationContext(params, pid, 
m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
+       if (cond.bad()) {
+               LOG_ERROR(ambitolog, "Unable to add 
GETStudyRootQueryRetrieveInformationModel presentation context");
+               return;
+@@ -309,8 +311,8 @@ OFCondition MDIMSE_getUser(
+ }
+ 
+ 
+-CONDITION GetAssociation::getSCU(DcmDataset *pdset) {
+-      CONDITION cond;
++OFCondition GetAssociation::getSCU(DcmDataset *pdset) {
++      OFCondition cond;
+       T_ASC_PresentationContextID presId;
+       T_DIMSE_C_GetRQ req;
+       T_DIMSE_C_GetRSP rsp;
+@@ -461,14 +463,14 @@ void GetAssociation::subOpCallback(void
+       }
+ }
+ 
+-CONDITION GetAssociation::acceptSubAssoc(T_ASC_Network* /*aNet*/, 
T_ASC_Association** /*assoc*/) {
+-      CONDITION cond = ASC_NORMAL;
++OFCondition GetAssociation::acceptSubAssoc(T_ASC_Network* /*aNet*/, 
T_ASC_Association** /*assoc*/) {
++      OFCondition cond = EC_Normal;
+ 
+       return cond;
+ 
+ }
+ 
+-CONDITION GetAssociation::subOpSCP(T_ASC_Association **subAssoc) {
++OFCondition GetAssociation::subOpSCP(T_ASC_Association **subAssoc) {
+       T_DIMSE_Message msg;
+       T_ASC_PresentationContextID presID;
+ 
+@@ -520,8 +522,8 @@ CONDITION GetAssociation::subOpSCP(T_ASC
+       return cond;
+ }
+ 
+-CONDITION GetAssociation::storeSCP(T_ASC_Association *assoc, T_DIMSE_Message 
*msg, T_ASC_PresentationContextID presID) {
+-      CONDITION cond;
++OFCondition GetAssociation::storeSCP(T_ASC_Association *assoc, 
T_DIMSE_Message *msg, T_ASC_PresentationContextID presID) {
++      OFCondition cond;
+       T_DIMSE_C_StoreRQ* req;
+ 
+       req = &msg->msg.CStoreRQ;
+@@ -656,8 +658,8 @@ void GetAssociation::storeSCPCallback(vo
+       }
+ }
+ 
+-CONDITION GetAssociation::echoSCP(T_ASC_Association *assoc, T_DIMSE_Message 
*msg, T_ASC_PresentationContextID presID) {
+-      CONDITION cond;
++OFCondition GetAssociation::echoSCP(T_ASC_Association *assoc, T_DIMSE_Message 
*msg, T_ASC_PresentationContextID presID) {
++      OFCondition cond;
+ 
+       // the echo succeeded !!
+       cond = DIMSE_sendEchoResponse(assoc, presID, &msg->msg.CEchoRQ, 
STATUS_Success, NULL);
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomgetassociation.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomgetassociation.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomgetassociation.h
+@@ -33,7 +33,7 @@ public:
+ 
+        void Create(const std::string& title, const std::string& peer, int 
port, const std::string& ouraet, /*int ourPort,*/ const char *abstractSyntax = 
UID_GETStudyRootQueryRetrieveInformationModel);
+       
+-    CONDITION SendObject(DcmDataset *dataset);
++    OFCondition SendObject(DcmDataset *dataset);
+       
+ //protected:
+       
+@@ -59,18 +59,18 @@ public:
+               std::clock_t lastTick;
+     } StoreCallbackInfo;
+       
+-    CONDITION getSCU(DcmDataset *pdset);
++    OFCondition getSCU(DcmDataset *pdset);
+     
+        static void getCallback(void *callbackData, T_DIMSE_C_GetRQ *request, 
int responseCount, T_DIMSE_C_GetRSP *response);
+       
+-    CONDITION acceptSubAssoc(T_ASC_Network *aNet, T_ASC_Association **assoc);
+-    CONDITION subOpSCP(T_ASC_Association **subAssoc);
++    OFCondition acceptSubAssoc(T_ASC_Network *aNet, T_ASC_Association 
**assoc);
++    OFCondition subOpSCP(T_ASC_Association **subAssoc);
+     static void subOpCallback(void * pCaller, T_ASC_Network *aNet, 
T_ASC_Association **subAssoc);
+       
+-    CONDITION storeSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, 
T_ASC_PresentationContextID presID);
++    OFCondition storeSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, 
T_ASC_PresentationContextID presID);
+     static void storeSCPCallback(void *callbackData, T_DIMSE_StoreProgress 
*progress, T_DIMSE_C_StoreRQ *req, char *imageFileName, DcmDataset 
**imageDataSet, T_DIMSE_C_StoreRSP *rsp, DcmDataset **statusDetail);
+       
+-    CONDITION echoSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, 
T_ASC_PresentationContextID presID);
++    OFCondition echoSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, 
T_ASC_PresentationContextID presID);
+ 
+       
+     IModeloDicom* m_pModelo;
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomimg2dcm.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomimg2dcm.h
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomimg2dcm.h
+@@ -12,8 +12,6 @@
+  *
+  */
+ #pragma once
+-#include <api/globals.h>
+-#include <api/dicom/idicomizador.h>
+ #ifdef verify
+ #define MACRO_QUE_ESTORBA verify
+ #undef verify
+@@ -26,6 +24,9 @@
+ #include "dcmtk/dcmdata/dcdict.h"
+ #include "dcmtk/dcmdata/dchashdi.h"
+ 
++#include <api/globals.h>
++#include <api/dicom/idicomizador.h>
++
+ class DcmElement;
+ class wxCSConv;
+ 
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicommoveassociation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicommoveassociation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicommoveassociation.cpp
+@@ -14,6 +14,7 @@
+  */
+ #define LOGGER "C-MOVE"
+ 
++#include "dicomnetwork.h"
+ #include <api/controllers/icontroladorlog.h>
+ #include <main/controllers/controladorlog.h>
+ #include <api/dicom/imodelodicom.h>
+@@ -25,7 +26,7 @@
+ 
+ #include "istorecallback.h"
+ 
+-#include "dicomnetwork.h"
++
+ #include "dicommoveassociation.h"
+ 
+ #include <dcmtk/dcmnet/diutil.h>
+@@ -62,7 +63,7 @@ void MoveAssociation::SetModelo(IModeloD
+       m_pModelo = pModelo;
+ }
+ 
+-CONDITION MoveAssociation::SendObject(DcmDataset *dataset) {
++OFCondition MoveAssociation::SendObject(DcmDataset *dataset) {
+       return moveSCU(dataset);
+ }
+ 
+@@ -70,8 +71,8 @@ void MoveAssociation::OnAddPresentationC
+       addAllStoragePresentationContexts(params, true, true);
+ }
+ 
+-CONDITION MoveAssociation::moveSCU(DcmDataset *pdset) {
+-      CONDITION cond;
++OFCondition MoveAssociation::moveSCU(DcmDataset *pdset) {
++      OFCondition cond;
+       T_ASC_PresentationContextID presId;
+       T_DIMSE_C_MoveRQ req;
+       T_DIMSE_C_MoveRSP rsp;
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicommoveassociation.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicommoveassociation.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicommoveassociation.h
+@@ -28,7 +28,7 @@ public:
+ 
+       void Create(const std::string& title, const std::string& peer, int 
port, const std::string& ouraet, /*int ourPort,*/ const char *abstractSyntax = 
UID_MOVEStudyRootQueryRetrieveInformationModel);
+ 
+-      CONDITION SendObject(DcmDataset *dataset);
++      OFCondition SendObject(DcmDataset *dataset);
+ 
+ 
+ protected:
+@@ -37,7 +37,7 @@ protected:
+ 
+ private:
+ 
+-      CONDITION moveSCU(DcmDataset *pdset);
++      OFCondition moveSCU(DcmDataset *pdset);
+ 
+       int m_maxReceivePDULength;
+       IModeloDicom* m_pModelo;
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomnetclient.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomnetclient.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomnetclient.h
+@@ -89,9 +89,9 @@ public:
+               T::SetNotificadorProgreso(m_pNotificadorProgreso);
+ 
+               LOG_DEBUG(ambitolog, "Connected: AET = " << server->AET << ", 
Host = " << server->HostName << ", Port = " << server->Port << ", Local AET = " 
<< local_aet << ", PDU = " << server->PDU);
+-              CONDITION r = T::Connect(Net, server->PDU);
++              OFCondition r = T::Connect(Net, server->PDU);
+ 
+-              CONDITION c = ECC_Normal;
++              OFCondition c = EC_Normal;
+ 
+               if (r.good() == true) {
+                       c = T::SendObject();
+@@ -137,9 +137,9 @@ public:
+               T::SetCallbackInfo(&resultsWrapper, server);
+ 
+               LOG_INFO(ambitolog, "Connecting: AET = " << server->AET << ", 
Host = " << server->HostName << ", Puerto = " << server->Port << ", Local AET = 
" << local_aet << ", PDU = " << server->PDU);
+-              CONDITION r = T::Connect(Net, server->PDU);
++              OFCondition r = T::Connect(Net, server->PDU);
+ 
+-              CONDITION c = ECC_Normal;
++              OFCondition c = EC_Normal;
+ 
+               if (r.good() == true) {
+                       LOG_DEBUG(ambitolog, "Requesting object:" << std::endl 
<< DumpDataset(query));
+@@ -191,9 +191,9 @@ public:
+               T::SetNotificadorProgreso(m_pNotificadorProgreso);
+ 
+               LOG_INFO(ambitolog, "Connecting: AET = " << server->AET << ", 
Host = " << server->HostName << ", Puerto = " << server->Port << ", Local AET = 
" << local_aet << ", PDU = " << server->PDU);
+-              CONDITION r = T::Connect(Net, server->PDU);
++              OFCondition r = T::Connect(Net, server->PDU);
+ 
+-              CONDITION c = ECC_Normal;
++              OFCondition c = EC_Normal;
+ 
+               if (r.good() == true) {
+                       LOG_DEBUG(ambitolog, "Requesting object:" << std::endl 
<< DumpDataset(query));
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomnetwork.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomnetwork.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomnetwork.cpp
+@@ -13,7 +13,6 @@
+  *
+  */
+ #include <sstream>
+-#include <wx/string.h>
+ #include "dicomnetwork.h"
+ #include "dicomechoassociation.h"
+ #include <api/controllers/ipacscontroller.h>
+@@ -47,6 +46,8 @@
+ #define verify MACRO_QUE_ESTORBA
+ #endif
+ 
++#include <wx/string.h>
++
+ GIL::DICOM::DCMTK::Network::IntanceMapType 
GIL::DICOM::DCMTK::Network::m_pInstancesMap;
+ 
+ GNC::GCS::ILockable GIL::DICOM::DCMTK::Network::m_sLock;
+@@ -98,9 +99,9 @@ GIL::DICOM::DCMTK::Network::~Network() {
+       DropNetwork();
+ }
+ 
+-CONDITION GIL::DICOM::DCMTK::Network::ConnectAssociation(Association* assoc, 
int pdu) {
++OFCondition GIL::DICOM::DCMTK::Network::ConnectAssociation(Association* 
assoc, int pdu) {
+       GNC::GCS::ILocker lock(m_sLock);
+-      CONDITION cond;
++      OFCondition cond;
+       
+       cond = ASC_ConnectAssociation(
+                                                                 assoc,
+@@ -109,7 +110,7 @@ CONDITION GIL::DICOM::DCMTK::Network::Co
+                                                                 
assoc->m_calledPort,
+                                                                 
assoc->m_ourAET,
+                                                                 pdu);
+-      if (!SUCCESS(cond)) {
++      if (!cond.good()) {
+               assoc->Drop(cond);
+               return cond;
+       }
+@@ -125,14 +126,14 @@ bool GIL::DICOM::DCMTK::Network::Initial
+       return m_Initiallized;
+ }
+ 
+-CONDITION GIL::DICOM::DCMTK::Network::InitializeNetwork(int timeout, 
Association::RoleType role, int port) {
++OFCondition GIL::DICOM::DCMTK::Network::InitializeNetwork(int timeout, 
Association::RoleType role, int port) {
+ 
+       if (m_pDCMTKNetwork != NULL) {
+               LOG_WARN("DICOMNetwork", "Shutting down previous initiallized 
network");
+               DropNetwork();
+       }
+ 
+-      CONDITION cond;
++      OFCondition cond;
+       
+       switch (role) {
+               case Association::RT_Acceptor:
+@@ -152,16 +153,16 @@ CONDITION GIL::DICOM::DCMTK::Network::In
+       return cond;
+ }
+ 
+-CONDITION GIL::DICOM::DCMTK::Network::DropNetwork() {
++OFCondition GIL::DICOM::DCMTK::Network::DropNetwork() {
+       
+-      CONDITION cond = ASC_dropNetwork(&m_pDCMTKNetwork);
++      OFCondition cond = ASC_dropNetwork(&m_pDCMTKNetwork);
+       m_pDCMTKNetwork = NULL;
+       
+       return cond;
+ }
+ 
+-CONDITION GIL::DICOM::DCMTK::Network::ASC_ConnectAssociation(Association* 
assoc, const std::string& peerTitle, const std::string& peer, int port, const 
std::string& ouraet, int pdu) {
+-      CONDITION cond;
++OFCondition GIL::DICOM::DCMTK::Network::ASC_ConnectAssociation(Association* 
assoc, const std::string& peerTitle, const std::string& peer, int port, const 
std::string& ouraet, int pdu) {
++      OFCondition cond;
+       
+       GTLSTransportLayer *tLayer = NULL;
+       
+@@ -208,14 +209,14 @@ CONDITION GIL::DICOM::DCMTK::Network::AS
+     char localHost[129];
+       
+     cond = ASC_createAssociationParameters(&params, pdu);
+-    if (!SUCCESS(cond)) {
++    if (!cond.good()) {
+               return cond;
+     }
+ 
+        //user identity
+        if (assoc->UseUserPass()) {
+                cond = ASC_setIdentRQUserPassword(params, 
assoc->GetUser().c_str(), assoc->GetPass().c_str());
+-               if (!SUCCESS(cond)) {
++               if (!cond.good()) {
+                       return cond;
+                }
+        }
+@@ -246,8 +247,8 @@ CONDITION GIL::DICOM::DCMTK::Network::AS
+       
+       /* create association */
+       cond = ASC_requestAssociation(m_pDCMTKNetwork, params, &(assoc->assoc));
+-      if (cond != ASC_NORMAL) {
+-              if (cond == ASC_ASSOCIATIONREJECTED) {
++      if (cond != EC_Normal) {
++              if (cond == DUL_ASSOCIATIONREJECTED) {
+                       T_ASC_RejectParameters rej;
+                       
+                       ASC_getRejectParameters(params, &rej);
+@@ -272,10 +273,10 @@ CONDITION GIL::DICOM::DCMTK::Network::AS
+               return cond;
+     }
+       
+-    return ASC_NORMAL;
++    return EC_Normal;
+ }
+ 
+-CONDITION GIL::DICOM::DCMTK::Network::SendEchoRequest(const std::string& 
title, const std::string& peer, int port, const std::string& ouraet, int pdu) {
++OFCondition GIL::DICOM::DCMTK::Network::SendEchoRequest(const std::string& 
title, const std::string& peer, int port, const std::string& ouraet, int pdu) {
+       EchoAssociation dcmEcho("C-ECHO");
+       dcmEcho.Create(title, peer, port, ouraet, UID_VerificationSOPClass);
+       
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomnetwork.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomnetwork.h
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomnetwork.h
+@@ -37,22 +37,23 @@ namespace GIL {
+                               /**
+                               Initialize the dicom network
+                               */
+-                              CONDITION InitializeNetwork(int timeout,  
Association::RoleType role = Association::RT_Requestor, int port = 0);
++
++                              OFCondition InitializeNetwork(int timeout,  
Association::RoleType role = Association::RT_Requestor, int port = 0);
+ 
+                               /**
+                               Drop the dicom network
+                               */
+-                              CONDITION DropNetwork();
++                              OFCondition DropNetwork();
+ 
+                               /**
+                               Connect an association to the specified host
+                               */
+-                              CONDITION ConnectAssociation(Association* 
assoc, int pdu = ASC_DEFAULTMAXPDU);
++                              OFCondition ConnectAssociation(Association* 
assoc, int pdu = ASC_DEFAULTMAXPDU);
+ 
+                               /**
+                               Send C-Echo request to dicom node
+                               */
+-                              CONDITION SendEchoRequest(const std::string& 
title, const std::string& peer, int port, const std::string& ouraet, int pdu);
++                              OFCondition SendEchoRequest(const std::string& 
title, const std::string& peer, int port, const std::string& ouraet, int pdu);
+ 
+                               /**
+                               Get the pointer to the internal dcmtk network 
variable (sorry)
+@@ -66,7 +67,7 @@ namespace GIL {
+                               /**
+                               Connect to a host and try to establish an 
association
+                               */
+-                              CONDITION ASC_ConnectAssociation(Association* 
assoc, const std::string& peerTitle, const std::string& peer, int port, const 
std::string& ouraet, int pdu = ASC_DEFAULTMAXPDU);
++                              OFCondition ASC_ConnectAssociation(Association* 
assoc, const std::string& peerTitle, const std::string& peer, int port, const 
std::string& ouraet, int pdu = ASC_DEFAULTMAXPDU);
+ 
+                               /**
+                               THE dicom network
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp
+@@ -11,6 +11,7 @@
+  *
+  */
+ 
++#include "dicomprintassociation.h"
+ #include <wx/string.h>
+ #include <wx/intl.h>
+ #include <wx/filename.h>
+@@ -24,7 +25,7 @@
+ #include <api/internationalization/internationalization.h>
+ #include <api/dicom/dcmdictionary.h>
+ 
+-#include "dicomprintassociation.h"
++
+ #include "helpercompresion.h"
+ 
+ 
+@@ -189,9 +190,9 @@ PrintAssociation::~PrintAssociation() {
+       
+ }
+ 
+-CONDITION PrintAssociation::Print(const GNC::GCS::Ptr<DicomServer>& server, 
const std::string& local_aet, const GIL::DICOM::DicomDataset& film, const 
GIL::DICOM::DicomDataset& layout, const GIL::DICOM::DicomDataset& job, const 
std::list<std::string>& images)
++OFCondition PrintAssociation::Print(const GNC::GCS::Ptr<DicomServer>& server, 
const std::string& local_aet, const GIL::DICOM::DicomDataset& film, const 
GIL::DICOM::DicomDataset& layout, const GIL::DICOM::DicomDataset& job, const 
std::list<std::string>& images)
+ {
+-      CONDITION status = DIMSE_NORMAL;
++      OFCondition status = EC_Normal;
+       
+       //1. Open Association
+       
+@@ -209,9 +210,9 @@ CONDITION PrintAssociation::Print(const
+       SetNotificadorProgreso(m_pNotificadorProgreso);
+ 
+       LOG_DEBUG(ambitolog, "Conectando: AET = " << server->AET << ", Host = " 
<< server->HostName << ", Puerto = " << server->Port << ", Local AET = " << 
local_aet << ", PDU = " << server->PDU);
+-      CONDITION r = Connect(Net, server->PDU);
++      OFCondition r = Connect(Net, server->PDU);
+       
+-      CONDITION c = ECC_Normal;
++      OFCondition c = EC_Normal;
+       
+       Uint16 rstatus;
+ 
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomprintassociation.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomprintassociation.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomprintassociation.h
+@@ -13,6 +13,7 @@
+ #pragma once
+ #include <string>
+ #include <vector>
++#include <api/autoptr.h>
+ #include "dicomassociation.h"
+ #include <api/dicom/imodelodicom.h>
+ #include <main/controllers/dcmtk/dicomservers.h>
+@@ -21,6 +22,12 @@
+ #include <dcmtk/ofstd/ofstream.h>
+ #include <dcmtk/ofstd/ofstring.h>      /* for class OFString */
+ 
++namespace GIL {
++        namespace DICOM {
++                class DicomDataset;
++        }
++}
++
+ class DicomImage;
+ 
+ 
+@@ -61,7 +68,7 @@ public:
+       /**
+        Send a query object (C-Find) through association
+        */
+-      CONDITION Print(const GNC::GCS::Ptr<DicomServer>& server, const 
std::string& local_aet, const GIL::DICOM::DicomDataset& film, const 
GIL::DICOM::DicomDataset& layout, const GIL::DICOM::DicomDataset& job, const 
std::list<std::string>& files);
++      OFCondition Print(const GNC::GCS::Ptr<DicomServer>& server, const 
std::string& local_aet, const GIL::DICOM::DicomDataset& film, const 
GIL::DICOM::DicomDataset& layout, const GIL::DICOM::DicomDataset& job, const 
std::list<std::string>& files);
+       
+ private:
+       
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomservice.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomservice.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomservice.cpp
+@@ -10,14 +10,16 @@
+  *  See License.txt for details
+  */
+ 
++#include "dicomservice.h"
++#include "dicomnetwork.h"
+ #include <api/controllers/icontroladorlog.h>
+ #include <api/internationalization/internationalization.h>
+ #include <main/controllers/controladorlog.h>
+ #include <main/controllers/commandcontroller.h>
+ #include <main/controllers/configurationcontroller.h>
+ #include <commands/incomingdicomassociationcommand.h>
+-#include "dicomservice.h"
+-#include "dicomnetwork.h"
++
++
+ 
+ #ifdef MACRO_QUE_ESTORBA
+ #define verify MACRO_QUE_ESTORBA
+@@ -77,11 +79,11 @@ GIL::DICOM::Service::~Service() {
+       m_pNotificadorProgreso = NULL;
+ }
+ 
+-CONDITION GIL::DICOM::Service::Start() {
++OFCondition GIL::DICOM::Service::Start() {
+       GNC::GCS::ILocker lock(lockerRunning);
+       m_WantToStop = false;
+ 
+-      CONDITION cond;
++      OFCondition cond;
+ 
+       switch (m_Role) {
+               case RT_Acceptor:
+@@ -154,7 +156,7 @@ CONDITION GIL::DICOM::Service::Start() {
+ }
+ 
+ void* GIL::DICOM::Service::Task() {
+-      CONDITION cond = EC_Normal;
++      OFCondition cond = EC_Normal;
+       OFString temp_str;
+ 
+ 
+@@ -180,7 +182,7 @@ void* GIL::DICOM::Service::Task() {
+ 
+ }
+ 
+-CONDITION GIL::DICOM::Service::acceptAssociation()
++OFCondition GIL::DICOM::Service::acceptAssociation()
+ {
+       
+ 
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomservice.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomservice.h
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomservice.h
+@@ -60,13 +60,13 @@ namespace GIL {
+ 
+                       void Destroy();
+ 
+-                      CONDITION Start();
++                      OFCondition Start();
+ 
+                       void Stop();
+ 
+                       virtual void* Task();
+ 
+-                      CONDITION acceptAssociation();
++                      OFCondition acceptAssociation();
+ 
+                       /*Set notificador de progreso*/
+                       void 
SetNotificadorProgreso(GNC::IProxyNotificadorProgreso* pNotificadorProgreso) {
+@@ -86,7 +86,7 @@ namespace GIL {
+                       /**
+                       Drop the association
+                       */
+-                      CONDITION Drop(CONDITION cond = DIMSE_NORMAL);
++                      OFCondition Drop(OFCondition cond = EC_Normal);
+ 
+                       RoleType GetRole() const
+                       {
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/ofstd/offile.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/ofstd/offile.h
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/ofstd/offile.h
+@@ -36,8 +36,8 @@
+  *
+  */
+ 
+-#ifndef OFFILE_H
+-#define OFFILE_H
++#ifndef GINKGOCADX_OFFILE_H
++#define GINKGOCADX_OFFILE_H
+ 
+ #include <dcmtk/config/osconfig.h>
+ #include <dcmtk/ofstd/oftypes.h>    /* for class OFBool */
+@@ -112,20 +112,20 @@ typedef int offile_errno_t;
+ *  on Unix platforms are based on errno and strerror/strerror_r, but may be 
based
+ *  on other mechanisms on platforms where errno does not exist.
+ */
+-class OFFile
++class GinkgoOFFile
+ {
+ public:
+       /// default constructor, creates an object that is not associated with 
any file.
+-      OFFile(): file_(NULL), popened_(OFFalse), lasterror_(0) {}
++      GinkgoOFFile(): file_(NULL), popened_(OFFalse), lasterror_(0) {}
+ 
+       /** create object for given stdio FILE
+       *  @param f stdio FILE
+       */
+-      OFFile(FILE *f): file_(f), popened_(OFFalse), lasterror_(0) {}
++      GinkgoOFFile(FILE *f): file_(f), popened_(OFFalse), lasterror_(0) {}
+ 
+       /// destructor. Closes file if still open.
+-      ~OFFile()
+-      {
++      ~GinkgoOFFile()
++{
+               if (file_) of_fclose();
+       }
+ 
+@@ -811,10 +811,10 @@ public:
+ private:
+ 
+       // private undefined copy constructor
+-      OFFile(const OFFile &arg);
++      GinkgoOFFile(const GinkgoOFFile &arg);
+ 
+       // private undefined assignment operator
+-      OFFile &operator=(const OFFile &arg);
++      GinkgoOFFile &operator=(const GinkgoOFFile &arg);
+ 
+       /// the file maintained by this object
+       FILE *file_;
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/log4cplus/guiappender.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/log4cplus/guiappender.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/log4cplus/guiappender.h
+@@ -22,7 +22,7 @@
+ 
+ namespace gnkLog4cplus {
+       
+-      class  GUIAppender : public log4cplus::Appender {
++      class  GUIAppender : public dcmtk::log4cplus::Appender {
+               
+       public:
+               
+@@ -46,12 +46,12 @@ namespace gnkLog4cplus {
+               
+               // Ctors                  
+               GUIAppender(bool logToStdErr = false, bool immediateFlush = 
false);
+-              GUIAppender(const log4cplus::helpers::Properties properties);
++              GUIAppender(const dcmtk::log4cplus::helpers::Properties 
properties);
+               GUIAppender(const GUIAppender& o);
+               
+               // Dtor
+               ~GUIAppender();
+-              virtual void append(const log4cplus::spi::InternalLoggingEvent& 
event);
++              virtual void append(const 
dcmtk::log4cplus::spi::InternalLoggingEvent& event);
+               
+               // Data
+               bool logToStdErr;
+@@ -64,8 +64,8 @@ namespace gnkLog4cplus {
+               GNC::GCS::Logging::ILogger* m_pLogger;
+               ListaLogs                   m_Logs;
+               
+-              log4cplus::LogLevelManager& llmCache;
+-              log4cplus::tstring         datetimeFormat;
++              dcmtk::log4cplus::LogLevelManager& llmCache;
++              dcmtk::log4cplus::tstring         datetimeFormat;
+               
+               
+               static GUIAppender* m_pInstancia;
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/pacscontroller.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/pacscontroller.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/pacscontroller.cpp
+@@ -11,11 +11,7 @@
+ *
+ *
+ */
+-#include <string>
+-#include <limits>
+-#include <openssl/md5.h>
+ 
+-#include "pacscontroller.h"
+ #include "dcmtk/dicomimg2dcm.h"
+ #include "dcmtk/dicomservers.h"
+ #include "dcmtk/dicomservice.h"
+@@ -29,6 +25,12 @@
+ #include <dcmtk/dcmdata/dcrledrg.h>
+ #include <dcmtk/dcmjpeg/djdecode.h>
+ #include <dcmtk/dcmdata/dcdicdir.h>
++
++#include <string>
++#include <limits>
++#include <openssl/md5.h>
++
++#include "pacscontroller.h"
+ #include <api/ientorno.h>
+ #include <api/dicom/imodelodicom.h>
+ #include <api/dicom/dcmdictionary.h>
+@@ -457,7 +459,7 @@ namespace GIL {
+                       }
+                       try {
+                               PrintAssociation f(connectionKey, "C-PRINT", 
pNotificador);
+-                              CONDITION cond = f.Print(server, 
GNC::Entorno::Instance()->GetDicomLocalAET(), film, layout, job, files);
++                              OFCondition cond = f.Print(server, 
GNC::Entorno::Instance()->GetDicomLocalAET(), film, layout, job, files);
+                               if (cond.bad()) {
+                                       throw 
GIL::DICOM::PACSException(cond.text(), "GIL/DICOM/Print");
+                               }
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/main/entorno.cpp
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/entorno.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/entorno.cpp
+@@ -43,11 +43,18 @@
+ #include <main/controllers/integrationcontroller.h>
+ #include <main/managers/widgetsmanager.h>
+ 
+-
++#ifdef UNICODE
++#define UNICODE_WAS_SET
++#undef UNICODE
++#endif 
+ #include <dcmtk/dcmjpeg/djdecode.h>
+ #include <dcmtk/dcmjpeg/djencode.h>
+ #include <dcmtk/dcmdata/dcrledrg.h>
+ #include <dcmtk/dcmdata/dcrleerg.h>
++#ifdef UNICODE_WAS_SET
++#define UNICODE
++#endif 
++
+ 
+ #include "entorno.h"
+ 
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/gui/configuration/panelconfiguracionpacs.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/gui/configuration/panelconfiguracionpacs.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/gui/configuration/panelconfiguracionpacs.cpp
+@@ -15,13 +15,14 @@
+ #include <sstream>
+ #include <limits>
+ 
+-#include <main/controllers/dcmtk/dicomservers.h>
+-#include <main/controllers/pacscontroller.h>
+-#include <main/controllers/controladorextensiones.h>
+ #include <main/controllers/dcmtk/dicomnetwork.h>
+ #include <main/controllers/dcmtk/dicomechoassociation.h>
+ #include <main/controllers/controladorlog.h>
+ #include <main/controllers/controladorpermisos.h>
++#include <main/controllers/dcmtk/dicomservers.h>
++#include <main/controllers/pacscontroller.h>
++#include <main/controllers/controladorextensiones.h>
++
+ 
+ #include <wx/uri.h>
+ #include <wx/msgdlg.h>
+@@ -574,7 +575,7 @@ namespace GNC {
+                                                       if (m_pUser->GetValue() 
!= wxEmptyString) {
+                                                               
as.SetUserPass(std::string(m_pUser->GetValue().ToUTF8()), 
std::string(m_pPassword->GetValue().ToUTF8()));
+                                                       }
+-                                                      CONDITION cond;
++                                                      OFCondition cond;
+ 
+                                                       std::string 
aet(m_pAET->GetValue().ToUTF8());
+                                                       std::string 
host(m_pHost->GetValue().ToUTF8());
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/api/dicom/icustomassociation.h
+===================================================================
+--- ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/api/dicom/icustomassociation.h
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/api/dicom/icustomassociation.h
+@@ -14,6 +14,7 @@
+ 
+ #include <ostream>
+ #include <string>
++#include <api/autoptr.h>
+ #include <api/dicom/idicom.h>
+ #include <api/dicom/idicomconformance.h>
+ 
+@@ -52,4 +53,4 @@ namespace GIL {
+                       GIL::DICOM::SOPClassList SOPClasses;
+               };
+       }
+-}
+\ No newline at end of file
++}
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomimg2dcm.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomimg2dcm.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomimg2dcm.cpp
+@@ -23,14 +23,18 @@
+ #include <main/controllers/pacscontroller.h>
+ #include <main/controllers/dicommanager.h>
+ 
+-#include <wx/image.h>
+ 
+ #ifdef verify
+ #define MACRO_QUE_ESTORBA verify
+ #undef verify
+ #endif
+ 
+-#include <dcmtk/config/osconfig.h>
++// For sime reason dcmtk-3.6.1-20150924 has an hiccup in
++// dcmth/oflog/  logger.h and logmacro.h 
++// since they are not used we define the include guards here
++#define DCMTK_LOG4CPLUS_TRACELOGGER_H
++#define DCMTK_LOG4CPLUS_LOGGING_MACROS_HEADER_
++
+ #include "libi2d/document2dcm.h"
+ #include "libi2d/i2djpgs.h"
+ #include "libi2d/pdf2dsource.h"
+@@ -47,6 +51,7 @@
+ #include <dcmtk/dcmdata/dcfilefo.h>
+ 
+ 
++#include <wx/image.h>
+ //en este grupo se almacenaran los atributos privados de ginkgo
+ #define GINKGO_GROUP 0x0011
+ 
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomstoreassociation.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/dicomstoreassociation.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/dicomstoreassociation.cpp
+@@ -13,16 +13,19 @@
+  *
+  */
+ #define LOGGER "C-STORE"
+-#include <api/controllers/icontroladorlog.h>
+-#include <main/controllers/controladorlog.h>
+-#include <main/controllers/dcmtk/ginkgouid.h>
+-#include "helpers.h"
+ 
+ #ifdef verify
+ #define MACRO_QUE_ESTORBA verify
+ #undef verify
+ #endif
+ 
++// For sime reason dcmtk-3.6.1-20150924 has an hiccup in
++// dcmth/oflog/  logger.h and logmacro.h 
++// since they are not used we define the include guards here
++#define DCMTK_LOG4CPLUS_TRACELOGGER_H
++#define DCMTK_LOG4CPLUS_LOGGING_MACROS_HEADER_
++
++
+ #include "dicomstoreassociation.h"
+ #include <api/dicom/imodelodicom.h>
+ 
+@@ -70,6 +73,11 @@
+ #define verify MACRO_QUE_ESTORBA
+ #endif
+ 
++#include <api/controllers/icontroladorlog.h>
++#include <main/controllers/controladorlog.h>
++#include <main/controllers/dcmtk/ginkgouid.h>
++#include "helpers.h"
++
+ #include <wx/filename.h>
+ #include <sstream>
+ 
+@@ -525,9 +533,9 @@ namespace GIL {
+                               DJ_RPLossy lossyParams(opt_Quality);
+                               DcmRLERepresentationParameter rleParams;
+                               DJ_RPLossless losslessParams; // codec 
parameters, we use the defaults
+-                              if (opt_networkTransferSyntax == 
EXS_JPEGProcess14SV1TransferSyntax)
++                              if (opt_networkTransferSyntax == 
EXS_JPEGProcess14SV1)
+                                       params = &losslessParams;
+-                              else if (opt_networkTransferSyntax == 
EXS_JPEGProcess2_4TransferSyntax)
++                              else if (opt_networkTransferSyntax == 
EXS_JPEGProcess2_4)
+                                       params = &lossyParams;
+                               else if (opt_networkTransferSyntax == 
EXS_RLELossless)
+                                       params = &rleParams;
+@@ -959,18 +967,18 @@ namespace GIL {
+                                       opt_Quality = 3;
+                                       break;
+                               case SendJPEGLossless:
+-                                      opt_networkTransferSyntax = 
EXS_JPEGProcess14SV1TransferSyntax;
++                                      opt_networkTransferSyntax = 
EXS_JPEGProcess14SV1;
+                                       break;
+                               case SendJPEGLossy9:
+-                                      opt_networkTransferSyntax = 
EXS_JPEGProcess2_4TransferSyntax;
++                                      opt_networkTransferSyntax = 
EXS_JPEGProcess2_4;
+                                       opt_Quality = 90;
+                                       break;
+                               case SendJPEGLossy8:
+-                                      opt_networkTransferSyntax = 
EXS_JPEGProcess2_4TransferSyntax;
++                                      opt_networkTransferSyntax = 
EXS_JPEGProcess2_4;
+                                       opt_Quality = 80;
+                                       break;
+                               case SendJPEGLossy7:
+-                                      opt_networkTransferSyntax = 
EXS_JPEGProcess2_4TransferSyntax;
++                                      opt_networkTransferSyntax = 
EXS_JPEGProcess2_4;
+                                       opt_Quality = 70;
+                                       break;
+                               case SendImplicitLittleEndian:
+@@ -989,9 +997,9 @@ namespace GIL {
+                                       opt_networkTransferSyntax = 
transferSyntaxFichero;
+                                       //FIXME esta ñapa es necesaria porque 
el pacs de IRE no acepta baseline
+                                       if 
(GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","force_lossless"))
 {
+-                                              if (opt_networkTransferSyntax 
== EXS_JPEGProcess1TransferSyntax)
++                                              if (opt_networkTransferSyntax 
== EXS_JPEGProcess1)
+                                               {
+-                                                      
opt_networkTransferSyntax = EXS_JPEGProcess14SV1TransferSyntax;
++                                                      
opt_networkTransferSyntax = EXS_JPEGProcess14SV1;
+                                               }
+                                       }
+                                       //
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.h
+@@ -2,7 +2,6 @@
+ #pragma once
+ 
+ 
+-#include <dcmtk/config/osconfig.h>
+ #include <dcmtk/dcmdata/dctk.h>
+ class D2DCommon
+ {
+@@ -86,4 +85,4 @@ protected:
+       OFBool m_inventMissingType1Attribs;
+ 
+ };
+-      
+\ No newline at end of file
++      
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.cpp
+@@ -170,7 +170,7 @@ OFCondition I2DImgSource::readAndInsertS
+                               case 0:
+                                       {
+                                               //baseline
+-                                              opt_oxfer = 
EXS_JPEGProcess1TransferSyntax;
++                                              opt_oxfer = EXS_JPEGProcess1;
+                                               DJ_RPLossy rp_lossy((int)90);
+                                               const 
DcmRepresentationParameter *rp = &rp_lossy;
+                                               
dset->chooseRepresentation(opt_oxfer, rp);
+@@ -179,7 +179,7 @@ OFCondition I2DImgSource::readAndInsertS
+                               case 1:
+                                       {
+                                               //progresivo
+-                                              opt_oxfer = 
EXS_JPEGProcess10_12TransferSyntax;
++                                              opt_oxfer = 
EXS_JPEGProcess10_12;
+                                               DJ_RPLossy rp_lossy((int)90);
+                                               const 
DcmRepresentationParameter *rp = &rp_lossy;
+                                               
dset->chooseRepresentation(opt_oxfer, rp);
+@@ -194,7 +194,7 @@ OFCondition I2DImgSource::readAndInsertS
+                                                       opt_point_transform = 
std::min<int>(estado.ObtenerValor<int>(), 14);
+                                                       opt_point_transform = 
std::max<int>(estado.ObtenerValor<int>(), 0);
+                                               }
+-                                              opt_oxfer = 
EXS_JPEGProcess14SV1TransferSyntax;
++                                              opt_oxfer = 
EXS_JPEGProcess14SV1;
+                                               DJ_RPLossless 
rp_lossless((int)opt_selection_value, (int)opt_point_transform);
+                                               const 
DcmRepresentationParameter *rp = &rp_lossless;
+                                               
dset->chooseRepresentation(opt_oxfer, rp);
+@@ -303,4 +303,4 @@ OFString I2DImgSource::isValid(DcmDatase
+       err += checkAndInventType1Attrib(DCM_SOPInstanceUID, &dset);
+ 
+       return err;
+-}
+\ No newline at end of file
++}
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.cpp
+@@ -42,9 +42,9 @@
+ #undef verify
+ #endif
+ 
+-#include <dcmtk/config/osconfig.h>
+ #include "i2djpgs.h"
+ 
++
+ #ifdef MACRO_QUE_ESTORBA
+ #define verify MACRO_QUE_ESTORBA
+ #endif
+@@ -871,11 +871,11 @@ E_TransferSyntax I2DJpegSource::associat
+   switch (jpegEncoding)
+   {
+     case E_JPGMARKER_SOF0: // Baseline
+-      return EXS_JPEGProcess1TransferSyntax;
++      return EXS_JPEGProcess1;
+     case E_JPGMARKER_SOF1: // Extended Sequential
+-      return EXS_JPEGProcess2_4TransferSyntax;
++      return EXS_JPEGProcess2_4;
+     case E_JPGMARKER_SOF2: // Progressive
+-      return EXS_JPEGProcess10_12TransferSyntax;
++      return EXS_JPEGProcess10_12;
+     default:
+       return EXS_Unknown;
+   }
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.h
+@@ -39,9 +39,8 @@
+ #ifndef I2DJPGS_H
+ #define I2DJPGS_H
+ 
+-#include <dcmtk/config/osconfig.h>
+-#include "../ofstd/offile.h"
+ #include <dcmtk/dcmdata/dctk.h>
++#include "../ofstd/offile.h"
+ #include "i2dimgs.h"
+ 
+ /**
+@@ -345,7 +344,7 @@ protected:
+   OFList<JPEGFileMapEntry*> m_jpegFileMap;
+ 
+   /// The JPEG file, if opened
+-  OFFile jpegFile;
++  GinkgoOFFile jpegFile;
+ 
+   /// If true, JPEGs with progressive coding are not supported
+   OFBool m_disableProgrTs;
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/i2dles.h
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/libi2d/i2dles.h
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/i2dles.h
+@@ -13,9 +13,8 @@
+ #undef verify
+ #endif
+ 
+-#include <api/dicom/idicomizador.h>
+-#include <dcmtk/config/osconfig.h>
+ #include <dcmtk/dcmdata/dctk.h>
++#include <api/dicom/idicomizador.h>
+ #include "i2dimgs.h"
+ 
+ #ifdef MACRO_QUE_ESTORBA
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.cpp
+@@ -37,15 +37,12 @@
+  *
+  */
+ 
+-#include <wx/string.h>
+-#include <wx/filefn.h>
+ 
+ #ifdef verify
+ #define MACRO_QUE_ESTORBA verify
+ #undef verify
+ #endif
+ 
+-#include <dcmtk/config/osconfig.h>
+ #include "document2dcm.h"
+ #include <dcmtk/dcmdata/dcpxitem.h>
+ 
+@@ -60,6 +57,15 @@
+ #include <main/controllers/controladorlog.h>
+ #include <main/entorno.h>
+ 
++#ifdef MACRO_QUE_ESTORBA
++#define verify MACRO_QUE_ESTORBA
++#undef MACRO_QUE_ESTORBA
++#endif
++
++
++#include <wx/string.h>
++#include <wx/filefn.h>
++
+ 
+ OFString PDF2DSource::inputFormat() const
+ {
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/tls/win-only/tlslayer.cc
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/tls/win-only/tlslayer.cc
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/tls/win-only/tlslayer.cc
+@@ -179,7 +179,7 @@ const char *DcmTLSTransportLayer::findOp
+   return NULL;
+ }
+ 
+-DcmTLSTransportLayer::DcmTLSTransportLayer(int networkRole, const char 
*randFile)
++DcmTLSTransportLayer::DcmTLSTransportLayer(int networkRole, const char 
*randFile, OFBool /*initializeOpenSSL*/)
+ : DcmTransportLayer(networkRole)
+ , transportLayerContext(NULL)
+ , canWriteRandseed(OFFalse)
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/tls/win-only/tlsscu.cc
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dcmtk/tls/win-only/tlsscu.cc
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dcmtk/tls/win-only/tlsscu.cc
+@@ -60,7 +60,7 @@ DcmTLSSCU::DcmTLSSCU() :
+ 
+ DcmTLSSCU::DcmTLSSCU(const OFString& peerHost,
+                      const OFString& peerAETitle,
+-                     const Uint16& portNum) :
++                     Uint16 portNum) :
+   m_tLayer(NULL),
+   m_doAuthenticate(OFFalse),
+   m_trustedCertDirs(),
+@@ -222,8 +222,8 @@ void DcmTLSSCU::closeAssociation(const D
+ void DcmTLSSCU::enableAuthentication(const OFString& privateKey,
+                                      const OFString& certFile,
+                                      const char* passphrase,
+-                                     const int& privKeyFormat,
+-                                     const int& certFormat)
++                                     const int privKeyFormat,
++                                     const int certFormat)
+ {
+   m_doAuthenticate = OFTrue;
+   m_privateKeyFile = privateKey;
+@@ -290,7 +290,7 @@ void DcmTLSSCU::setWriteSeedFile(const O
+ }
+ 
+ 
+-void DcmTLSSCU::setPeerCertVerification(const DcmCertificateVerification& 
cert)
++void DcmTLSSCU::setPeerCertVerification(const DcmCertificateVerification cert)
+ {
+   m_certVerification = cert;
+ }
+Index: ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dicommanager.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/dicommanager.cpp
++++ ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/dicommanager.cpp
+@@ -13,6 +13,21 @@
+  */
+ //#define _GINKGO_TRACE
+ //para la comprobacion de si esta correcto el fichero
++#ifdef verify
++#define MACRO_QUE_ESTORBA verify
++#undef verify
++#endif
++#include <dcmtk/config/osconfig.h>
++#include <dcmtk/dcmdata/dctk.h>
++#include "dcmtk/dcmimgle/dcmimage.h"
++#include <dcmtk/dcmdata/dcrledrg.h>
++#include <dcmtk/dcmjpeg/djdecode.h>  /* for dcmjpeg decoders */
++#include <dcmtk/dcmdata/dcpxitem.h>
++#ifdef MACRO_QUE_ESTORBA
++#define verify MACRO_QUE_ESTORBA
++#endif
++
++
+ #include <sstream>
+ #include <queue>
+ #include <stack>
+@@ -30,19 +45,6 @@
+ #include <api/controllers/icontroladorlog.h>
+ #include <main/controllers/dcmtk/ginkgouid.h>
+ 
+-#ifdef verify
+-#define MACRO_QUE_ESTORBA verify
+-#undef verify
+-#endif
+-#include <dcmtk/config/osconfig.h>
+-#include <dcmtk/dcmdata/dctk.h>
+-#include "dcmtk/dcmimgle/dcmimage.h"
+-#include <dcmtk/dcmdata/dcrledrg.h>
+-#include <dcmtk/dcmjpeg/djdecode.h>  /* for dcmjpeg decoders */
+-#include <dcmtk/dcmdata/dcpxitem.h>
+-#ifdef MACRO_QUE_ESTORBA
+-#define verify MACRO_QUE_ESTORBA
+-#endif
+ 
+ 
+ 
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/log4cplus/guiappender.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/main/controllers/log4cplus/guiappender.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/main/controllers/log4cplus/guiappender.cpp
+@@ -13,17 +13,13 @@
+  */
+ #include <dcmtk/oflog/oflog.h>
+ #include <dcmtk/oflog/helpers/loglog.h>
++#include <dcmtk/oflog/helpers/property.h>
+ #include <dcmtk/oflog/helpers/timehelp.h>
+ //#include <dcmtk/oflog/stringhelper.h>
+-//#include <dcmtk/oflog/spi/loggingevent.h>
+-/*
+-#include <log4cplus/layout.h>
+-#include <log4cplus/consoleappender.h>
+-#include <log4cplus/streams.h>
+-#include <log4cplus/helpers/loglog.h>
+-#include <log4cplus/helpers/stringhelper.h>
+-#include <log4cplus/spi/loggingevent.h>
+-*/
++#include <dcmtk/oflog/spi/logevent.h>
++
++
++
+ 
+ 
+ #include "guiappender.h"
+@@ -31,7 +27,8 @@
+ 
+ #define MAX_LOG_BUFFER_SIZE 30
+ 
+-using namespace log4cplus::helpers;
++using namespace dcmtk::log4cplus::helpers;
++using namespace dcmtk; 
+ 
+ gnkLog4cplus::GUIAppender* gnkLog4cplus::GUIAppender::m_pInstancia = NULL;
+ 
+@@ -85,18 +82,14 @@ gnkLog4cplus::GUIAppender::~GUIAppender(
+ 
+ void gnkLog4cplus::GUIAppender::close()
+ {
+-      LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( getLogLog().mutex )
+-    closed = true;
++        closed = true;
+       m_pLogger = NULL;
+       m_Logs.clear();
+-      LOG4CPLUS_END_SYNCHRONIZE_ON_MUTEX;
+ }
+ 
+ void gnkLog4cplus::GUIAppender::clear()
+ {
+-      LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( getLogLog().mutex )
+-    m_Logs.clear();
+-      LOG4CPLUS_END_SYNCHRONIZE_ON_MUTEX;
++        m_Logs.clear();
+ }
+ 
+ void gnkLog4cplus::GUIAppender::Attach(GNC::GCS::Logging::ILogger* pLogger)
+@@ -104,14 +97,14 @@ void gnkLog4cplus::GUIAppender::Attach(G
+       if (this->closed) {
+               return;
+       }
+-      LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( getLogLog().mutex )
++        //    DCMTK_LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( getLogLog().mutex )
+       m_pLogger = pLogger;
+       if (pLogger != NULL) {
+               for (ListaLogs::const_iterator it = m_Logs.begin(); it != 
m_Logs.end(); ++it) {
+                       pLogger->Append(*it);
+               }
+       }
+-      LOG4CPLUS_END_SYNCHRONIZE_ON_MUTEX;
++        //    DCMTK_LOG4CPLUS_END_SYNCHRONIZE_ON_MUTEX;
+ }
+ 
+ void gnkLog4cplus::GUIAppender::append(const 
log4cplus::spi::InternalLoggingEvent& e)
+@@ -120,7 +113,7 @@ void gnkLog4cplus::GUIAppender::append(c
+               return;
+       }
+       
+-      LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( getLogLog().mutex )
++      //DCMTK_LOG4CPLUS_BEGIN_SYNCHRONIZE_ON_MUTEX( getLogLog().mutex )
+       log4cplus::tostringstream formattedLog;
+       layout->formatAndAppend(formattedLog, e);
+       
+@@ -145,5 +138,5 @@ void gnkLog4cplus::GUIAppender::append(c
+               m_Logs.pop_front();
+       }
+       
+-    LOG4CPLUS_END_SYNCHRONIZE_ON_MUTEX;
++        //    DCMTK_LOG4CPLUS_END_SYNCHRONIZE_ON_MUTEX;
+ }
+Index: 
ginkgocadx-3.7.1.1573.41/src/cadxcore/commands/incomingdicomassociationcommand.cpp
+===================================================================
+--- 
ginkgocadx-3.7.1.1573.41.orig/src/cadxcore/commands/incomingdicomassociationcommand.cpp
++++ 
ginkgocadx-3.7.1.1573.41/src/cadxcore/commands/incomingdicomassociationcommand.cpp
+@@ -10,6 +10,13 @@
+ *  See License.txt for details
+ *
+ */
++
++// For sime reason dcmtk-3.6.1-20150924 has an hiccup in
++// dcmth/oflog/  logger.h and logmacro.h 
++// since they are not used we define the include guards here
++#define DCMTK_LOG4CPLUS_TRACELOGGER_H
++#define DCMTK_LOG4CPLUS_LOGGING_MACROS_HEADER_
++
+ #include <wx/string.h>
+ 
+ #include <api/imodelointegracion.h>
+@@ -193,7 +200,7 @@ GADAPI::PACS::IncomingDicomAssociationCo
+ 
GADAPI::PACS::IncomingDicomAssociationCommandParams::~IncomingDicomAssociationCommandParams()
+ {
+       if (m_pAssoc != NULL) {
+-              CONDITION cond = ASC_dropSCPAssociation(m_pAssoc);
++              OFCondition cond = ASC_dropSCPAssociation(m_pAssoc);
+               OFString temp_str;
+ 
+               if (cond.bad())
+@@ -223,7 +230,7 @@ GADAPI::PACS::IncomingDicomAssociationCo
+ }
+ 
+ void GADAPI::PACS::IncomingDicomAssociationCommand::Execute() {
+-      CONDITION cond = EC_Normal;
++      OFCondition cond = EC_Normal;
+       OFString temp_str;
+ 
+       T_ASC_Association* assoc = m_pIncommingassociationParams->m_pAssoc;

Modified: trunk/packages/ginkgocadx/trunk/debian/patches/series
===================================================================
--- trunk/packages/ginkgocadx/trunk/debian/patches/series       2016-01-28 
10:02:37 UTC (rev 21319)
+++ trunk/packages/ginkgocadx/trunk/debian/patches/series       2016-01-28 
18:44:18 UTC (rev 21320)
@@ -1,2 +1,4 @@
 libitk4.patch
 unbundle-libjsoncpp.patch
+01_vtk6.patch
+03-dcmtk_361.patch


_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to