Commit ff94622c authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

fix README.md based on changes to Filter API.

parent eca65146
...@@ -132,9 +132,7 @@ std::string fieldName = "pointvar"; ...@@ -132,9 +132,7 @@ std::string fieldName = "pointvar";
// Create an isosurface filter // Create an isosurface filter
vtkm::filter::MarchingCubes filter; vtkm::filter::MarchingCubes filter;
filter.SetIsoValue(0, isovalue); filter.SetIsoValue(0, isovalue);
vtkm::filter::Result result = filter.Execute( inputData, vtkm::cont::DataSet outputData = filter.Execute(inputData);
inputData.GetField(fieldName) );
filter.MapFieldOntoOutput(result, inputData.GetField(fieldName));
// compute the bounds and extends of the input data // compute the bounds and extends of the input data
vtkm::Bounds coordsBounds = inputData.GetCoordinateSystem().GetBounds(); vtkm::Bounds coordsBounds = inputData.GetCoordinateSystem().GetBounds();
...@@ -162,7 +160,6 @@ vtkm::rendering::CanvasRayTracer canvas(512, 512); ...@@ -162,7 +160,6 @@ vtkm::rendering::CanvasRayTracer canvas(512, 512);
vtkm::rendering::Color bg(0.2f, 0.2f, 0.2f, 1.0f); vtkm::rendering::Color bg(0.2f, 0.2f, 0.2f, 1.0f);
// Render an image of the output isosurface // Render an image of the output isosurface
vtkm::cont::DataSet& outputData = result.GetDataSet();
scene.AddActor(vtkm::rendering::Actor(outputData.GetCellSet(), scene.AddActor(vtkm::rendering::Actor(outputData.GetCellSet(),
outputData.GetCoordinateSystem(), outputData.GetCoordinateSystem(),
outputData.GetField(fieldName), outputData.GetField(fieldName),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment