VTK  9.1.0
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 =========================================================================*/
44 #ifndef vtkImageResample_h
45 #define vtkImageResample_h
46 
47 #include "vtkImageReslice.h"
48 #include "vtkImagingCoreModule.h" // For export macro
49 
50 class VTKIMAGINGCORE_EXPORT vtkImageResample : public vtkImageReslice
51 {
52 public:
53  static vtkImageResample* New();
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
58 
62  void SetOutputSpacing(double sx, double sy, double sz) override;
63  void SetOutputSpacing(const double spacing[3]) override
64  {
65  this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]);
66  }
67  void SetAxisOutputSpacing(int axis, double spacing);
69 
71 
75  void SetMagnificationFactors(double fx, double fy, double fz);
76  void SetMagnificationFactors(const double f[3])
77  {
78  this->SetMagnificationFactors(f[0], f[1], f[2]);
79  }
80  vtkGetVector3Macro(MagnificationFactors, double);
81  void SetAxisMagnificationFactor(int axis, double factor);
83 
88  double GetAxisMagnificationFactor(int axis, vtkInformation* inInfo = nullptr);
89 
91 
97  vtkSetMacro(Dimensionality, int);
98  vtkGetMacro(Dimensionality, int);
100 
101 protected:
103  ~vtkImageResample() override = default;
104 
105  double MagnificationFactors[3];
107 
109 
110 private:
111  vtkImageResample(const vtkImageResample&) = delete;
112  void operator=(const vtkImageResample&) = delete;
113 };
114 
115 #endif
vtkImageReslice.h
vtkImageResample::SetMagnificationFactors
void SetMagnificationFactors(const double f[3])
Set/Get Magnification factors.
Definition: vtkImageResample.h:76
vtkImageResample::Dimensionality
int Dimensionality
Definition: vtkImageResample.h:106
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkImageResample::SetMagnificationFactors
void SetMagnificationFactors(double fx, double fy, double fz)
Set/Get Magnification factors.
vtkImageResample::SetOutputSpacing
void SetOutputSpacing(double sx, double sy, double sz) override
Set desired spacing.
vtkImageResample::New
static vtkImageResample * New()
vtkImageResample
Resamples an image to be larger or smaller.
Definition: vtkImageResample.h:51
vtkImageReslice::SetOutputSpacing
virtual void SetOutputSpacing(double x, double y, double z)
Set the voxel spacing for the output data.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkImageResample::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageReslice
Reslices a volume along a new set of axes.
Definition: vtkImageReslice.h:110
vtkImageResample::vtkImageResample
vtkImageResample()
vtkImageResample::GetAxisMagnificationFactor
double GetAxisMagnificationFactor(int axis, vtkInformation *inInfo=nullptr)
Get the computed magnification factor for a specific axis.
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:487
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkImageResample::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageResample::SetOutputSpacing
void SetOutputSpacing(const double spacing[3]) override
Set desired spacing.
Definition: vtkImageResample.h:63
vtkImageResample::SetAxisOutputSpacing
void SetAxisOutputSpacing(int axis, double spacing)
Set desired spacing.
vtkImageResample::~vtkImageResample
~vtkImageResample() override=default
vtkImageResample::SetAxisMagnificationFactor
void SetAxisMagnificationFactor(int axis, double factor)
Set/Get Magnification factors.