MCPcopy Create free account
hub / github.com/Kitware/VTK / ScalarTypeCallback

Method ScalarTypeCallback

IO/Image/vtkImageExport.cxx:412–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412const char* vtkImageExport::ScalarTypeCallback()
413{
414 if (!this->GetInput())
415 {
416 return "unsigned char";
417 }
418
419 int scalarType;
420 if (this->GetInputAlgorithm())
421 {
422 scalarType = this->GetDataScalarType();
423 }
424 else
425 {
426 scalarType = this->GetInput()->GetScalarType();
427 }
428
429 switch (scalarType)
430 {
431 case VTK_DOUBLE:
432 {
433 return "double";
434 }
435 case VTK_FLOAT:
436 {
437 return "float";
438 }
439 case VTK_LONG:
440 {
441 return "long";
442 }
443 case VTK_UNSIGNED_LONG:
444 {
445 return "unsigned long";
446 }
447 case VTK_INT:
448 {
449 return "int";
450 }
451 case VTK_UNSIGNED_INT:
452 {
453 return "unsigned int";
454 }
455 case VTK_SHORT:
456 {
457 return "short";
458 }
459 case VTK_UNSIGNED_SHORT:
460 {
461 return "unsigned short";
462 }
463 case VTK_CHAR:
464 {
465 return "char";
466 }
467 case VTK_UNSIGNED_CHAR:
468 {
469 return "unsigned char";

Callers 1

Calls 4

GetInputMethod · 0.95
GetInputAlgorithmMethod · 0.95
GetDataScalarTypeMethod · 0.95
GetScalarTypeMethod · 0.45

Tested by

no test coverage detected