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

Method PrepareForNewData

Common/DataModel/vtkImageData.cxx:133–147  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Graphics filters reallocate every execute. Image filters try to reuse the scalars.

Source from the content-addressed store, hash-verified

131// Graphics filters reallocate every execute. Image filters try to reuse
132// the scalars.
133void 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//------------------------------------------------------------------------------
150void vtkImageData::BuildPoints()

Callers 2

ExecuteDataStartMethod · 0.45

Calls 6

SetScalarsMethod · 0.80
GetScalarsMethod · 0.45
GetPointDataMethod · 0.45
RegisterMethod · 0.45
InitializeMethod · 0.45
UnRegisterMethod · 0.45

Tested by

no test coverage detected