]> Creatis software - gdcm.git/commitdiff
ENH: Adding a new supp file for valgrind
authormalaterre <malaterre>
Thu, 13 Jan 2005 19:13:42 +0000 (19:13 +0000)
committermalaterre <malaterre>
Thu, 13 Jan 2005 19:13:42 +0000 (19:13 +0000)
CMakeLists.txt
gdcmValgrind.supp [new file with mode: 0644]
vtk/vtkgdcmViewer.cxx

index 5ff95b1b256b019901b458e1c1ab8a9607bdcb79..85d464745de6e254fa3966f555e7b390e57db200 100644 (file)
@@ -1,5 +1,15 @@
 PROJECT(GDCM)
-CMAKE_MINIMUM_REQUIRED(VERSION 1.8)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
+
+#MESSAGE("MATHIEU: ${CMAKE_VERSION_RELEASE}")
+#MESSAGE("MATHIEU: ${CMAKE_VERSION}")
+#MESSAGE("MATHIEU: ${CMAKE_CACHE_RELEASE_VERSION}")
+#IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.0)
+#  IF(${CMAKE_CACHE_RELEASE_VERSION} EQUAL "patch 5")
+#    MESSAGE("MAHTIEU FOO")
+#  ENDIF(${CMAKE_CACHE_RELEASE_VERSION} EQUAL "patch 5")
+#ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.0)
+
 
 #-----------------------------------------------------------------------------
 # GDCM version number, usefull for packaging and doxygen doc:
@@ -51,6 +61,7 @@ IF("GDCM_COMPILER_HAS_FUNCTION" MATCHES "^GDCM_COMPILER_HAS_FUNCTION$")
       "${OUTPUT}\n" APPEND)
   ENDIF(GDCM_COMPILER_HAS_FUNCTION)
 ENDIF("GDCM_COMPILER_HAS_FUNCTION" MATCHES "^GDCM_COMPILER_HAS_FUNCTION$")
+
 #-----------------------------------------------------------------------------
 # Build directory on which many applications depend
 SUBDIRS(
diff --git a/gdcmValgrind.supp b/gdcmValgrind.supp
new file mode 100644 (file)
index 0000000..f152efe
--- /dev/null
@@ -0,0 +1,129 @@
+{
+   <insert a suppression name here>
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+}
+{
+   <insert a suppression name here>
+   Memcheck:Free
+   fun:free
+   fun:__GI__dl_deallocate_tls
+   fun:vgArch_thread_exit
+   fun:thread_exit_wrapper
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:__cxa_get_globals
+   fun:_ZSt18uncaught_exceptionv
+   fun:_ZNSo6sentryD1Ev
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:XextCreateExtension
+   fun:__glXInitialize
+   fun:glXGetConfig
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:calloc
+   fun:_dlerror_run
+   fun:dlsym
+   fun:__errno_location
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:OpenDriver
+   fun:__glXRegisterExtensions
+   fun:__glXNewIndirectAPI
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:_dl_map_object_internal
+   fun:openaux
+   fun:_dl_catch_error_internal
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:_dl_map_object_deps_internal
+   fun:dl_open_worker
+   fun:_dl_catch_error_internal
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:__glXstrdup
+   fun:OpenDriver
+   fun:__glXRegisterExtensions
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:_dl_map_object_internal
+   fun:dl_open_worker
+   fun:_dl_catch_error_internal
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:_dl_new_object
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object_internal
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:dl_open_worker
+   fun:_dl_catch_error_internal
+   fun:__GI__dl_open
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_check_map_versions_internal
+   fun:dl_open_worker
+   fun:_dl_catch_error_internal
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_new_object
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object_internal
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:__glXNewIndirectAPI
+   fun:glXMakeCurrent
+   fun:_ZN22vtkXOpenGLRenderWindow11MakeCurrentEv
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:__fgl_glapi_add_entrypoint
+   fun:__driRegisterExtensions
+   fun:__glXRegisterExtensions
+}
index d70d49447f1f26a10cf5b0387e509568f72b21b2..c5bb70d7473c92751391e84b485eff55f1d8c744 100644 (file)
 //  * the produced vtk file is named "foo.vtk" (in the invocation directory).
 // 
 //----------------------------------------------------------------------------
-#include <iostream>
-
 #include <vtkRenderWindowInteractor.h>
-#include <vtkImageViewer2.h>
+#include <vtkImageViewer.h>
 #include <vtkStructuredPoints.h>
 #include <vtkStructuredPointsWriter.h>
+#include <vtkPNGWriter.h>
 #include <vtkCommand.h>
 #include <vtkRenderer.h>
 #include <vtkImageMapToColors.h>
 #include <vtkLookupTable.h>
 
 #include "vtkGdcmReader.h"
+#include "gdcmDebug.h"
+
+#include <iostream>
 
 #ifndef vtkFloatingPointType
 #define vtkFloatingPointType float
@@ -60,7 +62,7 @@ public:
          }
       }
    }
-   vtkImageViewer2 *ImageViewer;
+   vtkImageViewer *ImageViewer;
 };
 
 
@@ -69,6 +71,7 @@ int main(int argc, char *argv[])
    if( argc < 2 )
       return 0;
   
+   gdcm::Debug::SetDebugOff();
    vtkGdcmReader *reader = vtkGdcmReader::New();
    reader->AllowLookupTableOff();
 
@@ -85,7 +88,7 @@ int main(int argc, char *argv[])
 
    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
 
-   vtkImageViewer2 *viewer = vtkImageViewer2::New();
+   vtkImageViewer *viewer = vtkImageViewer::New();
 
    if( reader->GetLookupTable() )
    {
@@ -121,12 +124,14 @@ int main(int argc, char *argv[])
    iren->Start();
 
    //if you wish you can export dicom to a vtk file  
-   vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();
+   //vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();
+   vtkPNGWriter *writer = vtkPNGWriter::New();
    writer->SetInput( reader->GetOutput());
-   writer->SetFileName( "foo.vtk" );
-   writer->SetFileTypeToBinary();
+   writer->SetFileName( "foo.png" );
+   //writer->SetFileTypeToBinary();
    writer->Write();
 
+
    reader->Delete();
    iren->Delete();
    viewer->Delete();