VTK  9.3.1
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
17 #ifndef vtkImageShrink3D_h
18 #define vtkImageShrink3D_h
19 
20 #include "vtkImagingCoreModule.h" // For export macro
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
25 {
26 public:
27  static vtkImageShrink3D* New();
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
35  vtkSetVector3Macro(ShrinkFactors, int);
36  vtkGetVector3Macro(ShrinkFactors, int);
38 
40 
43  vtkSetVector3Macro(Shift, int);
44  vtkGetVector3Macro(Shift, int);
46 
48 
55  void SetAveraging(vtkTypeBool);
56  vtkTypeBool GetAveraging() { return this->GetMean(); }
57  vtkBooleanMacro(Averaging, vtkTypeBool);
59 
60  void SetMean(vtkTypeBool);
61  vtkGetMacro(Mean, vtkTypeBool);
62  vtkBooleanMacro(Mean, vtkTypeBool);
63 
64  void SetMinimum(vtkTypeBool);
65  vtkGetMacro(Minimum, vtkTypeBool);
66  vtkBooleanMacro(Minimum, vtkTypeBool);
67 
68  void SetMaximum(vtkTypeBool);
69  vtkGetMacro(Maximum, vtkTypeBool);
70  vtkBooleanMacro(Maximum, vtkTypeBool);
71 
72  void SetMedian(vtkTypeBool);
73  vtkGetMacro(Median, vtkTypeBool);
74  vtkBooleanMacro(Median, vtkTypeBool);
75 
76 protected:
78  ~vtkImageShrink3D() override = default;
79 
80  int ShrinkFactors[3];
81  int Shift[3];
82  int Mean;
86 
89 
90  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
91  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
92  int id) override;
93 
94  void InternalRequestUpdateExtent(int* inExt, int* outExt);
95 
96 private:
97  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
98  void operator=(const vtkImageShrink3D&) = delete;
99 };
100 
101 VTK_ABI_NAMESPACE_END
102 #endif
vtkTypeBool Minimum
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 ...
vtkTypeBool Median
int vtkTypeBool
Definition: vtkABI.h:64
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
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, multiple threads will be spawned, and each thread will call this method.
vtkTypeBool GetAveraging()
Choose Mean, Minimum, Maximum, Median or sub sampling.
vtkTypeBool Maximum
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.