VTK  9.3.1
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
16 #ifndef vtkImageResample_h
17 #define vtkImageResample_h
18 
19 #include "vtkImageReslice.h"
20 #include "vtkImagingCoreModule.h" // For export macro
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class VTKIMAGINGCORE_EXPORT vtkImageResample : public vtkImageReslice
24 {
25 public:
26  static vtkImageResample* New();
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
31 
35  void SetOutputSpacing(double sx, double sy, double sz) override;
36  void SetOutputSpacing(const double spacing[3]) override
37  {
38  this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]);
39  }
40  void SetAxisOutputSpacing(int axis, double spacing);
42 
44 
48  void SetMagnificationFactors(double fx, double fy, double fz);
49  void SetMagnificationFactors(const double f[3])
50  {
51  this->SetMagnificationFactors(f[0], f[1], f[2]);
52  }
53  vtkGetVector3Macro(MagnificationFactors, double);
54  void SetAxisMagnificationFactor(int axis, double factor);
56 
61  double GetAxisMagnificationFactor(int axis, vtkInformation* inInfo = nullptr);
62 
64 
70  vtkSetMacro(Dimensionality, int);
71  vtkGetMacro(Dimensionality, int);
73 
74 protected:
76  ~vtkImageResample() override = default;
77 
78  double MagnificationFactors[3];
80 
82 
83 private:
84  vtkImageResample(const vtkImageResample&) = delete;
85  void operator=(const vtkImageResample&) = delete;
86 };
87 
88 VTK_ABI_NAMESPACE_END
89 #endif
Store vtkAlgorithm input/output information.
Resamples an image to be larger or smaller.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
static vtkImageReslice * New()
virtual void SetOutputSpacing(double x, double y, double z)
Set the voxel spacing for the output data.
void SetOutputSpacing(const double spacing[3]) override
Set desired spacing.
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Reslices a volume along a new set of axes.
void SetMagnificationFactors(const double f[3])
Set/Get Magnification factors.
Store zero or more vtkInformation instances.