From e013ad126fd4e3831b2a972ffb41b09268863a51 Mon Sep 17 00:00:00 2001 From: "Gunther H. Weber" Date: Thu, 2 Mar 2023 19:42:08 -0800 Subject: [PATCH 1/6] Add test for GlobalPointIndexStart to TestingExtractStructured --- .../testing/UnitTestExtractStructuredFilter.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx b/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx index 92ac31e72..99f0eb5af 100644 --- a/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx +++ b/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx @@ -26,6 +26,13 @@ public: std::cout << "Testing extract structured uniform" << std::endl; vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet1(); + // Change point index start from 0, 0 to 10, 14 + vtkm::cont::CellSetStructured<2> cellSet; + dataset.GetCellSet().AsCellSet(cellSet); + cellSet.SetGlobalPointIndexStart(vtkm::Id2{ 10, 14 }); + dataset.SetCellSet(cellSet); + dataset.PrintSummary(std::cout); + vtkm::RangeId3 range(1, 4, 1, 4, 0, 1); vtkm::Id3 sample(1, 1, 1); @@ -35,10 +42,17 @@ public: extract.SetFieldsToPass({ "pointvar", "cellvar" }); vtkm::cont::DataSet output = extract.Execute(dataset); + output.PrintSummary(std::cout); VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfPoints(), 9), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(output.GetNumberOfCells(), 4), "Wrong result for ExtractStructured worklet"); + vtkm::cont::CellSetStructured<2> outputCellSet; + output.GetCellSet().AsCellSet(outputCellSet); + VTKM_TEST_ASSERT(test_equal(outputCellSet.GetGlobalPointIndexStart()[0], 11), + "Wrong result for ExtractStructured PointIndexStart"); + VTKM_TEST_ASSERT(test_equal(outputCellSet.GetGlobalPointIndexStart()[1], 15), + "Wrong result for ExtractStructured PointIndexStart"); vtkm::cont::ArrayHandle outPointData; output.GetField("pointvar").GetData().AsArrayHandle(outPointData); From e55b700f7576fce819a3ac2e7da6e5d22b605e39 Mon Sep 17 00:00:00 2001 From: "Gunther H. Weber" Date: Tue, 7 Mar 2023 20:42:24 -0800 Subject: [PATCH 2/6] Deprecate SetIncludeOffset and rename to SetVOIIsGlobal --- vtkm/filter/entity_extraction/ExtractStructured.cxx | 2 +- vtkm/filter/entity_extraction/ExtractStructured.h | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/vtkm/filter/entity_extraction/ExtractStructured.cxx b/vtkm/filter/entity_extraction/ExtractStructured.cxx index a1962fb51..891a115b0 100644 --- a/vtkm/filter/entity_extraction/ExtractStructured.cxx +++ b/vtkm/filter/entity_extraction/ExtractStructured.cxx @@ -74,7 +74,7 @@ vtkm::cont::DataSet ExtractStructured::DoExecute(const vtkm::cont::DataSet& inpu this->VOI, this->SampleRate, this->IncludeBoundary, - this->IncludeOffset); + this->VOIIsGlobal); // Create map arrays for mapping fields. Could potentially save some time to first check to see // if these arrays would be used. diff --git a/vtkm/filter/entity_extraction/ExtractStructured.h b/vtkm/filter/entity_extraction/ExtractStructured.h index b4f1599d2..b1eb20e52 100644 --- a/vtkm/filter/entity_extraction/ExtractStructured.h +++ b/vtkm/filter/entity_extraction/ExtractStructured.h @@ -78,8 +78,17 @@ public: VTKM_CONT void SetIncludeBoundary(bool value) { this->IncludeBoundary = value; } + /// Get if VOI is specified in global point (rather than in local) indices VTKM_CONT - void SetIncludeOffset(bool value) { this->IncludeOffset = value; } + bool GetVOIIsGlobal() const { return this->VOIIsGlobal; } + /// Set if VOI is specified in global point (rather than in local) indices + VTKM_CONT + void SetVOIIsGlobal(bool value) { this->VOIIsGlobal = value; } + /// Set if VOI is specified in global point (rather than in local) indices + /// (depracted in favor of a method with a name that better conveys purpose) + VTKM_DEPRECATED(2.0) + VTKM_CONT + void SetIncludeOffset(bool value) { this->VOIIsGlobal = value; } private: VTKM_CONT @@ -88,7 +97,7 @@ private: vtkm::RangeId3 VOI = vtkm::RangeId3(0, -1, 0, -1, 0, -1); vtkm::Id3 SampleRate = { 1, 1, 1 }; bool IncludeBoundary = false; - bool IncludeOffset = false; + bool VOIIsGlobal = false; }; } // namespace entity_extraction From 84e719ae17e3992fe0fa0f45e2df5cb38dbff0c1 Mon Sep 17 00:00:00 2001 From: "Gunther H. Weber" Date: Tue, 7 Mar 2023 20:44:11 -0800 Subject: [PATCH 3/6] Set GlobalPointIndexStart correctly, copy GlobalPointDimensions --- .../worklet/ExtractStructured.h | 61 +++++++++++++------ 1 file changed, 44 insertions(+), 17 deletions(-) diff --git a/vtkm/filter/entity_extraction/worklet/ExtractStructured.h b/vtkm/filter/entity_extraction/worklet/ExtractStructured.h index f312422cd..3013bdc8b 100644 --- a/vtkm/filter/entity_extraction/worklet/ExtractStructured.h +++ b/vtkm/filter/entity_extraction/worklet/ExtractStructured.h @@ -136,6 +136,7 @@ private: static UncertainCellSetStructured MakeCellSetStructured( const vtkm::Id3& inputPointDims, const vtkm::Id3& inputOffsets, + const vtkm::Id3& inputGlobalPointDims, vtkm::IdComponent forcedDimensionality = 0) { // when the point dimension for a given axis is 1 we @@ -146,12 +147,22 @@ private: vtkm::IdComponent dimensionality = forcedDimensionality; vtkm::Id3 dimensions = inputPointDims; vtkm::Id3 offset = inputOffsets; + vtkm::Id3 globalDimensions = inputGlobalPointDims; for (int i = 0; i < 3 && (forcedDimensionality == 0); ++i) { if (inputPointDims[i] > 1) { dimensions[dimensionality] = inputPointDims[i]; offset[dimensionality] = inputOffsets[i]; + // TODO/FIXME: This may not be the correct way to handle global point dims. + // E.g., if we preserve the input global point dims (default) then they may + // have a higher dimensionility than the returned data set. In that case, + // the approach here will result in an incorrect value for GlobalPointDimensions. + // This is the simplest approach, which should work in most use cases for this + // filter, but if this choice causes further problems down the way, we may need + // to rethink it. + globalDimensions[dimensionality] = inputGlobalPointDims[i]; + ++dimensionality; } } @@ -163,6 +174,7 @@ private: vtkm::cont::CellSetStructured<1> outCs; outCs.SetPointDimensions(dimensions[0]); outCs.SetGlobalPointIndexStart(offset[0]); + outCs.SetGlobalPointDimensions(globalDimensions[0]); return outCs; } case 2: @@ -170,6 +182,7 @@ private: vtkm::cont::CellSetStructured<2> outCs; outCs.SetPointDimensions(vtkm::Id2(dimensions[0], dimensions[1])); outCs.SetGlobalPointIndexStart(vtkm::Id2(offset[0], offset[1])); + outCs.SetGlobalPointDimensions(vtkm::Id2(globalDimensions[0], globalDimensions[1])); return outCs; } case 3: @@ -177,6 +190,7 @@ private: vtkm::cont::CellSetStructured<3> outCs; outCs.SetPointDimensions(dimensions); outCs.SetGlobalPointIndexStart(offset); + outCs.SetGlobalPointDimensions(globalDimensions); return outCs; } default: @@ -189,58 +203,65 @@ public: const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool includeOffset) + bool voiIsGlobal) { vtkm::Id pdims = cellset.GetPointDimensions(); vtkm::Id offsets = cellset.GetGlobalPointIndexStart(); + vtkm::Id gpdims = cellset.GetGlobalPointDimensions(); return this->Compute(1, vtkm::Id3{ pdims, 1, 1 }, vtkm::Id3{ offsets, 0, 0 }, + vtkm::Id3{ gpdims, 1, 1 }, voi, sampleRate, includeBoundary, - includeOffset); + voiIsGlobal); } inline UncertainCellSetStructured Run(const vtkm::cont::CellSetStructured<2>& cellset, const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool includeOffset) + bool voiIsGlobal) { vtkm::Id2 pdims = cellset.GetPointDimensions(); vtkm::Id2 offsets = cellset.GetGlobalPointIndexStart(); + vtkm::Id2 gpdims = cellset.GetGlobalPointDimensions(); return this->Compute(2, vtkm::Id3{ pdims[0], pdims[1], 1 }, vtkm::Id3{ offsets[0], offsets[1], 0 }, + vtkm::Id3{ gpdims[0], gpdims[1], 1 }, voi, sampleRate, includeBoundary, - includeOffset); + voiIsGlobal); } inline UncertainCellSetStructured Run(const vtkm::cont::CellSetStructured<3>& cellset, const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool includeOffset) + bool voiIsGlobal) { vtkm::Id3 pdims = cellset.GetPointDimensions(); vtkm::Id3 offsets = cellset.GetGlobalPointIndexStart(); - return this->Compute(3, pdims, offsets, voi, sampleRate, includeBoundary, includeOffset); + vtkm::Id3 gpdims = cellset.GetGlobalPointDimensions(); + return this->Compute(3, pdims, offsets, gpdims, voi, sampleRate, includeBoundary, voiIsGlobal); } UncertainCellSetStructured Compute(const int dimensionality, const vtkm::Id3& ptdim, const vtkm::Id3& offsets, + const vtkm::Id3& gpdims, const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool includeOffset) + bool voiIsGlobal) { // Verify input parameters vtkm::Id3 offset_vec(0, 0, 0); vtkm::Id3 globalOffset(0, 0, 0); + vtkm::Id3 globalPointDimensions = gpdims; this->InputDimensions = ptdim; this->InputDimensionality = dimensionality; @@ -250,7 +271,7 @@ public: { throw vtkm::cont::ErrorBadValue("Bad sampling rate"); } - if (includeOffset) + if (voiIsGlobal) { vtkm::Id3 tmpDims = ptdim; offset_vec = offsets; @@ -315,9 +336,9 @@ public: if (!this->VOI.IsNonEmpty()) { vtkm::Id3 empty = { 0, 0, 0 }; - return MakeCellSetStructured(empty, empty, dimensionality); + return MakeCellSetStructured(empty, empty, globalPointDimensions, dimensionality); } - if (!includeOffset) + if (!voiIsGlobal) { // compute output dimensions this->OutputDimensions = vtkm::Id3(1, 1, 1); @@ -354,9 +375,15 @@ public: MakeAxisIndexArrayCells(vtkm::Max(vtkm::Id(1), this->OutputDimensions[2] - 1), this->VOI.Z.Min, this->SampleRate[2])); + + // compute global point origin + for (int i = 0; i < dimensionality; ++i) + { + globalOffset[i] = offsets[i] + this->VOI[i].Min; + } } - return MakeCellSetStructured(this->OutputDimensions, globalOffset); + return MakeCellSetStructured(this->OutputDimensions, globalOffset, globalPointDimensions); } @@ -368,13 +395,13 @@ private: const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool includeOffset, + bool voiIsGlobal, UncertainCellSetStructured& output) : Worklet(worklet) , VOI(&voi) , SampleRate(&sampleRate) , IncludeBoundary(includeBoundary) - , IncludeOffset(includeOffset) + , VOIIsGlobal(voiIsGlobal) , Output(&output) { } @@ -383,7 +410,7 @@ private: void operator()(const vtkm::cont::CellSetStructured& cellset) const { *this->Output = this->Worklet->Run( - cellset, *this->VOI, *this->SampleRate, this->IncludeBoundary, this->IncludeOffset); + cellset, *this->VOI, *this->SampleRate, this->IncludeBoundary, this->VOIIsGlobal); } template @@ -397,7 +424,7 @@ private: const vtkm::RangeId3* VOI; const vtkm::Id3* SampleRate; bool IncludeBoundary; - bool IncludeOffset; + bool VOIIsGlobal; UncertainCellSetStructured* Output; }; @@ -407,10 +434,10 @@ public: const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool includeOffset) + bool voiIsGlobal) { UncertainCellSetStructured output; - CallRun cr(this, voi, sampleRate, includeBoundary, includeOffset, output); + CallRun cr(this, voi, sampleRate, includeBoundary, voiIsGlobal, output); vtkm::cont::CastAndCall(cellset, cr); return output; } From 523c8f3f21eb07c40d948e21d55c36d1ccd5ee77 Mon Sep 17 00:00:00 2001 From: "Gunther H. Weber" Date: Tue, 7 Mar 2023 20:44:43 -0800 Subject: [PATCH 4/6] Add test whether GlobalPointDimensions are preserved --- .../testing/UnitTestExtractStructuredFilter.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx b/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx index 99f0eb5af..27c10945f 100644 --- a/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx +++ b/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx @@ -29,7 +29,9 @@ public: // Change point index start from 0, 0 to 10, 14 vtkm::cont::CellSetStructured<2> cellSet; dataset.GetCellSet().AsCellSet(cellSet); + cellSet.SetGlobalPointDimensions(vtkm::Id2{ 15, 19 }); cellSet.SetGlobalPointIndexStart(vtkm::Id2{ 10, 14 }); + //cellSet.SetGlobalPointIndexStart(vtkm::Id2{ 0, 0 }); dataset.SetCellSet(cellSet); dataset.PrintSummary(std::cout); @@ -39,6 +41,7 @@ public: vtkm::filter::entity_extraction::ExtractStructured extract; extract.SetVOI(range); extract.SetSampleRate(sample); + //extract.SetVOIIsGlobal(true); extract.SetFieldsToPass({ "pointvar", "cellvar" }); vtkm::cont::DataSet output = extract.Execute(dataset); @@ -53,6 +56,11 @@ public: "Wrong result for ExtractStructured PointIndexStart"); VTKM_TEST_ASSERT(test_equal(outputCellSet.GetGlobalPointIndexStart()[1], 15), "Wrong result for ExtractStructured PointIndexStart"); + VTKM_TEST_ASSERT(test_equal(outputCellSet.GetGlobalPointDimensions()[0], 15), + "Wrong result for ExtractStructured GlobalPointDimensions"); + VTKM_TEST_ASSERT(test_equal(outputCellSet.GetGlobalPointDimensions()[1], 19), + "Wrong result for ExtractStructured GlobalPointDimensions"); + vtkm::cont::ArrayHandle outPointData; output.GetField("pointvar").GetData().AsArrayHandle(outPointData); From 7bea5413cf6643f2c18f01566a0f7157cd251af7 Mon Sep 17 00:00:00 2001 From: "Gunther H. Weber" Date: Thu, 9 Mar 2023 13:20:07 -0800 Subject: [PATCH 5/6] Revert from VOIIsGlobal to IncludeOffset. Add comment about deprecation reasoning. --- .../entity_extraction/ExtractStructured.cxx | 2 +- .../entity_extraction/ExtractStructured.h | 21 ++++++------- .../worklet/ExtractStructured.h | 31 ++++++++++--------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/vtkm/filter/entity_extraction/ExtractStructured.cxx b/vtkm/filter/entity_extraction/ExtractStructured.cxx index 891a115b0..a1962fb51 100644 --- a/vtkm/filter/entity_extraction/ExtractStructured.cxx +++ b/vtkm/filter/entity_extraction/ExtractStructured.cxx @@ -74,7 +74,7 @@ vtkm::cont::DataSet ExtractStructured::DoExecute(const vtkm::cont::DataSet& inpu this->VOI, this->SampleRate, this->IncludeBoundary, - this->VOIIsGlobal); + this->IncludeOffset); // Create map arrays for mapping fields. Could potentially save some time to first check to see // if these arrays would be used. diff --git a/vtkm/filter/entity_extraction/ExtractStructured.h b/vtkm/filter/entity_extraction/ExtractStructured.h index b1eb20e52..1d01bb160 100644 --- a/vtkm/filter/entity_extraction/ExtractStructured.h +++ b/vtkm/filter/entity_extraction/ExtractStructured.h @@ -78,17 +78,16 @@ public: VTKM_CONT void SetIncludeBoundary(bool value) { this->IncludeBoundary = value; } - /// Get if VOI is specified in global point (rather than in local) indices + /// Set if VOI is specified in global (rather than in local) point indices + /// (NOTE: Depracted this method since this does not seem to work as + /// expected and there are no tests for it. Furthermore, neither VTK-m nor + /// VTK-h/Ascent seem to use this method. If your are using this method + /// somewhere else and think it should remain, please open a merge request to + /// "de-deprecate" it and add a test and documentation of the expected + /// behavior.) + VTKM_DEPRECATED(2.1) VTKM_CONT - bool GetVOIIsGlobal() const { return this->VOIIsGlobal; } - /// Set if VOI is specified in global point (rather than in local) indices - VTKM_CONT - void SetVOIIsGlobal(bool value) { this->VOIIsGlobal = value; } - /// Set if VOI is specified in global point (rather than in local) indices - /// (depracted in favor of a method with a name that better conveys purpose) - VTKM_DEPRECATED(2.0) - VTKM_CONT - void SetIncludeOffset(bool value) { this->VOIIsGlobal = value; } + void SetIncludeOffset(bool value) { this->IncludeOffset = value; } private: VTKM_CONT @@ -97,7 +96,7 @@ private: vtkm::RangeId3 VOI = vtkm::RangeId3(0, -1, 0, -1, 0, -1); vtkm::Id3 SampleRate = { 1, 1, 1 }; bool IncludeBoundary = false; - bool VOIIsGlobal = false; + bool IncludeOffset = false; }; } // namespace entity_extraction diff --git a/vtkm/filter/entity_extraction/worklet/ExtractStructured.h b/vtkm/filter/entity_extraction/worklet/ExtractStructured.h index 3013bdc8b..c1a97f2f1 100644 --- a/vtkm/filter/entity_extraction/worklet/ExtractStructured.h +++ b/vtkm/filter/entity_extraction/worklet/ExtractStructured.h @@ -203,7 +203,7 @@ public: const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool voiIsGlobal) + bool includeOffset) { vtkm::Id pdims = cellset.GetPointDimensions(); vtkm::Id offsets = cellset.GetGlobalPointIndexStart(); @@ -215,14 +215,14 @@ public: voi, sampleRate, includeBoundary, - voiIsGlobal); + includeOffset); } inline UncertainCellSetStructured Run(const vtkm::cont::CellSetStructured<2>& cellset, const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool voiIsGlobal) + bool includeOffset) { vtkm::Id2 pdims = cellset.GetPointDimensions(); vtkm::Id2 offsets = cellset.GetGlobalPointIndexStart(); @@ -234,19 +234,20 @@ public: voi, sampleRate, includeBoundary, - voiIsGlobal); + includeOffset); } inline UncertainCellSetStructured Run(const vtkm::cont::CellSetStructured<3>& cellset, const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool voiIsGlobal) + bool includeOffset) { vtkm::Id3 pdims = cellset.GetPointDimensions(); vtkm::Id3 offsets = cellset.GetGlobalPointIndexStart(); vtkm::Id3 gpdims = cellset.GetGlobalPointDimensions(); - return this->Compute(3, pdims, offsets, gpdims, voi, sampleRate, includeBoundary, voiIsGlobal); + return this->Compute( + 3, pdims, offsets, gpdims, voi, sampleRate, includeBoundary, includeOffset); } UncertainCellSetStructured Compute(const int dimensionality, @@ -256,7 +257,7 @@ public: const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool voiIsGlobal) + bool includeOffset) { // Verify input parameters vtkm::Id3 offset_vec(0, 0, 0); @@ -271,7 +272,7 @@ public: { throw vtkm::cont::ErrorBadValue("Bad sampling rate"); } - if (voiIsGlobal) + if (includeOffset) { vtkm::Id3 tmpDims = ptdim; offset_vec = offsets; @@ -338,7 +339,7 @@ public: vtkm::Id3 empty = { 0, 0, 0 }; return MakeCellSetStructured(empty, empty, globalPointDimensions, dimensionality); } - if (!voiIsGlobal) + if (!includeOffset) { // compute output dimensions this->OutputDimensions = vtkm::Id3(1, 1, 1); @@ -395,13 +396,13 @@ private: const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool voiIsGlobal, + bool includeOffset, UncertainCellSetStructured& output) : Worklet(worklet) , VOI(&voi) , SampleRate(&sampleRate) , IncludeBoundary(includeBoundary) - , VOIIsGlobal(voiIsGlobal) + , IncludeOffset(includeOffset) , Output(&output) { } @@ -410,7 +411,7 @@ private: void operator()(const vtkm::cont::CellSetStructured& cellset) const { *this->Output = this->Worklet->Run( - cellset, *this->VOI, *this->SampleRate, this->IncludeBoundary, this->VOIIsGlobal); + cellset, *this->VOI, *this->SampleRate, this->IncludeBoundary, this->IncludeOffset); } template @@ -424,7 +425,7 @@ private: const vtkm::RangeId3* VOI; const vtkm::Id3* SampleRate; bool IncludeBoundary; - bool VOIIsGlobal; + bool IncludeOffset; UncertainCellSetStructured* Output; }; @@ -434,10 +435,10 @@ public: const vtkm::RangeId3& voi, const vtkm::Id3& sampleRate, bool includeBoundary, - bool voiIsGlobal) + bool includeOffset) { UncertainCellSetStructured output; - CallRun cr(this, voi, sampleRate, includeBoundary, voiIsGlobal, output); + CallRun cr(this, voi, sampleRate, includeBoundary, includeOffset, output); vtkm::cont::CastAndCall(cellset, cr); return output; } From 8f4d5fdf80ee63ddbd1b28425dbe4cdfead2e453 Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Wed, 21 Jun 2023 17:33:05 -0400 Subject: [PATCH 6/6] Remove some unneeded test comments and debug code --- .../testing/UnitTestExtractStructuredFilter.cxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx b/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx index 27c10945f..5ce8805c9 100644 --- a/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx +++ b/vtkm/filter/entity_extraction/testing/UnitTestExtractStructuredFilter.cxx @@ -31,7 +31,6 @@ public: dataset.GetCellSet().AsCellSet(cellSet); cellSet.SetGlobalPointDimensions(vtkm::Id2{ 15, 19 }); cellSet.SetGlobalPointIndexStart(vtkm::Id2{ 10, 14 }); - //cellSet.SetGlobalPointIndexStart(vtkm::Id2{ 0, 0 }); dataset.SetCellSet(cellSet); dataset.PrintSummary(std::cout); @@ -41,11 +40,9 @@ public: vtkm::filter::entity_extraction::ExtractStructured extract; extract.SetVOI(range); extract.SetSampleRate(sample); - //extract.SetVOIIsGlobal(true); extract.SetFieldsToPass({ "pointvar", "cellvar" }); vtkm::cont::DataSet output = extract.Execute(dataset); - output.PrintSummary(std::cout); VTKM_TEST_ASSERT(test_equal(output.GetCellSet().GetNumberOfPoints(), 9), "Wrong result for ExtractStructured worklet"); VTKM_TEST_ASSERT(test_equal(output.GetNumberOfCells(), 4),