VTK  9.2.5
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 =========================================================================*/
78 #ifndef vtkImageShrink3D_h
79 #define vtkImageShrink3D_h
80 
81 #include "vtkImagingCoreModule.h" // For export macro
83 
84 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
85 {
86 public:
87  static vtkImageShrink3D* New();
89  void PrintSelf(ostream& os, vtkIndent indent) override;
90 
92 
95  vtkSetVector3Macro(ShrinkFactors, int);
96  vtkGetVector3Macro(ShrinkFactors, int);
98 
100 
103  vtkSetVector3Macro(Shift, int);
104  vtkGetVector3Macro(Shift, int);
106 
108 
116  vtkTypeBool GetAveraging() { return this->GetMean(); }
117  vtkBooleanMacro(Averaging, vtkTypeBool);
119 
121  vtkGetMacro(Mean, vtkTypeBool);
122  vtkBooleanMacro(Mean, vtkTypeBool);
123 
125  vtkGetMacro(Minimum, vtkTypeBool);
126  vtkBooleanMacro(Minimum, vtkTypeBool);
127 
129  vtkGetMacro(Maximum, vtkTypeBool);
130  vtkBooleanMacro(Maximum, vtkTypeBool);
131 
133  vtkGetMacro(Median, vtkTypeBool);
134  vtkBooleanMacro(Median, vtkTypeBool);
135 
136 protected:
138  ~vtkImageShrink3D() override = default;
139 
140  int ShrinkFactors[3];
141  int Shift[3];
142  int Mean;
146 
149 
151  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
152  int id) override;
153 
154  void InternalRequestUpdateExtent(int* inExt, int* outExt);
155 
156 private:
157  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
158  void operator=(const vtkImageShrink3D&) = delete;
159 };
160 
161 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:163
Subsamples an image.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetAveraging(vtkTypeBool)
Choose Mean, Minimum, Maximum, Median or sub sampling.
void SetMean(vtkTypeBool)
static vtkImageShrink3D * New()
void SetMinimum(vtkTypeBool)
~vtkImageShrink3D() override=default
vtkTypeBool GetAveraging()
Choose Mean, Minimum, Maximum, Median or sub sampling.
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int ext[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetMedian(vtkTypeBool)
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
void SetMaximum(vtkTypeBool)
void InternalRequestUpdateExtent(int *inExt, int *outExt)
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:69