VTK  9.7.1
vtkResampleToImage.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
16 #ifndef vtkResampleToImage_h
17 #define vtkResampleToImage_h
18 
19 #include "vtkAlgorithm.h"
20 #include "vtkFiltersCoreModule.h" // For export macro
21 #include "vtkNew.h" // For vtkCompositeDataProbeFilter member variable
22 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkDataObject;
26 class vtkImageData;
27 
28 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkResampleToImage : public vtkAlgorithm
29 {
30 public:
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
34  static vtkResampleToImage* New();
35 
37 
41  vtkSetMacro(UseInputBounds, bool);
42  vtkGetMacro(UseInputBounds, bool);
43  vtkBooleanMacro(UseInputBounds, bool);
45 
47 
51  vtkSetVector6Macro(SamplingBounds, double);
52  vtkGetVector6Macro(SamplingBounds, double);
54 
56 
59  vtkSetVector3Macro(SamplingDimensions, int);
60  vtkGetVector3Macro(SamplingDimensions, int);
62 
66  vtkImageData* GetOutput();
67 
71  const char* GetMaskArrayName() const;
72 
73 protected:
75  ~vtkResampleToImage() override;
76 
77  // Usual data generation method
80  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
81  virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
82  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
83  int FillInputPortInformation(int, vtkInformation*) override;
84  int FillOutputPortInformation(int, vtkInformation*) override;
85 
90  void PerformResampling(vtkDataObject* input, const double samplingBounds[6],
91  bool computeProbingExtent, const double inputBounds[6], vtkImageData* output);
92 
96  void SetBlankPointsAndCells(vtkImageData* data);
97 
102  static void ComputeDataBounds(vtkDataObject* data, double bounds[6]);
103 
105  double SamplingBounds[6];
106  int SamplingDimensions[3];
107 
108 private:
109  vtkResampleToImage(const vtkResampleToImage&) = delete;
110  void operator=(const vtkResampleToImage&) = delete;
111 };
112 
113 VTK_ABI_NAMESPACE_END
114 #endif
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
sample dataset on a uniform grid
int vtkTypeBool
Definition: vtkABI.h:64
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_MARSHALAUTO
general representation of visualization data
Definition: vtkDataObject.h:55