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; }