# ---------------------------------------------------------------------
#
# 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
# Search VTK
message("DFCH--VTK: CREAMacro_FindAndUseVTK.cmake: " ${CMAKE_CURRENT_LIST_FILE})
message("DFCH--VTK: CREAMacro_FindAndUseVTK.cmake: " ${_IMPORT_PREFIX})
+
FIND_PACKAGE(VTK)
+
# If vtk found
IF(VTK_FOUND)
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
+ SET(VTK_BUILD_SETTINGS_FILE OFF)
+
+## EED 2022-07-21
+## INCLUDE(${VTK_USE_FILE})
+## LINK_DIRECTORIES(${VTK_DIR}) #DFCH -- 16/7/2012
+INCLUDE_DIRECTORIES(include ${VTK_INCLUDE_DIRS} )
IF(VTK_USE_GL2PS)
add_definitions(-DUSE_WXGLCANVAS)
# vtkRenderingContextOpenGL2
# )
IF (WIN32)
- SET(VTK_LIBRARIES ${VTK_LIBRARIES} )
+# SET(VTK_LIBRARIES ${VTK_LIBRARIES} )
ELSE(WIN32)
- SET(VTK_LIBRARIES ${VTK_LIBRARIES}
+# SET(VTK_LIBRARIES ${VTK_LIBRARIES}
# vtkRenderingQt
# vtkGUISupportQt
# vtkGUISupportQtSQL
# vtkViewsQt
# vtkNetCDF_cxx
- )
- message("EED vtk libraries: "${VTK_LIBRARIES})
+# )
+ message("EED-a vtk libraries: "${VTK_LIBRARIES})
+ message("EED-start vtk include dirs: "${VTK_INCLUDE_DIRS})
+ message("EED-end")
+
ENDIF(WIN32)
*/
-
-#include <vtkDataArrayTemplate.h>
+//EED 2022-07-21
+// https://www.slicer.org/wiki/Documentation/Labs/VTK7
+// #include <vtkDataArrayTemplate.h>
+ #include <vtkAOSDataArrayTemplate.h>
#include <vtkCharArray.h>
#include <vtkSignedCharArray.h>
<<vtkTypeTraits<T>::SizedName()
<<" non implemented");
}
- vtkDataArrayTemplate<T>* tarray
- = dynamic_cast<vtkDataArrayTemplate<T>*>(array);
+
+//EED 2022-07-21
+// https://www.slicer.org/wiki/Documentation/Labs/VTK7
+// vtkDataArrayTemplate<T>* tarray = dynamic_cast<vtkDataArrayTemplate<T>*>(array);
+ vtkAOSDataArrayTemplate<T>* tarray = dynamic_cast<vtkAOSDataArrayTemplate<T>*>(array);
+
array->SetNumberOfComponents( 1 );
size_t size = (long)nx*(long)ny*(long)nz;
// The last param of SetArray is set to 1 to keep the class from deleting the array
#include <wx/dcclient.h>
// vtk includes
+#include <vtkVersionMacros.h>
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderWindow.h"
# include "vtkVersion.h"
#endif
+
#if VTK_MAJOR_VERSION > 4 || (VTK_MAJOR_VERSION == 4 && VTK_MINOR_VERSION > 0)
# include "vtkCommand.h"
#else
// To access objc calls on cocoa
#ifdef __WXCOCOA__
-#ifdef VTK_USE_COCOA
-// This trick is no longer need in VTK CVS, should get rid of that:
+
#define id Id
-#else
-#error Build mismatch you need both wxWidgets and VTK to be configure against Cocoa to work
-#endif //VTK_USE_COCOA
+
+// #ifdef VTK_USE_COCOA
+// // This trick is no longer need in VTK CVS, should get rid of that:
+// #define id Id
+// #else
+// #error Build mismatch you need both wxWidgets and VTK to be configure against Cocoa to work
+// #endif //VTK_USE_COCOA
+
#endif //__WXCOCOA__
#if wxMAJOR_VERSION <= 2
// and our RenderWindow's size
#ifdef __WXCOCOA__
- #ifdef VTK_USE_COCOA
- #else
- #endif //VTK_USE_COCOA
+// #ifdef VTK_USE_COCOA
+// #else
+// #endif //VTK_USE_COCOA
#else
RenderWindow->SetSize(x, y);
#endif //__WXCOCOA__