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 
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 
79 
80 protected:
82  ~vtkResampleToImage() override;
83 
84  // Usual data generation method
86  vtkInformationVector*) 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 
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
vtkResampleToImage::PerformResampling
void PerformResampling(vtkDataObject *input, const double samplingBounds[6], bool computeProbingExtent, const double inputBounds[6], vtkImageData *output)
Resample input vtkDataObject to a vtkImageData with the specified bounds and extent.
vtkResampleToImage::~vtkResampleToImage
~vtkResampleToImage() override
vtkResampleToImage::UseInputBounds
bool UseInputBounds
Definition: vtkResampleToImage.h:121
vtkResampleToImage::SetBlankPointsAndCells
void SetBlankPointsAndCells(vtkImageData *data)
Mark invalid points and cells of vtkImageData as hidden.
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkResampleToImage::GetMaskArrayName
const char * GetMaskArrayName() const
Get the name of the valid-points mask array.
vtkResampleToImage::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkResampleToImage::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkResampleToImage::GetOutput
vtkImageData * GetOutput()
Get the output data for this algorithm.
vtkAlgorithm.h
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkResampleToImage::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkResampleToImage::ProcessRequest
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkResampleToImage::vtkResampleToImage
vtkResampleToImage()
vtkNew< vtkCompositeDataProbeFilter >
vtkResampleToImage::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *) override
Fill the input port information objects for this algorithm.
vtkCompositeDataProbeFilter
subclass of vtkProbeFilter which supports composite datasets in the input.
Definition: vtkCompositeDataProbeFilter.h:46
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkNew.h
vtkResampleToImage::New
static vtkResampleToImage * New()
vtkResampleToImage::ComputeDataBounds
static void ComputeDataBounds(vtkDataObject *data, double bounds[6])
Helper function to compute the bounds of the given vtkDataSet or vtkCompositeDataSet.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkResampleToImage::Prober
vtkNew< vtkCompositeDataProbeFilter > Prober
Definition: vtkResampleToImage.h:124
vtkResampleToImage::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkResampleToImage::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkResampleToImage
sample dataset on a uniform grid
Definition: vtkResampleToImage.h:41