#
#-----------------------------------------------------------------------------
+
IF(USE_ITK)
IF(NOT ITK_FOUND)
# Search ITK
INCLUDE(${ITK_USE_FILE})
CREA_DEFINE( USE_ITK )
CREA_DEFINE( _USE_ITK_ )
- If (${ITK_VERSION_MAJOR} MATCHES "4")
- MESSAGE ( STATUS "* Version = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
- SET(ITK_LIBRARIES
- ${ITK_LIBRARIES})
- MESSAGE ( STATUS "${ITK_LIBRARIES}")
+ If (${ITK_VERSION_MAJOR} MATCHES "4" OR ${ITK_VERSION_MAJOR} MATCHES "5" )
+ MESSAGE ( STATUS "* Version = ${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
+ SET(ITK_LIBRARIES ${ITK_LIBRARIES})
+ MESSAGE ( STATUS "${ITK_LIBRARIES}")
ELSEIF()
- SET(ITK_LIBRARIES
- ITKCommon ITKIO ITKBasicFilters ITKAlgorithms)
+ SET(ITK_LIBRARIES ITKCommon ITKIO ITKBasicFilters ITKAlgorithms)
ENDIF()
MARK_AS_ADVANCED(ITK_DIR)
ELSE(ITK_FOUND)
add_definitions( -DBOOST_ALL_NO_LIB )
add_definitions( -DBOOST_ALL_DYN_LINK )
IF (MINGW)
- FIND_PACKAGE(Boost COMPONENTS filesystem-mgw71 system-mgw71 signals-mgw71 date_time-mgw71 thread-mgw71 regex-mgw71 program_options-mgw71 REQUIRED)
+ IF(APPLE)
+ FIND_PACKAGE(Boost COMPONENTS filesystem-mgw71 system-mgw71 signals-mgw71 date_time-mgw71 thread-mgw71 regex-mgw71 program_options-mgw71 REQUIRED)
+ ELSE(APPLE)
+ set( Boost_INCLUDE_DIR $ENV{BOOST_ROOT}/include/boost-1_69)
+ FIND_PACKAGE(Boost COMPONENTS filesystem-mgw73-mt-x64-1_69 system-mgw73-mt-x64-1_69 date_time-mgw73-mt-x64-1_69 thread-mgw73-mt-x64-1_69 regex-mgw73-mt-x64-1_69 program_options-mgw73-mt-x64-1_69 REQUIRED)
+ ENDIF(APPLE)
ELSE (MINGW)
# FIND_PACKAGE(Boost COMPONENTS filesystem system signals date_time thread regex program_options REQUIRED)
- FIND_PACKAGE(Boost COMPONENTS filesystem system date_time thread regex program_options REQUIRED)
+ FIND_PACKAGE(Boost COMPONENTS filesystem system date_time thread regex program_options REQUIRED)
ENDIF(MINGW)
IF(Boost_FOUND)
ADD_DEFINITIONS(-DBOOST_FILESYSTEM_VERSION=3)
ENDIF(NOT XERCES_LIB_DIR)
- IF(USE_DEBUG_LIB)
- set(XERCES_LIBRARIES xerces-c_3D)
- ELSE(USE_DEBUG_LIB)
- set(XERCES_LIBRARIES xerces-c_3)
- ENDIF(USE_DEBUG_LIB)
+ IF(APPLE)
+ IF(USE_DEBUG_LIB)
+ set(XERCES_LIBRARIES xerces-c_3D)
+ ELSE(USE_DEBUG_LIB)
+ set(XERCES_LIBRARIES xerces-c_3)
+ ENDIF(USE_DEBUG_LIB)
+ ELSEIF(APPLE)
+ IF(USE_DEBUG_LIB)
+ #EED 2019-07-03 set(XERCES_LIBRARIES xerces-c_3D)
+ set(XERCES_LIBRARIES xerces-c)
+ ELSE(USE_DEBUG_LIB)
+ #EED 2019-07-03 set(XERCES_LIBRARIES xerces-c_3)
+ set(XERCES_LIBRARIES xerces-c)
+ ENDIF(USE_DEBUG_LIB)
+ ENDIF(APPLE)
MARK_AS_ADVANCED(XERCES_LIB_DIR)
ENDIF(WIN32)
MESSAGE ( STATUS "Looking for VTK... found")
MESSAGE ( STATUS "* Dir = ${VTK_DIR}")
MESSAGE ( STATUS "* Version = ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}")
-
-
SET(VTK_BUILD_SETTINGS_FILE OFF)
INCLUDE(${VTK_USE_FILE})
LINK_DIRECTORIES(${VTK_DIR}) #DFCH -- 16/7/2012
#MESSAGE("${GTK2_INCLUDE_DIRS}")
INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
LINK_LIBRARIES(${GTK2_LIBRARIES})
+message("EED CREAMacro_FindAndUseVTK.cmake GTK2_INCLUDE_DIRS "${GTK2_INCLUDE_DIRS} )
+message("EED CREAMacro_FindAndUseVTK.cmake GTK2_VERSION "${GTK2_VERSION} )
# Can I require all my user to have the gl lib on linux, even if they do not really need it...
SET(WXGLCANVASLIBS "gl")
ENDIF(VTK_USE_GL2PS)
##EED 2017-01-01 Migration VTK7
IF("${VTK_MAJOR_VERSION}" LESS 6)
SET(VTK_LIBRARIES
- vtkCommon # Mandatory
- vtkFiltering # vtkImageData
- vtkRendering # vtkProp3D
- vtkWidgets # vtkImagePlaneWidget
- vtkIO # vtkMetaImageReader/Writer
- vtkImaging # filters such as vtkImageAnisotropicDiffusion3D
- vtkGraphics # vtkContourFilter, sources
- vtkVolumeRendering # Mappers
+ vtkCommon # Mandatory
+ vtkFiltering # vtkImageData
+ vtkRendering # vtkProp3D
+ vtkWidgets # vtkImagePlaneWidget
+ vtkIO # vtkMetaImageReader/Writer
+ vtkImaging # filters such as vtkImageAnisotropicDiffusion3D
+ vtkGraphics # vtkContourFilter, sources
+ vtkVolumeRendering # Mappers
vtkGenericFiltering
vtkHybrid
# vtkInfovis
# vtkViewsQt
# vtkNetCDF_cxx
)
- ENDIF(WIN32)
+ ENDIF(WIN32)
+
+
# ENDIF("${VTK_MAJOR_VERSION}" GREATER 5)
SET (WT_CONNECTOR "wthttp" CACHE STRING "Connector used (wthttp or wtfcgi)")
- SET(WT_LIBRARIES wt wtfcgi wtext)
+
+#EED2019-08-20
+# SET(WT_LIBRARIES wt wtfcgi wtext)
+ SET(WT_LIBRARIES wt wtfcgi )
+
# SET(WT_LIBRARIES wt wthttp wtext)
INCLUDE_DIRECTORIES($ENV{WT_DIR}/../../include)
- LINK_DIRECTORIES($ENV{WT_DIR}/../../lib/wt-3.3.4)
+
+#EED2019-08-20
+# LINK_DIRECTORIES($ENV{WT_DIR}/../../lib/wt-3.3.4)
+ LINK_DIRECTORIES($ENV{WT_DIR}/../../lib/wt-4.0.4-rc1)
+
CREA_DEFINE( USE_WT)
CREA_DEFINE( _USE_WT_ )
# ---------------------------------------------------------------------
#
# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-# pour la Santé©
+# pour la Santé)
# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
# Previous Authors : Laurent Guigues, Jean-Pierre Roux
# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
##2018-08-28
if(APPLE)
message("EED CREAMacro_FindAndUseWxWidgets APPLE. forsing wxWidgets_CONFIG_EXECUTABLE. wxWidgets_wxrc_EXECUTABLE ")
- #set(wxWidgets_CONFIGURATION mswu)
- #set(wxWidgets_USE_LIBS)
- SET(wxWidgets_CONFIG_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wx-config CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE)
+ SET(wxWidgets_CONFIG_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wx-config CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE)
SET(wxWidgets_wxrc_EXECUTABLE /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wxrc-3.0 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE)
- elseif(UNIX)
+ elseif(APPLE)
message("EED CREAMacro_FindAndUseWxWidgets UNIX")
#MESSAGE ( "===============Manual wx-config 2 EED =======================")
#SET(wxWidgets_CONFIG_EXECUTABLE /usr/bin/wx-config-2.0 CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE)
#SET(wxWidgets_wxrc_EXECUTABLE /usr/bin/wxrc-2.8 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE)
- SET(wxWidgets_CONFIG_EXECUTABLE /usr/bin/wx-config-3.0 CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE)
- SET(wxWidgets_wxrc_EXECUTABLE /usr/bin/wxrc-3.0 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE)
+ SET(wxWidgets_CONFIG_EXECUTABLE /usr/bin/wx-config-3.0 CACHE STRING wxWidgets_CONFIG_EXECUTABLE FORCE)
+ SET(wxWidgets_wxrc_EXECUTABLE /usr/bin/wxrc-3.0 CACHE STRING wxWidgets_wxrc_EXECUTABLE FORCE)
# CMake 2.6:
# technically those packages are not required
# since one can still use the Motif/X11 version and not the gtk one:
- FIND_PACKAGE(PkgConfig REQUIRED)
- ## pkg_check_modules (GTK2 gtk+-2.0)
- ## pkg_check_modules (GTK322 gtk+-3.0)
- pkg_check_modules (GTK3 REQUIRED gtk+-3.0)
- endif(APPLE)
+ FIND_PACKAGE(PkgConfig REQUIRED)
+ ## pkg_check_modules (GTK2 gtk+-2.0)
+ ## pkg_check_modules (GTK322 gtk+-3.0)
+ pkg_check_modules (GTK3 REQUIRED gtk+-3.0)
+endif(APPLE)
- # Can I require all my user to have the gl lib on linux, even if they do not really need it...
- SET(WXGLCANVASLIBS "gl")
- SET(WXAUILIBS "aui")
- # LG : These options should be set by the user at top level of crea
- FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS base core adv html
- ${WXAUILIBS}
- ${WXGLCANVASLIBS}
- )
+ # Can I require all my user to have the gl lib on linux, even if they do not really need it...
+ SET(WXGLCANVASLIBS "gl")
+ SET(WXAUILIBS "aui")
+ # LG : These options should be set by the user at top level of crea
+ FIND_PACKAGE(wxWidgets REQUIRED COMPONENTS base core adv html
+ ${WXAUILIBS}
+ ${WXGLCANVASLIBS}
+ )
IF(wxWidgets_FOUND)
MESSAGE ( STATUS "=======================================")
MESSAGE ( STATUS "Looking for wxWidgets... found ${wxWidgets_CONFIG_EXECUTABLE}")
## INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
## LINK_DIRECTORIES(${GTK2_LIBRARY_DIRS})
## LINK_LIBRARIES(${GTK2_LIBRARIES})
- ## SET(WXWIDGETS_LIBRARIES
- ## GTK2
- ## ${GTK2_LIBRARIES}
- ## #${GTK_LIBRARIES}
- ## ${wxWidgets_LIBRARIES}
- ## )
-
# GTK3
INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS})
LINK_DIRECTORIES(${GTK3_LIBRARY_DIRS})
+ LINK_LIBRARIES(${GTK3_LIBRARIES} )
+message("EED GTK3_VERSION "${GTK3_VERSION})
# WX
# INCLUDE( ${GTK_USE_FILE} )
INCLUDE( ${wxWidgets_USE_FILE} )
MARK_AS_ADVANCED(wxWidgets_CONFIG_EXECUTABLE)
SET(WXWIDGETS_LIBRARIES
+ ## GTK2
+ ## ${GTK2_LIBRARIES}
${GTK3_LIBRARIES}
+ #${GTK_LIBRARIES}
${wxWidgets_LIBRARIES}
)
DESTINATION ${CREA_LIB_PATH})
#----------------------------------------------------------------------------
MESSAGE(STATUS "===============================================")
+MESSAGE(STATUS "===============================================")
+
# ---------------------------------------------------------------------
#
# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
-# pour la Santé©
+# pour la Santé)
# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
# Previous Authors : Laurent Guigues, Jean-Pierre Roux
# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
(__GNUC__ == 3 && (__GNUC_MINOR__ > 1 || \
(__GNUC_MINOR__ == 1 && \
__GNUC_PATCHLEVEL__ > 0)))
-
const abi::__class_type_info* targetTI = (const abi::__class_type_info *)( &(target_type));
creaDebugMessage("info",7," * source = "<<source_pointer<<std::endl);
void* tmp = source_pointer;
namespace crea
{
+#define DEF_POINTER_IMAGE_VTK_CREA_difinition(VALUE,SCALARSIZE,POINTERIMAGE,SCALARTYPE) \
+ double VALUE ; \
+ int SCALARSIZE ; \
+ char *POINTERIMAGE ; \
+ int SCALARTYPE ;
+
+#define DEF_POINTER_IMAGE_VTK_CREA_set(VALUE,SCALARSIZE,POINTERIMAGE,SCALARTYPE,VTKIMAGE) \
+ VALUE = 0; \
+ SCALARSIZE = VTKIMAGE->GetScalarSize(); \
+ POINTERIMAGE = (char*)(VTKIMAGE->GetScalarPointer()); \
+ SCALARTYPE = VTKIMAGE->GetScalarType();
+
+
#define DEF_POINTER_IMAGE_VTK_CREA(VALUE,SCALARSIZE,POINTERIMAGE,SCALARTYPE,VTKIMAGE) \
double VALUE = 0; \
int SCALARSIZE = VTKIMAGE->GetScalarSize(); \
=========================================================================*/
-//#import <Cocoa/Cocoa.h>
+
#include <assert.h>
#include "creawxVTKRenderWindowInteractor.h"
-#include <wx/display.h>
-
-
//This is needed for vtk 3.1 :
#ifndef VTK_MAJOR_VERSION
# include "vtkVersion.h"
// AKT: wxOSX 2.9.x defines __WXOSX_COCOA__ rather than __WXCOCOA__
#ifdef __WXOSX_COCOA__
-#define __WXCOCOA__
+ #import <Cocoa/Cocoa.h>
+ #define __WXCOCOA__
#endif
#if defined(__WXMAC__) && wxCHECK_VERSION(2,9,0)
// To access objc calls on cocoa
#ifdef __WXCOCOA__
#ifdef VTK_USE_COCOA
-#import <Cocoa/Cocoa.h>
// This trick is no longer need in VTK CVS, should get rid of that:
#define id Id
#else
#endif //__WXCOCOA__
#if wxMAJOR_VERSION <= 2
-
#ifdef __WXGTK__
#include <gdk/gdkx.h> // GDK_WINDOW_XWINDOW is found here in wxWidgets 2.8.0
#include "gdk/gdkprivate.h"
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent& WXUNUSED(event))
{
-
//must always be here
-//EED2021-08-26 wxPaintDC pDC(this);
+//EED2021-08-26
+#ifdef __WXCOCOA__
+#else
+ wxPaintDC pDC(this);
+#endif
//do it here rather than in the cstor: this is safer.
if(!Handle)
#ifdef __WXCOCOA__
vtkCocoaRenderWindow *rwin = vtkCocoaRenderWindow::SafeDownCast(RenderWindow);
-//2021-08-30
-// rwin->SetWantsBestResolution(true);
-
NSView *nvsview = (NSView* )Handle;
NSWindow *nswindow = nvsview.window;
rwin->SetRootWindow( nswindow );
#endif
}
// get vtk to render to the wxWindows
-
-Render();
+ Render();
#ifdef __WXMAC__
// This solves a problem with repainting after a window resize
// See also: http://sourceforge.net/mailarchive/forum.php?thread_id=31690967&forum_id=41789
}
#endif
#else
-
vtkCarbonRenderWindow* rwin = vtkCarbonRenderWindow::SafeDownCast(RenderWindow);
if( rwin )
{
#endif
#endif
}
-
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
{
#endif
//this will check for Handle
//Render();
-
}
-
//---------------------------------------------------------------------------
void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
{
return;
}
#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
-
SetEventInformationFlipY(event.GetX(), event.GetY(),
event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);