39 case VTKElementType::VERTEX:
42 case VTKElementType::LINE:
45 case VTKElementType::TRIANGLE:
46 case VTKElementType::QUADRATIC_EDGE:
49 case VTKElementType::PIXEL:
50 case VTKElementType::QUAD:
51 case VTKElementType::TETRA:
54 case VTKElementType::VOXEL:
55 case VTKElementType::HEXAHEDRON:
56 case VTKElementType::QUADRATIC_QUAD:
57 case VTKElementType::QUADRATIC_TETRA:
60 case VTKElementType::WEDGE:
61 case VTKElementType::QUADRATIC_TRIANGLE:
64 case VTKElementType::PYRAMID:
67 case VTKElementType::QUADRATIC_HEXAHEDRON:
86 std::string typ, name, code, com, offs ;
87 int components(1), offset ;
106 comp=VTKFieldType::VECTOR ;
107 else if(components==9)
108 comp=VTKFieldType::TENSOR ;
116 if(name !=
"connectivity")
119 if(code==
"appended") {
146 std::stringstream os(
"") ;
151 <<
"Name=\"" << field.
getName() <<
"\" "
152 <<
"NumberOfComponents=\""<< comp <<
"\" "
156 os <<
"offset=\"" << field.
getOffset() <<
"\" " ;
173 std::stringstream os(
"") ;
176 os <<
" <PDataArray "
178 <<
"Name=\"" << field.
getName() <<
"\" "
179 <<
"NumberOfComponents=\""<< comp <<
"\" "
194 case VTKLocation::CELL :
196 case VTKLocation::POINT :
198 case VTKLocation::UNDEFINED :
199 return(
"Undefined") ;
201 return(
"Undefined") ;
213 case VTKFormat::ASCII :
215 case VTKFormat::APPENDED :
217 case VTKFormat::UNDEFINED :
218 return(
"Undefined") ;
220 return(
"Undefined") ;
232 case VTKDataType::Int8 :
234 case VTKDataType::Int16 :
236 case VTKDataType::Int32 :
238 case VTKDataType::Int64 :
240 case VTKDataType::UInt8 :
242 case VTKDataType::UInt16 :
244 case VTKDataType::UInt32 :
246 case VTKDataType::UInt64 :
248 case VTKDataType::Float32 :
250 case VTKDataType::Float64 :
252 case VTKDataType::UNDEFINED :
255 return(
"Undefined") ;
269 loc = VTKLocation::CELL;
272 }
else if ( str ==
"Point" ){
273 loc = VTKLocation::POINT;
277 loc = VTKLocation::UNDEFINED ;
293 cod = VTKFormat::ASCII ;
296 }
else if ( str ==
"appended" ){
297 cod = VTKFormat::APPENDED ;
301 cod = VTKFormat::UNDEFINED ;
316 type = VTKDataType::Int8;
320 else if ( str ==
"Int16" ){
321 type = VTKDataType::Int16;
325 else if ( str ==
"Int32" ){
326 type = VTKDataType::Int32;
330 else if ( str ==
"Int64" ){
331 type = VTKDataType::Int64;
335 else if ( str ==
"UInt8" ){
336 type = VTKDataType::UInt8;
340 else if ( str ==
"UInt16" ){
341 type = VTKDataType::UInt16;
345 else if ( str ==
"UInt32" ){
346 type = VTKDataType::UInt32;
350 else if ( str ==
"UInt64" ){
351 type = VTKDataType::UInt64;
355 else if ( str ==
"Float32" ){
356 type = VTKDataType::Float32;
360 else if ( str ==
"Float64" ){
361 type = VTKDataType::Float64;
366 type = VTKDataType::UNDEFINED;
VTKField handles geometry and data field information for the VTK format.
const std::string & getName() const
VTKFormat getCodification() const
uint64_t getOffset() const
void setDataType(VTKDataType)
void setCodification(VTKFormat)
void setFieldType(VTKFieldType)
static unsigned getComponentCount(VTKFieldType fieldType)
VTKDataType getDataType() const
void setName(const std::string &)
bool keywordInString(const std::string &line, const std::string &key)
void convertString(std::string input, T &output)
bool getAfterKeyword(const std::string &line, const std::string &key, char del, std::string &result)
std::string convertDataArrayToString(const VTKField &)
std::string convertEnumToString(VTKLocation)
bool convertStringToEnum(const std::string &, VTKLocation &)
std::string convertPDataArrayToString(const VTKField &)
bool convertStringToDataArray(const std::string &, VTKField &)
uint8_t getElementNodeCount(VTKElementType)