#define GETVALUE_VTK_CREA(VALUE,POINTER,SCALARTYPE) \
- if (SCALARTYPE==VTK_DOUBLE) { VALUE=(double)*((double*)POINTER); } \
- else if (SCALARTYPE==VTK_FLOAT) { VALUE=(double)*((float*)POINTER); } \
- else if (SCALARTYPE==VTK_CHAR) { VALUE=(double)*((char*)POINTER); } \
- else if (SCALARTYPE==VTK_UNSIGNED_CHAR) { VALUE=(double)*((unsigned char*)POINTER); } \
- else if (SCALARTYPE==VTK_INT) { VALUE=(double)*((int*)POINTER); } \
- else if (SCALARTYPE==VTK_UNSIGNED_INT) { VALUE=(double)*((unsigned int*)POINTER); } \
- else if (SCALARTYPE==VTK_LONG) { VALUE=(double)*((long*)POINTER); } \
- else if (SCALARTYPE==VTK_UNSIGNED_LONG) { VALUE=(double)*((unsigned long*)POINTER); } \
- else if (SCALARTYPE==VTK_SHORT) { VALUE=(double)*((short*)POINTER); } \
- else if (SCALARTYPE==VTK_UNSIGNED_SHORT){ VALUE=(double)*((unsigned short*)POINTER);} \
- else { printf("EED GETVALUE_MANUALPAINT error\n"); }
+ if (SCALARTYPE==VTK_DOUBLE) { VALUE=(double)*((double*)POINTER); } \
+ else if (SCALARTYPE==VTK_FLOAT) { VALUE=(double)*((float*)POINTER); } \
+ else if (SCALARTYPE==VTK_CHAR) { VALUE=(double)*((char*)POINTER); } \
+ else if (SCALARTYPE==VTK_SIGNED_CHAR) { VALUE=(double)*((char*)POINTER); } \
+ else if (SCALARTYPE==VTK_UNSIGNED_CHAR) { VALUE=(double)*((unsigned char*)POINTER); } \
+ else if (SCALARTYPE==VTK_INT) { VALUE=(double)*((int*)POINTER); } \
+ else if (SCALARTYPE==VTK_UNSIGNED_INT) { VALUE=(double)*((unsigned int*)POINTER); } \
+ else if (SCALARTYPE==VTK_LONG) { VALUE=(double)*((long*)POINTER); } \
+ else if (SCALARTYPE==VTK_UNSIGNED_LONG) { VALUE=(double)*((unsigned long*)POINTER); } \
+ else if (SCALARTYPE==VTK_SHORT) { VALUE=(double)*((short*)POINTER); } \
+ else if (SCALARTYPE==VTK_UNSIGNED_SHORT){ VALUE=(double)*((unsigned short*)POINTER); } \
+ else { printf("EED Error! creaVtk_MACROS.h GETVALUE_VTK_CREA SCALARTYPE=%d \n",SCALARTYPE); }
#define GETVALUE2_VTK_CREA(VALUE,POINTER,SCALARTYPE,INDEX) \
- if (SCALARTYPE==VTK_DOUBLE) { VALUE=(double)((double*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_FLOAT) { VALUE=(double)((float*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_CHAR) { VALUE=(double)((char*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_UNSIGNED_CHAR) { VALUE=(double)((unsigned char*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_INT) { VALUE=(double)((int*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_UNSIGNED_INT) { VALUE=(double)((unsigned int*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_LONG) { VALUE=(double)((long*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_UNSIGNED_LONG) { VALUE=(double)((unsigned long*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_SHORT) { VALUE=(double)((short*)POINTER)[INDEX]; } \
- else if (SCALARTYPE==VTK_UNSIGNED_SHORT){ VALUE=(double)((unsigned short*)POINTER)[INDEX]; } \
- else { printf("EED GETVALUE2_MANUALPAINT error\n"); }
+ if (SCALARTYPE==VTK_DOUBLE) { VALUE=(double)((double*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_FLOAT) { VALUE=(double)((float*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_CHAR) { VALUE=(double)((char*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_SIGNED_CHAR) { VALUE=(double)((char*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_UNSIGNED_CHAR) { VALUE=(double)((unsigned char*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_INT) { VALUE=(double)((int*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_UNSIGNED_INT) { VALUE=(double)((unsigned int*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_LONG) { VALUE=(double)((long*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_UNSIGNED_LONG) { VALUE=(double)((unsigned long*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_SHORT) { VALUE=(double)((short*)POINTER)[INDEX]; } \
+ else if (SCALARTYPE==VTK_UNSIGNED_SHORT){ VALUE=(double)((unsigned short*)POINTER)[INDEX]; } \
+ else { printf("EED Error! creaVtk_MACROS.h GETVALUE2_VTK_CREA SCALARTYPE=%d \n",SCALARTYPE);}
#define SETVALUE2_VTK_CREA(VALUE,POINTER,SCALARTYPE,INDEX) \
if (SCALARTYPE==VTK_DOUBLE) { ((double*)POINTER)[INDEX] = (double)VALUE; } \
else if (SCALARTYPE==VTK_FLOAT) { ((float*)POINTER)[INDEX] = (float)VALUE; } \
else if (SCALARTYPE==VTK_CHAR) { ((char*)POINTER)[INDEX] = (char)VALUE; } \
+ else if (SCALARTYPE==VTK_SIGNED_CHAR) { ((char*)POINTER)[INDEX] = (char)VALUE; } \
else if (SCALARTYPE==VTK_UNSIGNED_CHAR) { ((unsigned char*)POINTER)[INDEX] = (unsigned char)VALUE; } \
else if (SCALARTYPE==VTK_INT) { ((int*)POINTER)[INDEX] = (int)VALUE; } \
else if (SCALARTYPE==VTK_UNSIGNED_INT) { ((unsigned int*)POINTER)[INDEX] = (unsigned int)VALUE; } \
else if (SCALARTYPE==VTK_UNSIGNED_LONG) { ((unsigned long*)POINTER)[INDEX] = (unsigned long)VALUE; } \
else if (SCALARTYPE==VTK_SHORT) { ((short*)POINTER)[INDEX] = (short)VALUE; } \
else if (SCALARTYPE==VTK_UNSIGNED_SHORT){ ((unsigned short*)POINTER)[INDEX] = (unsigned short)VALUE;} \
- else { printf("EED SETVALUE2_MANUALPAINT error\n"); }
+ else { printf("EED Error! creaVtk_MACROS.h SETVALUE2_VTK_CREA SCALARTYPE=%d \n",SCALARTYPE); }
}