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 =========================================================================*/
25 #ifndef vtkResampleToImage_h
26 #define vtkResampleToImage_h
27 
28 #include "vtkAlgorithm.h"
29 #include "vtkFiltersCoreModule.h" // For export macro
30 #include "vtkNew.h" // For vtkCompositeDataProbeFilter member variable
31 
32 
33 class vtkDataObject;
34 class vtkImageData;
36 
37 class VTKFILTERSCORE_EXPORT vtkResampleToImage : public vtkAlgorithm
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
42 
43  static vtkResampleToImage *New();
44 
46 
50  vtkSetMacro(UseInputBounds, bool);
51  vtkGetMacro(UseInputBounds, bool);
52  vtkBooleanMacro(UseInputBounds, bool);
54 
56 
60  vtkSetVector6Macro(SamplingBounds, double);
61  vtkGetVector6Macro(SamplingBounds, double);
63 
65 
68  vtkSetVector3Macro(SamplingDimensions, int);
69  vtkGetVector3Macro(SamplingDimensions, int);
71 
75  vtkImageData* GetOutput();
76 
77 protected:
79  ~vtkResampleToImage() VTK_OVERRIDE;
80 
81  // Usual data generation method
82  int ProcessRequest(vtkInformation*, vtkInformationVector**,
83  vtkInformationVector*) VTK_OVERRIDE;
84  virtual int RequestData(vtkInformation *, vtkInformationVector **,
85  vtkInformationVector *);
86  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
87  vtkInformationVector *);
88  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
89  vtkInformationVector *);
90  int FillInputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
91  int FillOutputPortInformation(int, vtkInformation *) VTK_OVERRIDE;
92 
96  const char* GetMaskArrayName() const;
97 
102  void PerformResampling(vtkDataObject *input, const double samplingBounds[6],
103  bool computeProbingExtent, const double inputBounds[6],
104  vtkImageData *output);
105 
109  void SetBlankPointsAndCells(vtkImageData *data);
110 
115  static void ComputeDataBounds(vtkDataObject *data, double bounds[6]);
116 
117 
118  bool UseInputBounds;
119  double SamplingBounds[6];
120  int SamplingDimensions[3];
122 
123 private:
124  vtkResampleToImage(const vtkResampleToImage&) VTK_DELETE_FUNCTION;
125  void operator=(const vtkResampleToImage&) VTK_DELETE_FUNCTION;
126 };
127 
128 #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:53
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Allocate and hold a VTK object.
Definition: vtkNew.h:61
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:58