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

Method CopyStructure

Common/DataModel/vtkImageData.cxx:66–92  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Copy the geometric and topological structure of an input structured points object.

Source from the content-addressed store, hash-verified

64// Copy the geometric and topological structure of an input structured points
65// object.
66void vtkImageData::CopyStructure(vtkDataSet* ds)
67{
68 vtkImageData* sPts = static_cast<vtkImageData*>(ds);
69 this->Initialize();
70
71 for (int i = 0; i < 3; i++)
72 {
73 this->Spacing[i] = sPts->Spacing[i];
74 this->Origin[i] = sPts->Origin[i];
75 }
76 // set extent sets, extent, dimensions, and data description
77 this->DirectionMatrix->DeepCopy(sPts->GetDirectionMatrix());
78 this->ComputeTransforms();
79
80 this->Superclass::CopyStructure(ds);
81
82 if (ds->HasAnyBlankPoints())
83 {
84 // there is blanking
85 this->GetPointData()->AddArray(ds->GetPointGhostArray());
86 }
87 if (ds->HasAnyBlankCells())
88 {
89 // there is blanking
90 this->GetCellData()->AddArray(ds->GetCellGhostArray());
91 }
92}
93
94//------------------------------------------------------------------------------
95void vtkImageData::CopyInformationFromPipeline(vtkInformation* information)

Callers

nothing calls this directly

Calls 10

ComputeTransformsMethod · 0.95
GetPointGhostArrayMethod · 0.80
GetCellGhostArrayMethod · 0.80
InitializeMethod · 0.45
DeepCopyMethod · 0.45
HasAnyBlankPointsMethod · 0.45
AddArrayMethod · 0.45
GetPointDataMethod · 0.45
HasAnyBlankCellsMethod · 0.45
GetCellDataMethod · 0.45

Tested by

no test coverage detected