1 #ifndef __creaVtk_h_INCLUDED__
2 #define __creaVtk_h_INCLUDED__
6 #include "creaSystem.h"
7 #include <vtkImageData.h>
13 CREA_EXPORT vtkImageData* NewVtkImageDataFromRaw( T* data,
17 bool do_not_desalloc = true);
19 // Already provided by vtkTypeTraits<T>::VTKTypeID()
21 int GetVtkType(T&) { return VTK_VOID; }
23 #define SPECIALIZE_GETVTKIDTYPE(T,R) \
24 template <> int GetVtkType<T>(T&) { return R; }
26 SPECIALIZE_GETVTKIDTYPE(char,VTK_CHAR)
27 SPECIALIZE_GETVTKIDTYPE(signed char,VTK_SIGNED_CHAR)
28 SPECIALIZE_GETVTKIDTYPE(unsigned char,VTK_UNSIGNED_CHAR)
29 SPECIALIZE_GETVTKIDTYPE(short,VTK_SHORT)
30 SPECIALIZE_GETVTKIDTYPE(unsigned short,VTK_UNSIGNED_SHORT)
31 SPECIALIZE_GETVTKIDTYPE(int,VTK_INT)
32 SPECIALIZE_GETVTKIDTYPE(unsigned int,VTK_UNSIGNED_INT)
33 SPECIALIZE_GETVTKIDTYPE(long,VTK_LONG)
34 SPECIALIZE_GETVTKIDTYPE(unsigned long,VTK_UNSIGNED_LONG)
35 SPECIALIZE_GETVTKIDTYPE(float,VTK_FLOAT)
36 SPECIALIZE_GETVTKIDTYPE(double,VTK_DOUBLE)
38 #undef SPECIALIZE_GETVTKIDTYPE
42 #include "creaVtk.txx"
46 #endif // __creaVtk_h_INCLUDED__