------------------------------------------------------------------------------ Graphics filters reallocate every execute. Image filters try to reuse the scalars.
| 131 | // Graphics filters reallocate every execute. Image filters try to reuse |
| 132 | // the scalars. |
| 133 | void vtkImageData::PrepareForNewData() |
| 134 | { |
| 135 | // free everything but the scalars |
| 136 | vtkDataArray* scalars = this->GetPointData()->GetScalars(); |
| 137 | if (scalars) |
| 138 | { |
| 139 | scalars->Register(this); |
| 140 | } |
| 141 | this->Initialize(); |
| 142 | if (scalars) |
| 143 | { |
| 144 | this->GetPointData()->SetScalars(scalars); |
| 145 | scalars->UnRegister(this); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | //------------------------------------------------------------------------------ |
| 150 | void vtkImageData::BuildPoints() |
no test coverage detected