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 =========================================================================*/
29 #ifndef vtkImageShrink3D_h
30 #define vtkImageShrink3D_h
31 
32 
33 #include "vtkImagingCoreModule.h" // For export macro
35 
36 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
37 {
38 public:
39  static vtkImageShrink3D *New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  vtkSetVector3Macro(ShrinkFactors,int);
48  vtkGetVector3Macro(ShrinkFactors,int);
50 
52 
55  vtkSetVector3Macro(Shift,int);
56  vtkGetVector3Macro(Shift,int);
58 
60 
67  void SetAveraging(int);
68  int GetAveraging() {return this->GetMean();};
69  vtkBooleanMacro(Averaging,int);
71 
72  void SetMean(int);
73  vtkGetMacro(Mean,int);
74  vtkBooleanMacro(Mean,int);
75 
76  void SetMinimum(int);
77  vtkGetMacro(Minimum,int);
78  vtkBooleanMacro(Minimum,int);
79 
80  void SetMaximum(int);
81  vtkGetMacro(Maximum,int);
82  vtkBooleanMacro(Maximum,int);
83 
84  void SetMedian(int);
85  vtkGetMacro(Median,int);
86  vtkBooleanMacro(Median,int);
87 
88 protected:
90  ~vtkImageShrink3D() override {}
91 
92  int ShrinkFactors[3];
93  int Shift[3];
94  int Mean;
95  int Minimum;
96  int Maximum;
97  int Median;
98 
101 
102  void ThreadedRequestData(vtkInformation *request,
103  vtkInformationVector **inputVector,
104  vtkInformationVector *outputVector,
105  vtkImageData ***inData, vtkImageData **outData,
106  int ext[6], int id) override;
107 
108  void InternalRequestUpdateExtent(int *inExt, int *outExt);
109 
110 private:
111  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
112  void operator=(const vtkImageShrink3D&) = delete;
113 };
114 
115 #endif
116 
117 
118 
Store vtkAlgorithm input/output information.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
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
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up,...
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.