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) 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() override;
80 
81  // Usual data generation method
83  vtkInformationVector*) override;
84  virtual int RequestData(vtkInformation *, vtkInformationVector **,
86  virtual int RequestInformation(vtkInformation *, vtkInformationVector **,
88  virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
90  int FillInputPortInformation(int, vtkInformation *) override;
91  int FillOutputPortInformation(int, vtkInformation *) 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 
119  double SamplingBounds[6];
120  int SamplingDimensions[3];
122 
123 private:
124  vtkResampleToImage(const vtkResampleToImage&) = delete;
125  void operator=(const vtkResampleToImage&) = delete;
126 };
127 
128 #endif
vtkResampleToImage::UseInputBounds
bool UseInputBounds
Definition: vtkResampleToImage.h:118
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
vtkX3D::data
Definition: vtkX3D.h:315
vtkAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkAlgorithm.h
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkNew< vtkCompositeDataProbeFilter >
vtkCompositeDataProbeFilter
subclass of vtkProbeFilter which supports composite datasets in the input.
Definition: vtkCompositeDataProbeFilter.h:45
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkAlgorithm::ProcessRequest
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkNew.h
vtkAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkResampleToImage::Prober
vtkNew< vtkCompositeDataProbeFilter > Prober
Definition: vtkResampleToImage.h:121
vtkAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkResampleToImage
sample dataset on a uniform grid
Definition: vtkResampleToImage.h:37