1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkImageSpatialFilter.h,v $
6 Date: $Date: 2002/01/22 15:33:32 $
7 Version: $Revision: 1.46 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkImageSpatialFilter - Filters that operate on pixel neighborhoods.
19 // .SECTION Description
20 // vtkImageSpatialFilter is a super class for filters that operate on an
21 // input neighborhood for each output pixel. It handles even sized
22 // neighborhoods, but their can be a half pixel shift associated with
23 // processing. This superclass has some logic for handling boundaries. It
24 // can split regions into boundary and non-boundary pieces and call different
28 #ifndef __vtkImageSpatialFilter_h
29 #define __vtkImageSpatialFilter_h
32 #include "vtkImageToImageFilter.h"
34 class VTK_IMAGING_EXPORT vtkImageSpatialFilter : public vtkImageToImageFilter
37 static vtkImageSpatialFilter *New();
38 vtkTypeRevisionMacro(vtkImageSpatialFilter,vtkImageToImageFilter);
39 void PrintSelf(ostream& os, vtkIndent indent);
42 // Get the Kernel size.
43 int *GetKernelSize() {return this->KernelSize;}
46 // Get the Kernel middle.
47 int *GetKernelMiddle() {return this->KernelMiddle;}
50 vtkImageSpatialFilter();
51 ~vtkImageSpatialFilter() {};
54 int KernelMiddle[3]; // Index of kernel origin
55 int Strides[3]; // Shrink factor
56 int HandleBoundaries; // Output shrinks if boundaries aren't handled
58 // Called by the superclass
59 void ExecuteInformation();
60 // Override this method if you have to.
61 virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
63 void ComputeOutputWholeExtent(int extent[6], int handleBoundaries);
64 void ComputeInputUpdateExtent(int extent[6], int wholeExtent[6]);
67 vtkImageSpatialFilter(const vtkImageSpatialFilter&); // Not implemented.
68 void operator=(const vtkImageSpatialFilter&); // Not implemented.