------------------------------------------------------------------------------ Set a kernel, this is an internal method
| 118 | //------------------------------------------------------------------------------ |
| 119 | // Set a kernel, this is an internal method |
| 120 | void 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 |
no test coverage detected