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 =========================================================================*/
28 #ifndef vtkImageResample_h
29 #define vtkImageResample_h
30 
31 #include "vtkImageReslice.h"
32 #include "vtkImagingCoreModule.h" // For export macro
33 
34 class VTKIMAGINGCORE_EXPORT vtkImageResample : public vtkImageReslice
35 {
36 public:
37  static vtkImageResample* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
46  void SetOutputSpacing(double sx, double sy, double sz) override;
47  void SetOutputSpacing(const double spacing[3]) override
48  {
49  this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]);
50  }
51  void SetAxisOutputSpacing(int axis, double spacing);
53 
55 
59  void SetMagnificationFactors(double fx, double fy, double fz);
60  void SetMagnificationFactors(const double f[3])
61  {
62  this->SetMagnificationFactors(f[0], f[1], f[2]);
63  }
64  vtkGetVector3Macro(MagnificationFactors, double);
65  void SetAxisMagnificationFactor(int axis, double factor);
67 
72  double GetAxisMagnificationFactor(int axis, vtkInformation* inInfo = nullptr);
73 
75 
81  vtkSetMacro(Dimensionality, int);
82  vtkGetMacro(Dimensionality, int);
84 
85 protected:
87  ~vtkImageResample() override = default;
88 
89  double MagnificationFactors[3];
91 
93 
94 private:
95  vtkImageResample(const vtkImageResample&) = delete;
96  void operator=(const vtkImageResample&) = delete;
97 };
98 
99 #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:39
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.