VTK  9.2.6
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 =========================================================================*/
28 #ifndef vtkResampleToImage_h
29 #define vtkResampleToImage_h
30 
31 #include "vtkAlgorithm.h"
32 #include "vtkFiltersCoreModule.h" // For export macro
33 #include "vtkNew.h" // For vtkCompositeDataProbeFilter member variable
34 
35 class vtkDataObject;
36 class vtkImageData;
37 
38 class VTKFILTERSCORE_EXPORT vtkResampleToImage : public vtkAlgorithm
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  static vtkResampleToImage* New();
45 
47 
51  vtkSetMacro(UseInputBounds, bool);
52  vtkGetMacro(UseInputBounds, bool);
53  vtkBooleanMacro(UseInputBounds, bool);
55 
57 
61  vtkSetVector6Macro(SamplingBounds, double);
62  vtkGetVector6Macro(SamplingBounds, double);
64 
66 
69  vtkSetVector3Macro(SamplingDimensions, int);
70  vtkGetVector3Macro(SamplingDimensions, int);
72 
76  vtkImageData* GetOutput();
77 
81  const char* GetMaskArrayName() const;
82 
83 protected:
85  ~vtkResampleToImage() override;
86 
87  // Usual data generation method
90  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
91  virtual int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
92  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
93  int FillInputPortInformation(int, vtkInformation*) override;
94  int FillOutputPortInformation(int, vtkInformation*) override;
95 
100  void PerformResampling(vtkDataObject* input, const double samplingBounds[6],
101  bool computeProbingExtent, const double inputBounds[6], vtkImageData* output);
102 
106  void SetBlankPointsAndCells(vtkImageData* data);
107 
112  static void ComputeDataBounds(vtkDataObject* data, double bounds[6]);
113 
115  double SamplingBounds[6];
116  int SamplingDimensions[3];
117 
118 private:
119  vtkResampleToImage(const vtkResampleToImage&) = delete;
120  void operator=(const vtkResampleToImage&) = delete;
121 };
122 
123 #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:69
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:62
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:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
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()
general representation of visualization data
Definition: vtkDataObject.h:65