Applies a spatial filter to each layer of the data cube in the range of layers set by LayerFrom and LayerTo. The parameter TimeSlot defines the time slot of the cube. The size of the smoothing kernel is determined by KernelSize (in pixels). For binomial kernels the maximum KernelSize is restricted to 15.
The parameter KernelType specifies the type of the kernel:
0 ... uniform (moving average)
The parameter BitMask defines the pixel mask which is to be used to exclude certain pixels from the filtering. Setting BitMask to zero forces the routine to process all pixels of the image.
1 ... binomial low pass
2 ... binomial high pass
If Feedback is set to TRUE, the script progress bar at the bottom right of the Epina ImageLab main window indicates the progress of the calculation, if set to FALSE no visual feedback is provided. Please note that unless the script progress bar is already visible you have to make it visible before calling SpatialFilter, otherwise the feedback will not be displayed. You can activate the script progress bar by calling the function ScriptBar(0).
The function returns the following error codes:
0 .... everything is OK
-1 ... LayerFrom/LayerTo are out of range
-2 ... TimeSlot is out of range
-3 ... invalid KernelType
-4 ... BitMmask is out of range