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:
"${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(
--- /dev/null
+{
+ <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
+}
// * 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
}
}
}
- vtkImageViewer2 *ImageViewer;
+ vtkImageViewer *ImageViewer;
};
if( argc < 2 )
return 0;
+ gdcm::Debug::SetDebugOff();
vtkGdcmReader *reader = vtkGdcmReader::New();
reader->AllowLookupTableOff();
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
- vtkImageViewer2 *viewer = vtkImageViewer2::New();
+ vtkImageViewer *viewer = vtkImageViewer::New();
if( reader->GetLookupTable() )
{
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();