VTK  9.3.0
vtkImageResample.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
25 #ifndef vtkImageResample_h
26 #define vtkImageResample_h
27 
28 #include "vtkImageReslice.h"
29 #include "vtkImagingCoreModule.h" // For export macro
30 
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKIMAGINGCORE_EXPORT vtkImageResample : public vtkImageReslice
33 {
34 public:
35  static vtkImageResample* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
44  void SetOutputSpacing(double sx, double sy, double sz) override;
45  void SetOutputSpacing(const double spacing[3]) override
46  {
47  this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]);
48  }
49  void SetAxisOutputSpacing(int axis, double spacing);
51 
53 
57  void SetMagnificationFactors(double fx, double fy, double fz);
58  void SetMagnificationFactors(const double f[3])
59  {
60  this->SetMagnificationFactors(f[0], f[1], f[2]);
61  }
62  vtkGetVector3Macro(MagnificationFactors, double);
63  void SetAxisMagnificationFactor(int axis, double factor);
65 
70  double GetAxisMagnificationFactor(int axis, vtkInformation* inInfo = nullptr);
71 
73 
79  vtkSetMacro(Dimensionality, int);
80  vtkGetMacro(Dimensionality, int);
82 
83 protected:
85  ~vtkImageResample() override = default;
86 
87  double MagnificationFactors[3];
89 
91 
92 private:
93  vtkImageResample(const vtkImageResample&) = delete;
94  void operator=(const vtkImageResample&) = delete;
95 };
96 
97 VTK_ABI_NAMESPACE_END
98 #endif
Resamples an image to be larger or smaller.
void SetAxisMagnificationFactor(int axis, double factor)
Set/Get Magnification factors.
void SetMagnificationFactors(double fx, double fy, double fz)
Set/Get Magnification factors.
void SetMagnificationFactors(const double f[3])
Set/Get Magnification factors.
~vtkImageResample() override=default
void SetOutputSpacing(const double spacing[3]) override
Set desired spacing.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double GetAxisMagnificationFactor(int axis, vtkInformation *inInfo=nullptr)
Get the computed magnification factor for a specific axis.
void SetAxisOutputSpacing(int axis, double spacing)
Set desired spacing.
void SetOutputSpacing(double sx, double sy, double sz) override
Set desired spacing.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
static vtkImageResample * New()
Reslices a volume along a new set of axes.
virtual void SetOutputSpacing(double x, double y, double z)
Set the voxel spacing for the output data.
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ spacing
Definition: vtkX3D.h:481