VTK  9.0.20200709
vtkResampleToImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkResampleToImage.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 =========================================================================*/
25 #ifndef vtkResampleToImage_h
26 #define vtkResampleToImage_h
27 
28 #include "vtkAlgorithm.h"
29 #include "vtkFiltersCoreModule.h" // For export macro
30 #include "vtkNew.h" // For vtkCompositeDataProbeFilter member variable
31 
32 class vtkDataObject;
33 class vtkImageData;
34 
35 class VTKFILTERSCORE_EXPORT vtkResampleToImage : public vtkAlgorithm
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
41  static vtkResampleToImage* New();
42 
44 
48  vtkSetMacro(UseInputBounds, bool);
49  vtkGetMacro(UseInputBounds, bool);
50  vtkBooleanMacro(UseInputBounds, bool);
52 
54 
58  vtkSetVector6Macro(SamplingBounds, double);
59  vtkGetVector6Macro(SamplingBounds, double);
61 
63 
66  vtkSetVector3Macro(SamplingDimensions, int);
67  vtkGetVector3Macro(SamplingDimensions, int);
69 
73  vtkImageData* GetOutput();
74 
75 protected:
77  ~vtkResampleToImage() override;
78 
79  // Usual data generation method
82  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
83  virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
84  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
85  int FillInputPortInformation(int, vtkInformation*) override;
86  int FillOutputPortInformation(int, vtkInformation*) override;
87 
91  const char* GetMaskArrayName() const;
92 
97  void PerformResampling(vtkDataObject* input, const double samplingBounds[6],
98  bool computeProbingExtent, const double inputBounds[6], vtkImageData* output);
99 
103  void SetBlankPointsAndCells(vtkImageData* data);
104 
109  static void ComputeDataBounds(vtkDataObject* data, double bounds[6]);
110 
112  double SamplingBounds[6];
113  int SamplingDimensions[3];
114 
115 private:
116  vtkResampleToImage(const vtkResampleToImage&) = delete;
117  void operator=(const vtkResampleToImage&) = delete;
118 };
119 
120 #endif
vtkResampleToImage::UseInputBounds
bool UseInputBounds
Definition: vtkResampleToImage.h:111
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:63
vtkX3D::data
Definition: vtkX3D.h:321
vtkAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkAlgorithm.h
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()
vtkNew.h
vtkAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkAlgorithm::ProcessRequest
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkResampleToImage
sample dataset on a uniform grid
Definition: vtkResampleToImage.h:35