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 =========================================================================*/
31 #ifndef vtkImageResample_h
32 #define vtkImageResample_h
33 
34 
35 #include "vtkImagingCoreModule.h" // For export macro
36 #include "vtkImageReslice.h"
37 
38 class VTKIMAGINGCORE_EXPORT vtkImageResample : public vtkImageReslice
39 {
40 public:
41  static vtkImageResample *New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
50  void SetOutputSpacing(double sx, double sy, double sz) override;
51  void SetOutputSpacing(const double spacing[3]) override {
52  this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]); }
53  void SetAxisOutputSpacing(int axis, double spacing);
55 
57 
61  void SetMagnificationFactors(double fx, double fy, double fz);
62  void SetMagnificationFactors(const double f[3]) {
63  this->SetMagnificationFactors(f[0], f[1], f[2]); }
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 {}
88 
89  double MagnificationFactors[3];
91 
94  vtkInformationVector *) override;
95 
96 private:
97  vtkImageResample(const vtkImageResample&) = delete;
98  void operator=(const vtkImageResample&) = delete;
99 };
100 
101 #endif
~vtkImageResample() override
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.