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

Method FindAndReflectArrays

Filters/General/vtkAxisAlignedReflectionFilter.cxx:288–315  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

286
287//------------------------------------------------------------------------------
288void vtkAxisAlignedReflectionFilter::FindAndReflectArrays(vtkDataSet* input, vtkDataSet* output,
289 int mirrorDir[3], int mirrorSymmetricTensorDir[6], int mirrorTensorDir[9])
290{
291 vtkPointData* inPD = input->GetPointData();
292 vtkPointData* outPD = output->GetPointData();
293 vtkCellData* inCD = input->GetCellData();
294 vtkCellData* outCD = output->GetCellData();
295
296 int numPts = input->GetNumberOfPoints();
297 int numCells = input->GetNumberOfCells();
298
299 std::vector<std::pair<vtkIdType, int>> reflectableArrays;
300 vtkReflectionUtilities::FindAllReflectableArrays(
301 reflectableArrays, inPD, this->ReflectAllInputArrays);
302 for (vtkIdType i = 0; i < numPts; i++)
303 {
304 vtkReflectionUtilities::ReflectReflectableArrays(
305 reflectableArrays, inPD, outPD, i, mirrorDir, mirrorSymmetricTensorDir, mirrorTensorDir, i);
306 }
307 reflectableArrays.clear();
308 vtkReflectionUtilities::FindAllReflectableArrays(
309 reflectableArrays, inCD, this->ReflectAllInputArrays);
310 for (vtkIdType i = 0; i < numCells; i++)
311 {
312 vtkReflectionUtilities::ReflectReflectableArrays(
313 reflectableArrays, inCD, outCD, i, mirrorDir, mirrorSymmetricTensorDir, mirrorTensorDir, i);
314 }
315}
316
317//------------------------------------------------------------------------------
318void vtkAxisAlignedReflectionFilter::ProcessImageData(vtkImageData* input, vtkImageData* output,

Callers 2

ProcessImageDataMethod · 0.95

Calls 5

GetPointDataMethod · 0.45
GetCellDataMethod · 0.45
GetNumberOfPointsMethod · 0.45
GetNumberOfCellsMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected