VTK  9.2.6
vtkImageResample.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageResample.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 =========================================================================*/
47 #ifndef vtkImageResample_h
48 #define vtkImageResample_h
49 
50 #include "vtkImageReslice.h"
51 #include "vtkImagingCoreModule.h" // For export macro
52 
53 class VTKIMAGINGCORE_EXPORT vtkImageResample : public vtkImageReslice
54 {
55 public:
56  static vtkImageResample* New();
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
65  void SetOutputSpacing(double sx, double sy, double sz) override;
66  void SetOutputSpacing(const double spacing[3]) override
67  {
68  this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]);
69  }
70  void SetAxisOutputSpacing(int axis, double spacing);
72 
74 
78  void SetMagnificationFactors(double fx, double fy, double fz);
79  void SetMagnificationFactors(const double f[3])
80  {
81  this->SetMagnificationFactors(f[0], f[1], f[2]);
82  }
83  vtkGetVector3Macro(MagnificationFactors, double);
84  void SetAxisMagnificationFactor(int axis, double factor);
86 
91  double GetAxisMagnificationFactor(int axis, vtkInformation* inInfo = nullptr);
92 
94 
100  vtkSetMacro(Dimensionality, int);
101  vtkGetMacro(Dimensionality, int);
103 
104 protected:
106  ~vtkImageResample() override = default;
107 
108  double MagnificationFactors[3];
110 
112 
113 private:
114  vtkImageResample(const vtkImageResample&) = delete;
115  void operator=(const vtkImageResample&) = delete;
116 };
117 
118 #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:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ spacing
Definition: vtkX3D.h:487