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

Method SetKernel

Imaging/General/vtkImageConvolve.cxx:120–143  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Set a kernel, this is an internal method

Source from the content-addressed store, hash-verified

118//------------------------------------------------------------------------------
119// Set a kernel, this is an internal method
120void vtkImageConvolve::SetKernel(const double* kernel, int sizeX, int sizeY, int sizeZ)
121{
122 int modified = 0;
123
124 // Set the correct kernel size
125 this->KernelSize[0] = sizeX;
126 this->KernelSize[1] = sizeY;
127 this->KernelSize[2] = sizeZ;
128
129 int kernelLength = sizeX * sizeY * sizeZ;
130
131 for (int idx = 0; idx < kernelLength; idx++)
132 {
133 if (this->Kernel[idx] != kernel[idx])
134 {
135 modified = 1;
136 this->Kernel[idx] = kernel[idx];
137 }
138 }
139 if (modified)
140 {
141 this->Modified();
142 }
143}
144
145//------------------------------------------------------------------------------
146// Get the 3x3 kernel

Callers 15

SetKernel3x3Method · 0.95
SetKernel5x5Method · 0.95
SetKernel7x7Method · 0.95
SetKernel3x3x3Method · 0.95
SetKernel5x5x5Method · 0.95
SetKernel7x7x7Method · 0.95
~vtkSPHInterpolatorMethod · 0.80
~vtkPointInterpolatorMethod · 0.80
~vtkVoxelGridMethod · 0.80

Calls 1

ModifiedMethod · 0.45

Tested by

no test coverage detected