+ if (imagedata->GetScalarType()==VTK_CHAR)
+ {
+ char *pp = (char*)p;
+ result = (double)(*pp);
+ }
+ else if (imagedata->GetScalarType()==VTK_SIGNED_CHAR)
+ {
+ signed char *pp = (signed char*)p;
+ result = (double)(*pp);
+ }
+ else if (imagedata->GetScalarType()==VTK_UNSIGNED_CHAR)
+ {
+ unsigned char *pp = (unsigned char*)p;
+ result = (double)(*pp);
+ }
+ else if (imagedata->GetScalarType()==VTK_SHORT)
+ {
+ short *pp = (short*)p;
+ result = (double)(*pp);
+ }
+ else if (imagedata->GetScalarType()==VTK_UNSIGNED_SHORT)
+ {
+ unsigned short *pp = (unsigned short*)p;
+ result = (double)(*pp);
+ }
+ else if (imagedata->GetScalarType()==VTK_INT)
+ {
+ int *pp = (int*)p;
+ result = (double)(*pp);
+ }
+ else if (imagedata->GetScalarType()==VTK_UNSIGNED_INT)
+ {
+ unsigned int *pp = (unsigned int*)p;