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

Function NetCDFTypeToVTKType

IO/NetCDF/vtkNetCDFReader.cxx:74–106  ·  view source on GitHub ↗

=============================================================================

Source from the content-addressed store, hash-verified

72
73//=============================================================================
74static int NetCDFTypeToVTKType(nc_type type)
75{
76 switch (type)
77 {
78 case NC_BYTE:
79 return VTK_SIGNED_CHAR;
80 case NC_CHAR:
81 return VTK_CHAR;
82 case NC_SHORT:
83 return VTK_SHORT;
84 case NC_INT:
85 return VTK_INT;
86 case NC_INT64:
87 return VTK_LONG_LONG;
88 case NC_FLOAT:
89 return VTK_FLOAT;
90 case NC_DOUBLE:
91 return VTK_DOUBLE;
92 case NC_UBYTE:
93 return VTK_UNSIGNED_CHAR;
94 case NC_USHORT:
95 return VTK_UNSIGNED_SHORT;
96 case NC_UINT:
97 return VTK_UNSIGNED_INT;
98 case NC_UINT64:
99 return VTK_UNSIGNED_LONG_LONG;
100 case NC_STRING:
101 return VTK_STRING;
102 default:
103 vtkGenericWarningMacro(<< "Unknown netCDF variable type " << type);
104 return -1;
105 }
106}
107
108//=============================================================================
109vtkStandardNewMacro(vtkNetCDFReader);

Callers 1

LoadVariableMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected