VTK
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 =========================================================================*/
23 #ifndef vtkImageShrink3D_h
24 #define vtkImageShrink3D_h
25 
26 
27 #include "vtkImagingCoreModule.h" // For export macro
29 
30 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
31 {
32 public:
33  static vtkImageShrink3D *New();
35  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
36 
38 
41  vtkSetVector3Macro(ShrinkFactors,int);
42  vtkGetVector3Macro(ShrinkFactors,int);
44 
46 
49  vtkSetVector3Macro(Shift,int);
50  vtkGetVector3Macro(Shift,int);
52 
54 
61  void SetAveraging(int);
62  int GetAveraging() {return this->GetMean();};
63  vtkBooleanMacro(Averaging,int);
65 
66  void SetMean(int);
67  vtkGetMacro(Mean,int);
68  vtkBooleanMacro(Mean,int);
69 
70  void SetMinimum(int);
71  vtkGetMacro(Minimum,int);
72  vtkBooleanMacro(Minimum,int);
73 
74  void SetMaximum(int);
75  vtkGetMacro(Maximum,int);
76  vtkBooleanMacro(Maximum,int);
77 
78  void SetMedian(int);
79  vtkGetMacro(Median,int);
80  vtkBooleanMacro(Median,int);
81 
82 protected:
84  ~vtkImageShrink3D()VTK_OVERRIDE {}
85 
86  int ShrinkFactors[3];
87  int Shift[3];
88  int Mean;
89  int Minimum;
90  int Maximum;
91  int Median;
92 
94  int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
95 
96  void ThreadedRequestData(vtkInformation *request,
97  vtkInformationVector **inputVector,
98  vtkInformationVector *outputVector,
99  vtkImageData ***inData, vtkImageData **outData,
100  int ext[6], int id) VTK_OVERRIDE;
101 
102  void InternalRequestUpdateExtent(int *inExt, int *outExt);
103 
104 private:
105  vtkImageShrink3D(const vtkImageShrink3D&) VTK_DELETE_FUNCTION;
106  void operator=(const vtkImageShrink3D&) VTK_DELETE_FUNCTION;
107 };
108 
109 #endif
110 
111 
112 
Store vtkAlgorithm input/output information.
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
int GetAveraging()
Choose Mean, Minimum, Maximum, Median or sub sampling.
~vtkImageShrink3D() override
Subsamples an image.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.