VTK
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 =========================================================================*/
25 #ifndef vtkImageResample_h
26 #define vtkImageResample_h
27 
28 
29 #include "vtkImagingCoreModule.h" // For export macro
30 #include "vtkImageReslice.h"
31 
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  this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]); }
47  void SetAxisOutputSpacing(int axis, double spacing);
49 
51 
55  void SetMagnificationFactors(double fx, double fy, double fz);
56  void SetMagnificationFactors(const double f[3]) {
57  this->SetMagnificationFactors(f[0], f[1], f[2]); }
58  vtkGetVector3Macro(MagnificationFactors, double);
59  void SetAxisMagnificationFactor(int axis, double factor);
61 
66  double GetAxisMagnificationFactor(int axis, vtkInformation *inInfo=nullptr);
67 
69 
75  vtkSetMacro(Dimensionality,int);
76  vtkGetMacro(Dimensionality,int);
78 
79 protected:
81  ~vtkImageResample() override {}
82 
83  double MagnificationFactors[3];
85 
88  vtkInformationVector *) override;
89 
90 private:
91  vtkImageResample(const vtkImageResample&) = delete;
92  void operator=(const vtkImageResample&) = delete;
93 };
94 
95 #endif
vtkImageReslice.h
vtkImageResample::SetMagnificationFactors
void SetMagnificationFactors(const double f[3])
Definition: vtkImageResample.h:56
vtkImageResample::Dimensionality
int Dimensionality
Definition: vtkImageResample.h:84
vtkImageReslice::New
static vtkImageReslice * New()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageReslice::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageReslice::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageResample
Resamples an image to be larger or smaller.
Definition: vtkImageResample.h:32
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:33
vtkImageReslice
Reslices a volume along a new set of axes.
Definition: vtkImageReslice.h:71
vtkX3D::spacing
Definition: vtkX3D.h:481
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkImageResample::~vtkImageResample
~vtkImageResample() override
Definition: vtkImageResample.h:81
vtkImageResample::SetOutputSpacing
void SetOutputSpacing(const double spacing[3]) override
Definition: vtkImageResample.h:45