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;
39 
40 class VTKFILTERSCORE_EXPORT vtkResampleToImage : public vtkAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
46  static vtkResampleToImage *New();
47 
49 
53  vtkSetMacro(UseInputBounds, bool);
54  vtkGetMacro(UseInputBounds, bool);
55  vtkBooleanMacro(UseInputBounds, bool);
57 
59 
63  vtkSetVector6Macro(SamplingBounds, double);
64  vtkGetVector6Macro(SamplingBounds, double);
66 
68 
71  vtkSetVector3Macro(SamplingDimensions, int);
72  vtkGetVector3Macro(SamplingDimensions, int);
74 
78  vtkImageData* GetOutput();
79 
80 protected:
82  ~vtkResampleToImage() override;
83 
84  // Usual data generation method
86  vtkInformationVector*) override;
87  virtual int RequestData(vtkInformation *, vtkInformationVector **,
89  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
91  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
93  int FillInputPortInformation(int, vtkInformation *) override;
94  int FillOutputPortInformation(int, vtkInformation *) override;
95 
99  const char* GetMaskArrayName() const;
100 
105  void PerformResampling(vtkDataObject *input, const double samplingBounds[6],
106  bool computeProbingExtent, const double inputBounds[6],
107  vtkImageData *output);
108 
112  void SetBlankPointsAndCells(vtkImageData *data);
113 
118  static void ComputeDataBounds(vtkDataObject *data, double bounds[6]);
119 
120 
122  double SamplingBounds[6];
123  int SamplingDimensions[3];
125 
126 private:
127  vtkResampleToImage(const vtkResampleToImage&) = delete;
128  void operator=(const vtkResampleToImage&) = delete;
129 };
130 
131 #endif
Store vtkAlgorithm input/output information.
subclass of vtkProbeFilter which supports composite datasets in the input.
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: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()
vtkNew< vtkCompositeDataProbeFilter > Prober
general representation of visualization data
Definition: vtkDataObject.h:64