VTK  9.3.0
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
26 #ifndef vtkImageShrink3D_h
27 #define vtkImageShrink3D_h
28 
29 #include "vtkImagingCoreModule.h" // For export macro
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
34 {
35 public:
36  static vtkImageShrink3D* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
44  vtkSetVector3Macro(ShrinkFactors, int);
45  vtkGetVector3Macro(ShrinkFactors, int);
47 
49 
52  vtkSetVector3Macro(Shift, int);
53  vtkGetVector3Macro(Shift, int);
55 
57 
65  vtkTypeBool GetAveraging() { return this->GetMean(); }
66  vtkBooleanMacro(Averaging, vtkTypeBool);
68 
70  vtkGetMacro(Mean, vtkTypeBool);
71  vtkBooleanMacro(Mean, vtkTypeBool);
72 
74  vtkGetMacro(Minimum, vtkTypeBool);
75  vtkBooleanMacro(Minimum, vtkTypeBool);
76 
78  vtkGetMacro(Maximum, vtkTypeBool);
79  vtkBooleanMacro(Maximum, vtkTypeBool);
80 
82  vtkGetMacro(Median, vtkTypeBool);
83  vtkBooleanMacro(Median, vtkTypeBool);
84 
85 protected:
87  ~vtkImageShrink3D() override = default;
88 
89  int ShrinkFactors[3];
90  int Shift[3];
91  int Mean;
95 
98 
100  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
101  int id) override;
102 
103  void InternalRequestUpdateExtent(int* inExt, int* outExt);
104 
105 private:
106  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
107  void operator=(const vtkImageShrink3D&) = delete;
108 };
109 
110 VTK_ABI_NAMESPACE_END
111 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
Subsamples an image.
vtkTypeBool Minimum
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkTypeBool Maximum
void SetAveraging(vtkTypeBool)
Choose Mean, Minimum, Maximum, Median or sub sampling.
void SetMean(vtkTypeBool)
vtkTypeBool Median
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:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:64