------------------------------------------------------------------------------ Copy the geometric and topological structure of an input structured points object.
| 64 | // Copy the geometric and topological structure of an input structured points |
| 65 | // object. |
| 66 | void 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 | //------------------------------------------------------------------------------ |
| 95 | void vtkImageData::CopyInformationFromPipeline(vtkInformation* information) |
nothing calls this directly
no test coverage detected