1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkImageShrink3D.h,v $
6 Date: $Date: 2002/01/22 15:33:26 $
7 Version: $Revision: 1.38 $
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 vtkImageShrink3D - Subsamples an image.
19 // .SECTION Description
20 // vtkImageShrink3D shrinks an image by sub sampling on a
21 // uniform grid (integer multiples).
23 #ifndef __vtkImageShrink3D_h
24 #define __vtkImageShrink3D_h
27 #include "vtkImageToImageFilter.h"
29 class VTK_IMAGING_EXPORT vtkImageShrink3D : public vtkImageToImageFilter
32 static vtkImageShrink3D *New();
33 vtkTypeRevisionMacro(vtkImageShrink3D,vtkImageToImageFilter);
34 void PrintSelf(ostream& os, vtkIndent indent);
37 // Set/Get the shrink factors
38 vtkSetVector3Macro(ShrinkFactors,int);
39 vtkGetVector3Macro(ShrinkFactors,int);
42 // Set/Get the pixel to use as origin.
43 vtkSetVector3Macro(Shift,int);
44 vtkGetVector3Macro(Shift,int);
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);
57 vtkGetMacro(Mean,int);
58 vtkBooleanMacro(Mean,int);
61 vtkGetMacro(Minimum,int);
62 vtkBooleanMacro(Minimum,int);
65 vtkGetMacro(Maximum,int);
66 vtkBooleanMacro(Maximum,int);
69 vtkGetMacro(Median,int);
70 vtkBooleanMacro(Median,int);
75 ~vtkImageShrink3D() {};
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,
90 vtkImageShrink3D(const vtkImageShrink3D&); // Not implemented.
91 void operator=(const vtkImageShrink3D&); // Not implemented.