VTK
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 
36 class vtkDataObject;
37 class vtkImageData;
38 
39 class VTKFILTERSCORE_EXPORT vtkResampleToImage : public vtkAlgorithm
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
45  static vtkResampleToImage *New();
46 
48 
52  vtkSetMacro(UseInputBounds, bool);
53  vtkGetMacro(UseInputBounds, bool);
54  vtkBooleanMacro(UseInputBounds, bool);
56 
58 
62  vtkSetVector6Macro(SamplingBounds, double);
63  vtkGetVector6Macro(SamplingBounds, double);
65 
67 
70  vtkSetVector3Macro(SamplingDimensions, int);
71  vtkGetVector3Macro(SamplingDimensions, int);
73 
77  vtkImageData* GetOutput();
78 
79 protected:
81  ~vtkResampleToImage() override;
82 
83  // Usual data generation method
85  vtkInformationVector*) override;
86  virtual int RequestData(vtkInformation *, vtkInformationVector **,
88  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
90  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
92  int FillInputPortInformation(int, vtkInformation *) override;
93  int FillOutputPortInformation(int, vtkInformation *) override;
94 
98  const char* GetMaskArrayName() const;
99 
104  void PerformResampling(vtkDataObject *input, const double samplingBounds[6],
105  bool computeProbingExtent, const double inputBounds[6],
106  vtkImageData *output);
107 
111  void SetBlankPointsAndCells(vtkImageData *data);
112 
117  static void ComputeDataBounds(vtkDataObject *data, double bounds[6]);
118 
119 
121  double SamplingBounds[6];
122  int SamplingDimensions[3];
123 
124 private:
125  vtkResampleToImage(const vtkResampleToImage&) = delete;
126  void operator=(const vtkResampleToImage&) = delete;
127 };
128 
129 #endif
Store vtkAlgorithm input/output information.
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
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
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
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:47
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:64