Commit 6ad53c7b authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot
Browse files

Merge topic 'fix-examples'

e3961b9c update examples after filter API changes.
9cf5be2f

 Make `Result` constructor as `explicit`.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1112
parents e35eec4a e3961b9c
......@@ -115,15 +115,13 @@ int main(int argc, char* argv[])
vtkm::cont::DataSetFieldAdd dsf;
dsf.AddPointField(inDataSet, "values", values);
// Output data set is pairs of saddle and peak vertex IDs
vtkm::filter::Result result;
// Convert 2D mesh of values into contour tree, pairs of vertex ids
vtkm::filter::ContourTreeMesh2D filter;
filter.SetActiveField("values");
result = filter.Execute(inDataSet);
vtkm::cont::Field resultField = result.GetField();
// Output data set is pairs of saddle and peak vertex IDs
vtkm::cont::DataSet output = filter.Execute(inDataSet);
vtkm::cont::Field resultField = output.GetField("saddlePeak");
;
vtkm::cont::ArrayHandle<vtkm::Pair<vtkm::Id, vtkm::Id>> saddlePeak;
resultField.GetData().CopyTo(saddlePeak);
......
......@@ -116,15 +116,13 @@ int main(int argc, char* argv[])
vtkm::cont::DataSetFieldAdd dsf;
dsf.AddPointField(inDataSet, "values", values);
// Output data set is pairs of saddle and peak vertex IDs
vtkm::filter::Result result;
// Convert 3D mesh of values into contour tree, pairs of vertex ids
vtkm::filter::ContourTreeMesh3D filter;
filter.SetActiveField("values");
result = filter.Execute(inDataSet);
// Output data set is pairs of saddle and peak vertex IDs
vtkm::cont::DataSet output = filter.Execute(inDataSet);
vtkm::cont::Field resultField = result.GetField();
vtkm::cont::Field resultField = output.GetField("saddlePeak");
vtkm::cont::ArrayHandle<vtkm::Pair<vtkm::Id, vtkm::Id>> saddlePeak;
resultField.GetData().CopyTo(saddlePeak);
......
......@@ -166,6 +166,16 @@ public:
return vtkm::filter::Result(output);
}
template <typename T, typename StorageType, typename DerivedPolicy, typename DeviceAdapter>
VTKM_CONT bool DoMapField(vtkm::filter::Result&,
const vtkm::cont::ArrayHandle<T, StorageType>&,
const vtkm::filter::FieldMetadata&,
const vtkm::filter::PolicyBase<DerivedPolicy>&,
DeviceAdapter)
{
return false;
}
};
struct UploadData
......@@ -368,11 +378,11 @@ int main(int argc, char** argv)
glutDisplayFunc([]() {
const vtkm::Float32 c = static_cast<vtkm::Float32>(gTimer.GetElapsedTime());
vtkm::filter::Result rdata = gFilter->Execute(*gData, GameOfLifePolicy());
gRenderer->render(rdata.GetDataSet());
vtkm::cont::DataSet oData = gFilter->Execute(*gData, GameOfLifePolicy());
gRenderer->render(oData);
glutSwapBuffers();
*gData = rdata.GetDataSet();
*gData = oData;
if (c > 120)
{
......
......@@ -246,13 +246,11 @@ int main(int argc, char* argv[])
filter.SetGenerateNormals(true);
filter.SetMergeDuplicatePoints(false);
filter.SetIsoValue(0, 0.1);
vtkm::filter::Result result = filter.Execute(dataSet, dataSet.GetField("nodevar"));
filter.SetActiveField("nodevar");
filter.MapFieldOntoOutput(result, dataSet.GetField("nodevar"));
vtkm::cont::DataSet outputData = filter.Execute(dataSet, { "nodevar" });
//need to extract vertices, normals, and scalars
vtkm::cont::DataSet& outputData = result.GetDataSet();
using VertType = vtkm::cont::ArrayHandle<vtkm::Vec<vtkm::Float32, 3>>;
vtkm::cont::CoordinateSystem coords = outputData.GetCoordinateSystem();
......
......@@ -272,9 +272,7 @@ int main(int argc, char* argv[])
// Convert cells to tetrahedra
vtkm::filter::Tetrahedralize tetrahedralize;
vtkm::filter::Result result = tetrahedralize.Execute(inDataSet);
outDataSet = result.GetDataSet();
outDataSet = tetrahedralize.Execute(inDataSet);
// Render the output dataset of tets
lastx = lasty = 0;
......
......@@ -254,9 +254,7 @@ int main(int argc, char* argv[])
vtkm::cont::DataSet inDataSet = MakeTetrahedralizeTestDataSet(dims);
vtkm::filter::Tetrahedralize tetrahedralize;
vtkm::filter::Result result = tetrahedralize.Execute(inDataSet);
tetDataSet = result.GetDataSet();
tetDataSet = tetrahedralize.Execute(inDataSet);
// Render the output dataset of tets
lastx = lasty = 0;
......
......@@ -192,8 +192,7 @@ int main(int argc, char* argv[])
// Convert 2D explicit cells to triangles
vtkm::filter::Triangulate triangulate;
vtkm::filter::Result result = triangulate.Execute(inDataSet);
outDataSet = result.GetDataSet();
outDataSet = triangulate.Execute(inDataSet);
// Render the output dataset of tets
glutInit(&argc, argv);
......
......@@ -159,9 +159,7 @@ int main(int argc, char* argv[])
// Convert uniform quad to triangle
vtkm::filter::Triangulate triangulate;
vtkm::filter::Result result = triangulate.Execute(inDataSet);
triDataSet = result.GetDataSet();
triDataSet = triangulate.Execute(inDataSet);
// Render the output dataset of tets
glutInit(&argc, argv);
......
......@@ -105,7 +105,7 @@ inline VTKM_CONT vtkm::filter::Result CleanGrid::DoExecute(const vtkm::cont::Dat
}
}
return outData;
return Result(outData);
}
template <typename ValueType, typename Storage, typename Policy, typename Device>
......
......@@ -112,7 +112,7 @@ inline VTKM_CONT vtkm::filter::Result ExtractGeometry::DoExecute(
output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()));
output.AddCellSet(outCells);
return output;
return vtkm::filter::Result(output);
}
//-----------------------------------------------------------------------------
......
......@@ -74,7 +74,7 @@ inline VTKM_CONT vtkm::filter::Result Mask::DoExecute(
output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()));
output.AddCellSet(cellOut);
return output;
return vtkm::filter::Result(output);
}
//-----------------------------------------------------------------------------
......
......@@ -47,7 +47,7 @@ class Result
{
public:
VTKM_CONT
Result()
explicit Result()
: DataSetValid(false)
, FieldValid(false)
, FieldAssociation(vtkm::cont::Field::ASSOC_ANY)
......@@ -57,7 +57,7 @@ public:
/// Use this constructor for DataSet filters (not Field filters).
///
VTKM_CONT
Result(const vtkm::cont::DataSet& dataSet)
explicit Result(const vtkm::cont::DataSet& dataSet)
: DataSetValid(true)
, Data(dataSet)
, FieldValid(false)
......@@ -70,9 +70,10 @@ public:
/// association).
///
VTKM_CONT
Result(const vtkm::cont::DataSet& dataSet,
const std::string& fieldName,
vtkm::cont::Field::AssociationEnum fieldAssociation = vtkm::cont::Field::ASSOC_ANY)
explicit Result(
const vtkm::cont::DataSet& dataSet,
const std::string& fieldName,
vtkm::cont::Field::AssociationEnum fieldAssociation = vtkm::cont::Field::ASSOC_ANY)
: DataSetValid(true)
, Data(dataSet)
, FieldValid(true)
......@@ -87,7 +88,7 @@ public:
/// \c DataSet will be created by adding the field to the input.
///
VTKM_CONT
Result(const vtkm::cont::DataSet& inDataSet, const vtkm::cont::Field& field)
explicit Result(const vtkm::cont::DataSet& inDataSet, const vtkm::cont::Field& field)
: DataSetValid(true)
, Data(vtkm::cont::DataSet(inDataSet))
, FieldValid(true)
......@@ -108,11 +109,11 @@ public:
/// for \c ASSOC_WHOLE_MESH and \c ASSOC_POINTS associations.
///
template <typename T, typename Storage>
VTKM_CONT Result(const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::ArrayHandle<T, Storage>& fieldArray,
const std::string& fieldName,
vtkm::cont::Field::AssociationEnum fieldAssociation,
const std::string& elementSetName = "")
VTKM_CONT explicit Result(const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::ArrayHandle<T, Storage>& fieldArray,
const std::string& fieldName,
vtkm::cont::Field::AssociationEnum fieldAssociation,
const std::string& elementSetName = "")
: DataSetValid(true)
, Data(vtkm::cont::DataSet(inDataSet))
, FieldValid(true)
......@@ -147,11 +148,11 @@ public:
/// for \c ASSOC_WHOLE_MESH and \c ASSOC_POINTS associations.
///
VTKM_CONT
Result(const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::DynamicArrayHandle& fieldArray,
const std::string& fieldName,
vtkm::cont::Field::AssociationEnum fieldAssociation,
const std::string& elementSetName = "")
explicit Result(const vtkm::cont::DataSet& inDataSet,
const vtkm::cont::DynamicArrayHandle& fieldArray,
const std::string& fieldName,
vtkm::cont::Field::AssociationEnum fieldAssociation,
const std::string& elementSetName = "")
: DataSetValid(true)
, Data(vtkm::cont::DataSet(inDataSet))
, FieldValid(true)
......
......@@ -87,7 +87,7 @@ inline VTKM_CONT vtkm::filter::Result Threshold::DoExecute(
output.AddCellSet(cellOut);
output.AddCoordinateSystem(input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()));
return output;
return vtkm::filter::Result(output);
}
//-----------------------------------------------------------------------------
......
......@@ -34,16 +34,9 @@ void TestUniformGrid(vtkm::filter::CleanGrid clean)
vtkm::cont::DataSet inData = makeData.Make2DUniformDataSet0();
vtkm::filter::Result result = clean.Execute(inData);
VTKM_TEST_ASSERT(result.IsValid(), "Filter failed to execute");
bool success;
success = clean.MapFieldOntoOutput(result, inData.GetField("pointvar"));
VTKM_TEST_ASSERT(success, "Failed to map point field");
success = clean.MapFieldOntoOutput(result, inData.GetField("cellvar"));
VTKM_TEST_ASSERT(success, "Failed to map cell field");
vtkm::cont::DataSet outData = result.GetDataSet();
vtkm::cont::DataSet outData = clean.Execute(inData, { "pointvar", "cellvar" });
VTKM_TEST_ASSERT(outData.HasField("pointvar"), "Failed to map point field");
VTKM_TEST_ASSERT(outData.HasField("cellvar"), "Failed to map point field");
vtkm::cont::CellSetExplicit<> outCellSet;
outData.GetCellSet().CopyTo(outCellSet);
......
......@@ -99,15 +99,11 @@ void TestClipStructuredInverted()
vtkm::Vec<vtkm::FloatDefault, 3> center(1, 1, 0);
vtkm::FloatDefault radius(0.5);
vtkm::filter::Result result;
vtkm::filter::ClipWithImplicitFunction clip;
clip.SetImplicitFunction(vtkm::cont::make_ImplicitFunctionHandle(vtkm::Sphere(center, radius)));
bool invert = true;
clip.SetInvertClip(invert);
result = clip.Execute(ds);
clip.MapFieldOntoOutput(result, ds.GetField("scalars"));
const vtkm::cont::DataSet& outputData = result.GetDataSet();
auto outputData = clip.Execute(ds, { "scalars" });
VTKM_TEST_ASSERT(outputData.GetNumberOfCellSets() == 1,
"Wrong number of cellsets in the output dataset");
VTKM_TEST_ASSERT(outputData.GetNumberOfCoordinateSystems() == 1,
......
......@@ -35,13 +35,7 @@ vtkm::cont::DataSet MakeDataTestSet1()
vtkm::cont::DataSet ds = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::CleanGrid clean;
vtkm::filter::Result result = clean.Execute(ds);
for (vtkm::IdComponent i = 0; i < ds.GetNumberOfFields(); ++i)
{
clean.MapFieldOntoOutput(result, ds.GetField(i));
}
return result.GetDataSet();
return clean.Execute(ds, vtkm::filter::FieldSelection::MODE_ALL);
}
vtkm::cont::DataSet MakeDataTestSet2()
......@@ -74,17 +68,7 @@ void TestExternalFacesExplicitGrid(const vtkm::cont::DataSet& ds,
vtkm::filter::ExternalFaces externalFaces;
externalFaces.SetCompactPoints(compactPoints);
externalFaces.SetPassPolyData(passPolyData);
vtkm::filter::Result result = externalFaces.Execute(ds);
VTKM_TEST_ASSERT(result.IsValid(), "Results should be valid");
// map fields
for (vtkm::IdComponent i = 0; i < ds.GetNumberOfFields(); ++i)
{
externalFaces.MapFieldOntoOutput(result, ds.GetField(i));
}
vtkm::cont::DataSet resultds = result.GetDataSet();
vtkm::cont::DataSet resultds = externalFaces.Execute(ds, vtkm::filter::FieldSelection::MODE_ALL);
// verify cellset
vtkm::cont::CellSetExplicit<>& new_cellSet =
......
......@@ -35,7 +35,6 @@ public:
{
std::cout << "Testing extract geometry with implicit function (box):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> minPoint(1.f, 1.f, 1.f);
......@@ -49,14 +48,8 @@ public:
extractGeometry.SetExtractBoundaryCells(false);
extractGeometry.SetExtractOnlyBoundaryCells(false);
result = extractGeometry.Execute(dataset);
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractGeometry.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractGeometry.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8),
"Wrong result for ExtractGeometry");
......@@ -71,7 +64,6 @@ public:
{
std::cout << "Testing extract geometry with implicit function (box):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> minPoint(1.f, 1.f, 1.f);
......@@ -85,14 +77,8 @@ public:
extractGeometry.SetExtractBoundaryCells(false);
extractGeometry.SetExtractOnlyBoundaryCells(false);
result = extractGeometry.Execute(dataset);
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractGeometry.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractGeometry.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 56),
"Wrong result for ExtractGeometry");
......@@ -107,7 +93,6 @@ public:
{
std::cout << "Testing extract geometry with implicit function (box):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> minPoint(0.5f, 0.5f, 0.5f);
......@@ -121,14 +106,8 @@ public:
extractGeometry.SetExtractBoundaryCells(true);
extractGeometry.SetExtractOnlyBoundaryCells(false);
result = extractGeometry.Execute(dataset);
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractGeometry.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractGeometry.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 64),
"Wrong result for ExtractGeometry");
......@@ -142,7 +121,6 @@ public:
{
std::cout << "Testing extract geometry with implicit function (box):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> minPoint(0.5f, 0.5f, 0.5f);
......@@ -156,14 +134,8 @@ public:
extractGeometry.SetExtractBoundaryCells(true);
extractGeometry.SetExtractOnlyBoundaryCells(true);
result = extractGeometry.Execute(dataset);
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractGeometry.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractGeometry.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 56),
"Wrong result for ExtractGeometry");
......
......@@ -35,7 +35,6 @@ public:
{
std::cout << "Testing extract points with implicit function (box):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> minPoint(1.f, 1.f, 1.f);
......@@ -48,15 +47,8 @@ public:
extractPoints.SetExtractInside(true);
extractPoints.SetCompactPoints(true);
result = extractPoints.Execute(dataset);
// Only point data can be transferred to result
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractPoints.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27),
"Wrong result for ExtractPoints");
......@@ -77,7 +69,6 @@ public:
{
std::cout << "Testing extract points with implicit function (box):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> minPoint(1.f, 1.f, 1.f);
......@@ -90,15 +81,8 @@ public:
extractPoints.SetExtractInside(false);
extractPoints.SetCompactPoints(true);
result = extractPoints.Execute(dataset);
// Only point data can be transferred to result
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractPoints.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 98),
"Wrong result for ExtractPoints");
......@@ -120,7 +104,6 @@ public:
{
std::cout << "Testing extract points with implicit function (sphere):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> center(2.f, 2.f, 2.f);
......@@ -132,15 +115,8 @@ public:
extractPoints.SetImplicitFunction(sphere);
extractPoints.SetExtractInside(true);
result = extractPoints.Execute(dataset);
// Only point data can be transferred to result
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractPoints.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 27),
"Wrong result for ExtractPoints");
}
......@@ -149,7 +125,6 @@ public:
{
std::cout << "Testing extract points with implicit function (box):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> minPoint(0.f, 0.f, 0.f);
......@@ -161,15 +136,8 @@ public:
extractPoints.SetImplicitFunction(box);
extractPoints.SetExtractInside(true);
result = extractPoints.Execute(dataset);
// Only point data can be transferred to result
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractPoints.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 8),
"Wrong result for ExtractPoints");
}
......@@ -178,7 +146,6 @@ public:
{
std::cout << "Testing extract points with implicit function (box):" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5();
vtkm::filter::Result result;
// Implicit function
vtkm::Vec<vtkm::FloatDefault, 3> minPoint(0.f, 0.f, 0.f);
......@@ -190,15 +157,8 @@ public:
extractPoints.SetImplicitFunction(box);
extractPoints.SetExtractInside(false);
result = extractPoints.Execute(dataset);
// Only point data can be transferred to result
for (vtkm::IdComponent i = 0; i < dataset.GetNumberOfFields(); ++i)
{
extractPoints.MapFieldOntoOutput(result, dataset.GetField(i));
}
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output =
extractPoints.Execute(dataset, vtkm::filter::FieldSelection::MODE_ALL);
VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfCells(), 3),
"Wrong result for ExtractPoints");
}
......
......@@ -35,7 +35,6 @@ public:
{
std::cout << "Testing extract structured uniform" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet1();
vtkm::filter::Result result;
vtkm::RangeId3 range(1, 4, 1, 4, 0, 1);
vtkm::Id3 sample(1, 1, 1);
......@@ -44,13 +43,7 @@ public:
extract.SetVOI(range);
extract.SetSampleRate(sample);
result = extract.Execute(dataset);
extract.MapFieldOntoOutput(result, dataset.GetField("pointvar"));
extract.MapFieldOntoOutput(result, dataset.GetField("cellvar"));
vtkm::cont::DataSet output = result.GetDataSet();
vtkm::cont::DataSet output = extract.Execute(dataset, { "pointvar", "cellvar" });
VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfPoints(), 9),
"Wrong result for ExtractStructured worklet");
VTKM_TEST_ASSERT(test_equal(output.GetCellSet(0).GetNumberOfCells(), 4),
......@@ -81,7 +74,6 @@ public:
{
std::cout << "Testing extract structured uniform" << std::endl;
vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1();
vtkm::filter::Result result;
vtkm::filter::ExtractStructured extract;
......@@ -89,13 +81,7 @@ public:
extract.SetVOI(1, 4, 1, 4, 1, 4);
extract.SetSampleRate(1, 1, 1);
result = extract.Execute(dataset);
extract.MapFieldOntoOutput(result, dataset.GetField("pointvar"));
extract.MapFieldOntoOutput(result, dataset.GetField("cellvar"));