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 =========================================================================*/
29 #ifndef vtkImageShrink3D_h
30 #define vtkImageShrink3D_h
31 
32 
33 #include "vtkImagingCoreModule.h" // For export macro
35 
36 class VTKIMAGINGCORE_EXPORT vtkImageShrink3D : public vtkThreadedImageAlgorithm
37 {
38 public:
39  static vtkImageShrink3D *New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  vtkSetVector3Macro(ShrinkFactors,int);
48  vtkGetVector3Macro(ShrinkFactors,int);
50 
52 
55  vtkSetVector3Macro(Shift,int);
56  vtkGetVector3Macro(Shift,int);
58 
60 
67  void SetAveraging(vtkTypeBool);
68  vtkTypeBool GetAveraging() {return this->GetMean();};
69  vtkBooleanMacro(Averaging,vtkTypeBool);
71 
72  void SetMean(vtkTypeBool);
73  vtkGetMacro(Mean,vtkTypeBool);
74  vtkBooleanMacro(Mean,vtkTypeBool);
75 
76  void SetMinimum(vtkTypeBool);
77  vtkGetMacro(Minimum,vtkTypeBool);
78  vtkBooleanMacro(Minimum,vtkTypeBool);
79 
80  void SetMaximum(vtkTypeBool);
81  vtkGetMacro(Maximum,vtkTypeBool);
82  vtkBooleanMacro(Maximum,vtkTypeBool);
83 
84  void SetMedian(vtkTypeBool);
85  vtkGetMacro(Median,vtkTypeBool);
86  vtkBooleanMacro(Median,vtkTypeBool);
87 
88 protected:
90  ~vtkImageShrink3D() override {}
91 
92  int ShrinkFactors[3];
93  int Shift[3];
94  int Mean;
98 
101 
102  void ThreadedRequestData(vtkInformation *request,
103  vtkInformationVector **inputVector,
104  vtkInformationVector *outputVector,
105  vtkImageData ***inData, vtkImageData **outData,
106  int ext[6], int id) override;
107 
108  void InternalRequestUpdateExtent(int *inExt, int *outExt);
109 
110 private:
111  vtkImageShrink3D(const vtkImageShrink3D&) = delete;
112  void operator=(const vtkImageShrink3D&) = delete;
113 };
114 
115 #endif
116 
117 
118 
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:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
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, 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.