OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkImageSpatialFilter.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkImageSpatialFilter.h,v $
5   Language:  C++
6   Date:      $Date: 2002/01/22 15:33:32 $
7   Version:   $Revision: 1.46 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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
25 // execute methods.
26
27
28 #ifndef __vtkImageSpatialFilter_h
29 #define __vtkImageSpatialFilter_h
30
31
32 #include "vtkImageToImageFilter.h"
33
34 class VTK_IMAGING_EXPORT vtkImageSpatialFilter : public vtkImageToImageFilter
35 {
36 public:
37   static vtkImageSpatialFilter *New();
38   vtkTypeRevisionMacro(vtkImageSpatialFilter,vtkImageToImageFilter);
39   void PrintSelf(ostream& os, vtkIndent indent);
40
41   // Description:
42   // Get the Kernel size.
43   int *GetKernelSize() {return this->KernelSize;}
44   
45   // Description:
46   // Get the Kernel middle.
47   int *GetKernelMiddle() {return this->KernelMiddle;}
48
49 protected:
50   vtkImageSpatialFilter();
51   ~vtkImageSpatialFilter() {};
52
53   int   KernelSize[3];
54   int   KernelMiddle[3];      // Index of kernel origin
55   int   Strides[3];      // Shrink factor
56   int   HandleBoundaries;     // Output shrinks if boundaries aren't handled
57
58   // Called by the superclass
59   void ExecuteInformation();
60   // Override this method if you have to.
61   virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
62
63   void ComputeOutputWholeExtent(int extent[6], int handleBoundaries);
64   void ComputeInputUpdateExtent(int extent[6], int wholeExtent[6]);
65
66 private:
67   vtkImageSpatialFilter(const vtkImageSpatialFilter&);  // Not implemented.
68   void operator=(const vtkImageSpatialFilter&);  // Not implemented.
69 };
70
71 #endif
72
73
74
75
76
77
78
79
80
81