VTK
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 
27 #include "vtkImagingCoreModule.h" // For export macro
29 
30 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
31 {
32 public:
33  static vtkImageShrink3D *New();
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
41  vtkSetVector3Macro(ShrinkFactors,int);
42  vtkGetVector3Macro(ShrinkFactors,int);
44 
46 
49  vtkSetVector3Macro(Shift,int);
50  vtkGetVector3Macro(Shift,int);
52 
54 
61  void SetAveraging(vtkTypeBool);
62  vtkTypeBool GetAveraging() {return this->GetMean();};
63  vtkBooleanMacro(Averaging,vtkTypeBool);
65 
66  void SetMean(vtkTypeBool);
67  vtkGetMacro(Mean,vtkTypeBool);
68  vtkBooleanMacro(Mean,vtkTypeBool);
69 
70  void SetMinimum(vtkTypeBool);
71  vtkGetMacro(Minimum,vtkTypeBool);
72  vtkBooleanMacro(Minimum,vtkTypeBool);
73 
74  void SetMaximum(vtkTypeBool);
75  vtkGetMacro(Maximum,vtkTypeBool);
76  vtkBooleanMacro(Maximum,vtkTypeBool);
77 
78  void SetMedian(vtkTypeBool);
79  vtkGetMacro(Median,vtkTypeBool);
80  vtkBooleanMacro(Median,vtkTypeBool);
81 
82 protected:
84  ~vtkImageShrink3D() override {}
85 
86  int ShrinkFactors[3];
87  int Shift[3];
88  int Mean;
92 
95 
96  void ThreadedRequestData(vtkInformation *request,
97  vtkInformationVector **inputVector,
98  vtkInformationVector *outputVector,
99  vtkImageData ***inData, vtkImageData **outData,
100  int ext[6], int id) override;
101 
102  void InternalRequestUpdateExtent(int *inExt, int *outExt);
103 
104 private:
105  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
106  void operator=(const vtkImageShrink3D&) = delete;
107 };
108 
109 #endif
110 
111 
112 
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:69
Generic filter that has one input.
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
~vtkImageShrink3D() override
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,...
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.