VTK  9.2.6
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 =========================================================================*/
38 #ifndef vtkImageShrink3D_h
39 #define vtkImageShrink3D_h
40 
41 #include "vtkImagingCoreModule.h" // For export macro
43 
44 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
45 {
46 public:
47  static vtkImageShrink3D* New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
55  vtkSetVector3Macro(ShrinkFactors, int);
56  vtkGetVector3Macro(ShrinkFactors, int);
58 
60 
63  vtkSetVector3Macro(Shift, int);
64  vtkGetVector3Macro(Shift, int);
66 
68 
76  vtkTypeBool GetAveraging() { return this->GetMean(); }
77  vtkBooleanMacro(Averaging, vtkTypeBool);
79 
81  vtkGetMacro(Mean, vtkTypeBool);
82  vtkBooleanMacro(Mean, vtkTypeBool);
83 
85  vtkGetMacro(Minimum, vtkTypeBool);
86  vtkBooleanMacro(Minimum, vtkTypeBool);
87 
89  vtkGetMacro(Maximum, vtkTypeBool);
90  vtkBooleanMacro(Maximum, vtkTypeBool);
91 
93  vtkGetMacro(Median, vtkTypeBool);
94  vtkBooleanMacro(Median, vtkTypeBool);
95 
96 protected:
98  ~vtkImageShrink3D() override = default;
99 
100  int ShrinkFactors[3];
101  int Shift[3];
102  int Mean;
106 
109 
111  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
112  int id) override;
113 
114  void InternalRequestUpdateExtent(int* inExt, int* outExt);
115 
116 private:
117  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
118  void operator=(const vtkImageShrink3D&) = delete;
119 };
120 
121 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:63
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:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:69