MCPcopy Create free account
hub / github.com/Kitware/VTK / SetOriginalDataObject

Method SetOriginalDataObject

Filters/Temporal/vtkDataObjectMeshCache.cxx:228–263  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

226
227//------------------------------------------------------------------------------
228void vtkDataObjectMeshCache::SetOriginalDataObject(vtkDataObject* input)
229{
230 if (!input)
231 {
232 vtkWarningMacro("Invalid original dataobject: nullptr");
233 return;
234 }
235
236 if (this->IsSupportedData(input))
237 {
238 if (this->OriginalCompositeDataSet &&
239 strcmp(this->OriginalCompositeDataSet->GetClassName(), input->GetClassName()) == 0)
240 {
241 this->InvalidateCache();
242 }
243
244 this->OriginalDataSet = vtkDataSet::SafeDownCast(input);
245 this->OriginalCompositeDataSet = vtkCompositeDataSet::SafeDownCast(input);
246 vtkCacheLog(INFO, "Set OriginalDataObject: " << input);
247 this->Modified();
248 return;
249 }
250
251 // Clear existing dataset ptrs
252 this->OriginalCompositeDataSet = nullptr;
253 this->OriginalDataSet = nullptr;
254
255 if (vtkCompositeDataSet::SafeDownCast(input))
256 {
257 vtkWarningMacro("Composite " << input->GetClassName() << " has unsupported block(s).");
258 }
259 else
260 {
261 vtkWarningMacro("Unsupported input type: " << input->GetClassName());
262 }
263}
264
265//------------------------------------------------------------------------------
266void vtkDataObjectMeshCache::ClearOriginalIds()

Callers 5

UseCacheIfPossibleMethod · 0.80
TestCacheInitializationFunction · 0.80
TestUnsupportedInputsFunction · 0.80
TestUnsupportedCallsFunction · 0.80
InitializeCacheMethod · 0.80

Calls 4

IsSupportedDataMethod · 0.95
InvalidateCacheMethod · 0.95
GetClassNameMethod · 0.45
ModifiedMethod · 0.45

Tested by 3

TestCacheInitializationFunction · 0.64
TestUnsupportedInputsFunction · 0.64
TestUnsupportedCallsFunction · 0.64