In context of my final Bachelors work I’m trying to read a Legacy .VTK-File using the vtkm::io::reader::VTKDataSetReader and then run a Countour Filter on it. The DataSet successfully is read, although it throws two warnings:
2020-05-12 16:07:12.392 ( 6.164s) [main thread ] VTKDataSetReaderBase.h:515 WARN| Reader may not correctly read >v4.2 files. Reading version 5.0.
2020-05-12 16:07:12.395 ( 6.167s) [main thread ] VTKDataSetReaderBase.h:602 WARN| Support for COLOR_SCALARS is not implemented. Skipping.
Im not sure how to create 4.2 .VTK Files. The ones I use right now are created using ParaView from a .RAW File where I manually put in dimensions, word length and endian type.
When I further try to run a Contour-Filter on the DataSet I get a Exception thrown by the DataSet and my program crashes.
vtkm::io::reader::VTKDataSetReader reader(path.toStdString()); vtkmDataSet = reader.ReadDataSet(); vtkm::filter::Contour contour; contour.SetActiveField("pointvar"); vtkm::cont::DataSet outData = contour.Execute(vtkmDataSet); // exception thrown on this line vtkm::rendering::Actor actor( outData.GetCellSet(), outData.GetCoordinateSystem(), outData.GetField("pointvar") );
ErrorBadValue(No field with requested name: pointvar)
The filter seems to work when I use Mock-DataSets created at runtime by VTKm.
Running on Windows 10
Compiled with VS 2017 Community
If you need further Information please tell me what exactly I can further provide. Im happy for all help I can receive.
Sending best regards,