OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkImageShrink3D.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkImageShrink3D.h,v $
5   Language:  C++
6   Date:      $Date: 2002/01/22 15:33:26 $
7   Version:   $Revision: 1.38 $
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 vtkImageShrink3D - Subsamples an image.
19 // .SECTION Description
20 // vtkImageShrink3D shrinks an image by sub sampling on a 
21 // uniform grid (integer multiples).  
22
23 #ifndef __vtkImageShrink3D_h
24 #define __vtkImageShrink3D_h
25
26
27 #include "vtkImageToImageFilter.h"
28
29 class VTK_IMAGING_EXPORT vtkImageShrink3D : public vtkImageToImageFilter
30 {
31 public:
32   static vtkImageShrink3D *New();
33   vtkTypeRevisionMacro(vtkImageShrink3D,vtkImageToImageFilter);
34   void PrintSelf(ostream& os, vtkIndent indent);
35   
36   // Description:
37   // Set/Get the shrink factors
38   vtkSetVector3Macro(ShrinkFactors,int);
39   vtkGetVector3Macro(ShrinkFactors,int);
40
41   // Description:
42   // Set/Get the pixel to use as origin.
43   vtkSetVector3Macro(Shift,int);
44   vtkGetVector3Macro(Shift,int);
45
46   // Description:
47   // Choose Mean, Minimum, Maximum, Median or sub sampling.
48   // The neighborhood operations are not centered on the sampled pixel.
49   // This may cause a half pixel shift in your output image.
50   // You can changed "Shift" to get around this.
51   // vtkImageGaussianSmooth or vtkImageMean with strides.
52   void SetAveraging(int);
53   int GetAveraging() {return this->GetMean();};
54   vtkBooleanMacro(Averaging,int);
55   
56   void SetMean(int);
57   vtkGetMacro(Mean,int);
58   vtkBooleanMacro(Mean,int);
59   
60   void SetMinimum(int);
61   vtkGetMacro(Minimum,int);
62   vtkBooleanMacro(Minimum,int);
63   
64   void SetMaximum(int);
65   vtkGetMacro(Maximum,int);
66   vtkBooleanMacro(Maximum,int);
67   
68   void SetMedian(int);
69   vtkGetMacro(Median,int);
70   vtkBooleanMacro(Median,int);
71   
72   
73 protected:
74   vtkImageShrink3D();
75   ~vtkImageShrink3D() {};
76
77   int ShrinkFactors[3];
78   int Shift[3];
79   int Mean;
80   int Minimum;
81   int Maximum;
82   int Median;
83
84   void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
85   void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
86   void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
87   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, 
88                        int ext[6], int id);  
89 private:
90   vtkImageShrink3D(const vtkImageShrink3D&);  // Not implemented.
91   void operator=(const vtkImageShrink3D&);  // Not implemented.
92 };
93
94 #endif
95
96
97