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) VTK_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() VTK_OVERRIDE;
83 
84  // Usual data generation method
85  int ProcessRequest(vtkInformation*, vtkInformationVector**,
86  vtkInformationVector*) VTK_OVERRIDE;
87  virtual int RequestData(vtkInformation *, vtkInformationVector **,
88  vtkInformationVector *);
89  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
90  vtkInformationVector *);
91  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
92  vtkInformationVector *);
93  int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
94  int FillOutputPortInformation(int, vtkInformation *) VTK_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 
121  bool UseInputBounds;
122  double SamplingBounds[6];
123  int SamplingDimensions[3];
125 
126 private:
127  vtkResampleToImage(const vtkResampleToImage&) VTK_DELETE_FUNCTION;
128  void operator=(const vtkResampleToImage&) VTK_DELETE_FUNCTION;
129 };
130 
131 #endif
Store vtkAlgorithm input/output information.
subclass of vtkProbeFilter which supports composite datasets in the input.
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
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Allocate and hold a VTK object.
Definition: vtkNew.h:67
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:64