VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkImageShrink3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageShrink3D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef __vtkImageShrink3D_h
29 #define __vtkImageShrink3D_h
30 
31 
32 #include "vtkImagingCoreModule.h" // For export macro
33 #include "vtkThreadedImageAlgorithm.h"
34 
35 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
36 {
37 public:
38  static vtkImageShrink3D *New();
39  vtkTypeMacro(vtkImageShrink3D,vtkThreadedImageAlgorithm);
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
43 
44  vtkSetVector3Macro(ShrinkFactors,int);
45  vtkGetVector3Macro(ShrinkFactors,int);
47 
49 
50  vtkSetVector3Macro(Shift,int);
51  vtkGetVector3Macro(Shift,int);
53 
55 
60  void SetAveraging(int);
61  int GetAveraging() {return this->GetMean();};
62  vtkBooleanMacro(Averaging,int);
64 
65  void SetMean(int);
66  vtkGetMacro(Mean,int);
67  vtkBooleanMacro(Mean,int);
68 
69  void SetMinimum(int);
70  vtkGetMacro(Minimum,int);
71  vtkBooleanMacro(Minimum,int);
72 
73  void SetMaximum(int);
74  vtkGetMacro(Maximum,int);
75  vtkBooleanMacro(Maximum,int);
76 
77  void SetMedian(int);
78  vtkGetMacro(Median,int);
79  vtkBooleanMacro(Median,int);
80 
81 protected:
84 
85  int ShrinkFactors[3];
86  int Shift[3];
87  int Mean;
88  int Minimum;
89  int Maximum;
90  int Median;
91 
92  virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
93  virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
94 
95  void ThreadedRequestData(vtkInformation *request,
96  vtkInformationVector **inputVector,
97  vtkInformationVector *outputVector,
98  vtkImageData ***inData, vtkImageData **outData,
99  int ext[6], int id);
100 
101  void InternalRequestUpdateExtent(int *inExt, int *outExt);
102 
103 private:
104  vtkImageShrink3D(const vtkImageShrink3D&); // Not implemented.
105  void operator=(const vtkImageShrink3D&); // Not implemented.
106 };
107 
108 #endif
109 
110 
111 
Subsamples an image.