VTK  9.3.20240328
vtkImageShrink3D.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
76 #ifndef vtkImageShrink3D_h
77 #define vtkImageShrink3D_h
78 
79 #include "vtkImagingCoreModule.h" // For export macro
81 
82 VTK_ABI_NAMESPACE_BEGIN
83 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
84 {
85 public:
86  static vtkImageShrink3D* New();
88  void PrintSelf(ostream& os, vtkIndent indent) override;
89 
91 
94  vtkSetVector3Macro(ShrinkFactors, int);
95  vtkGetVector3Macro(ShrinkFactors, int);
97 
99 
102  vtkSetVector3Macro(Shift, int);
103  vtkGetVector3Macro(Shift, int);
105 
107 
115  vtkTypeBool GetAveraging() { return this->GetMean(); }
116  vtkBooleanMacro(Averaging, vtkTypeBool);
118 
120  vtkGetMacro(Mean, vtkTypeBool);
121  vtkBooleanMacro(Mean, vtkTypeBool);
122 
124  vtkGetMacro(Minimum, vtkTypeBool);
125  vtkBooleanMacro(Minimum, vtkTypeBool);
126 
128  vtkGetMacro(Maximum, vtkTypeBool);
129  vtkBooleanMacro(Maximum, vtkTypeBool);
130 
132  vtkGetMacro(Median, vtkTypeBool);
133  vtkBooleanMacro(Median, vtkTypeBool);
134 
135 protected:
137  ~vtkImageShrink3D() override = default;
138 
139  int ShrinkFactors[3];
140  int Shift[3];
141  int Mean;
145 
148 
150  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
151  int id) override;
152 
153  void InternalRequestUpdateExtent(int* inExt, int* outExt);
154 
155 private:
156  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
157  void operator=(const vtkImageShrink3D&) = delete;
158 };
159 
160 VTK_ABI_NAMESPACE_END
161 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:155
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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:64