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

Function ApplyScale

Filters/General/vtkAxisAlignedTransformFilter.cxx:128–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126//------------------------------------------------------------------------------
127template <typename GridType>
128void ApplyScale(GridType* grid, double Scale[3])
129{
130 vtkDoubleArray* xCoordinate = vtkDoubleArray::SafeDownCast(grid->GetXCoordinates());
131 for (vtkIdType i = 0; i < xCoordinate->GetNumberOfTuples(); ++i)
132 {
133 xCoordinate->SetTuple1(i, xCoordinate->GetTuple1(i) * Scale[0]);
134 }
135 vtkDoubleArray* yCoordinate = vtkDoubleArray::SafeDownCast(grid->GetYCoordinates());
136 for (vtkIdType i = 0; i < yCoordinate->GetNumberOfTuples(); ++i)
137 {
138 yCoordinate->SetTuple1(i, yCoordinate->GetTuple1(i) * Scale[1]);
139 }
140 vtkDoubleArray* zCoordinate = vtkDoubleArray::SafeDownCast(grid->GetZCoordinates());
141 for (vtkIdType i = 0; i < zCoordinate->GetNumberOfTuples(); ++i)
142 {
143 zCoordinate->SetTuple1(i, zCoordinate->GetTuple1(i) * Scale[2]);
144 }
145}
146
147//------------------------------------------------------------------------------
148int HashLut(int rotationAxis, int normalAxis, int angle)

Callers 2

ProcessHTGMethod · 0.85

Calls 6

SetTuple1Method · 0.80
GetTuple1Method · 0.80
GetXCoordinatesMethod · 0.45
GetNumberOfTuplesMethod · 0.45
GetYCoordinatesMethod · 0.45
GetZCoordinatesMethod · 0.45

Tested by

no test coverage detected