VTK  9.0.1
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 =========================================================================*/
23 #ifndef vtkImageShrink3D_h
24 #define vtkImageShrink3D_h
25 
26 #include "vtkImagingCoreModule.h" // For export macro
28 
29 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
30 {
31 public:
32  static vtkImageShrink3D* New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
37 
40  vtkSetVector3Macro(ShrinkFactors, int);
41  vtkGetVector3Macro(ShrinkFactors, int);
43 
45 
48  vtkSetVector3Macro(Shift, int);
49  vtkGetVector3Macro(Shift, int);
51 
53 
60  void SetAveraging(vtkTypeBool);
61  vtkTypeBool GetAveraging() { return this->GetMean(); }
62  vtkBooleanMacro(Averaging, vtkTypeBool);
64 
65  void SetMean(vtkTypeBool);
66  vtkGetMacro(Mean, vtkTypeBool);
67  vtkBooleanMacro(Mean, vtkTypeBool);
68 
69  void SetMinimum(vtkTypeBool);
70  vtkGetMacro(Minimum, vtkTypeBool);
71  vtkBooleanMacro(Minimum, vtkTypeBool);
72 
73  void SetMaximum(vtkTypeBool);
74  vtkGetMacro(Maximum, vtkTypeBool);
75  vtkBooleanMacro(Maximum, vtkTypeBool);
76 
77  void SetMedian(vtkTypeBool);
78  vtkGetMacro(Median, vtkTypeBool);
79  vtkBooleanMacro(Median, vtkTypeBool);
80 
81 protected:
83  ~vtkImageShrink3D() override {}
84 
85  int ShrinkFactors[3];
86  int Shift[3];
87  int Mean;
91 
94 
95  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
96  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
97  int id) override;
98 
99  void InternalRequestUpdateExtent(int* inExt, int* outExt);
100 
101 private:
102  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
103  void operator=(const vtkImageShrink3D&) = delete;
104 };
105 
106 #endif
vtkThreadedImageAlgorithm::ThreadedRequestData
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,...
vtkImageShrink3D::~vtkImageShrink3D
~vtkImageShrink3D() override
Definition: vtkImageShrink3D.h:83
vtkImageShrink3D::Median
vtkTypeBool Median
Definition: vtkImageShrink3D.h:90
vtkImageShrink3D::Maximum
vtkTypeBool Maximum
Definition: vtkImageShrink3D.h:89
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageShrink3D::GetAveraging
vtkTypeBool GetAveraging()
Definition: vtkImageShrink3D.h:61
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:37
vtkThreadedImageAlgorithm.h
vtkImageShrink3D::Minimum
vtkTypeBool Minimum
Definition: vtkImageShrink3D.h:88
vtkImageShrink3D::Mean
int Mean
Definition: vtkImageShrink3D.h:87
vtkImageAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkThreadedImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkImageShrink3D
Subsamples an image.
Definition: vtkImageShrink3D.h:29