#include "bbitkvtkPackage.h"
#include "itkImageToVTKImageFilter.h"
+
+/*
+#EED 2017-08-29 itk3toitk4
+ #define BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, ty, di ) \
+ if( t == typeid( itk::Image< ty, di > ) ) \
+ this->Convert< itk::Image< ty, di > >( )
+*/
+
+
// -------------------------------------------------------------------------
// LFV: avoid itk::Concept check on 4d or superior images
-#define BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, ty, di ) \
- if( t == typeid( itk::Image< ty, di > ) ) \
- this->Convert< itk::Image< ty, di > >( )
+//EED 2021-12-15 typeid comparation is not working in MacOs for objects declared in different libraries
+// ex: itk <-> vtk templates convertion
+#if defined(MACOSX)
+ #define BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, ty, di ) \
+ if ( strcmp(t.name() , typeid( itk::Image< ty, di >* ).name() ) == 0 ) \
+ this->Convert< itk::Image< ty, di > >( )
+#else
+ #define BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, ty, di ) \
+ if( t == typeid( itk::Image< ty, di >* ) ) \
+ this->Convert< itk::Image< ty, di > >( )
+#endif
// -------------------------------------------------------------------------
+
namespace bbitkvtk
{
BBTK_BLACK_BOX_IMPLEMENTATION(itkImageVector2vtkImageDataVector,bbtk::AtomicBlackBox);
else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned short, 3 );
else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned int, 3 );
else BBITKVTK_itkImageVector2vtkImageDataVector_Template( t, unsigned long, 3 );
+ else {
+ printf("Warnning! EED itkImageVector2vtkImageDataVector::Convert Type not found for: <%s>\n", bbtk::demangle_type_name(t.name()).c_str() );
+ }
/* Deprecated
BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert);