VTK: Imaging/Core/vtkImageShrink3D.h Source File

| 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
26 #ifndef vtkImageShrink3D_h
27 #define vtkImageShrink3D_h
28
29 #include "vtkImagingCoreModule.h" // For export macro
30 #include "vtkThreadedImageAlgorithm.h"
31
32 VTK_ABI_NAMESPACE_BEGIN
33 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
34 {
35 public:
36 static vtkImageShrink3D* New();
37 vtkTypeMacro(vtkImageShrink3D, vtkThreadedImageAlgorithm);
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
64 void SetAveraging(vtkTypeBool);
65 vtkTypeBool GetAveraging() { return this->GetMean(); }
66 vtkBooleanMacro(Averaging, vtkTypeBool);
68
69 void SetMean(vtkTypeBool);
70 vtkGetMacro(Mean, vtkTypeBool);
71 vtkBooleanMacro(Mean, vtkTypeBool);
72
73 void SetMinimum(vtkTypeBool);
74 vtkGetMacro(Minimum, vtkTypeBool);
75 vtkBooleanMacro(Minimum, vtkTypeBool);
76
77 void SetMaximum(vtkTypeBool);
78 vtkGetMacro(Maximum, vtkTypeBool);
79 vtkBooleanMacro(Maximum, vtkTypeBool);
80
81 void SetMedian(vtkTypeBool);
82 vtkGetMacro(Median, vtkTypeBool);
83 vtkBooleanMacro(Median, vtkTypeBool);
84
85 protected:
86 vtkImageShrink3D();
87 ~vtkImageShrink3D() override = default;
88
89 int ShrinkFactors[3];
90 int Shift[3];
91 int Mean;
92 vtkTypeBool Minimum;
93 vtkTypeBool Maximum;
94 vtkTypeBool Median;
95
96 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
97 int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
98
99 void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
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
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkImageShrink3D
Subsamples an image.
Definition: vtkImageShrink3D.h:34
vtkImageShrink3D::Minimum
vtkTypeBool Minimum
Definition: vtkImageShrink3D.h:92
vtkImageShrink3D::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageShrink3D::Maximum
vtkTypeBool Maximum
Definition: vtkImageShrink3D.h:93
vtkImageShrink3D::SetAveraging
void SetAveraging(vtkTypeBool)
Choose Mean, Minimum, Maximum, Median or sub sampling.
vtkImageShrink3D::SetMean
void SetMean(vtkTypeBool)
vtkImageShrink3D::vtkImageShrink3D
vtkImageShrink3D()
vtkImageShrink3D::Median
vtkTypeBool Median
Definition: vtkImageShrink3D.h:94
vtkImageShrink3D::New
static vtkImageShrink3D * New()
vtkImageShrink3D::SetMinimum
void SetMinimum(vtkTypeBool)
vtkImageShrink3D::~vtkImageShrink3D
~vtkImageShrink3D() override=default
vtkImageShrink3D::GetAveraging
vtkTypeBool GetAveraging()
Choose Mean, Minimum, Maximum, Median or sub sampling.
Definition: vtkImageShrink3D.h:65
vtkImageShrink3D::ThreadedRequestData
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,...
vtkImageShrink3D::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageShrink3D::SetMedian
void SetMedian(vtkTypeBool)
vtkImageShrink3D::Mean
int Mean
Definition: vtkImageShrink3D.h:91
vtkImageShrink3D::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageShrink3D::SetMaximum
void SetMaximum(vtkTypeBool)
vtkImageShrink3D::InternalRequestUpdateExtent
void InternalRequestUpdateExtent(int *inExt, int *outExt)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:34
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkThreadedImageAlgorithm.h