VTK  9.3.0
vtkImageResample.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
16#ifndef vtkImageResample_h
17#define vtkImageResample_h
18
19#include "vtkImageReslice.h"
20#include "vtkImagingCoreModule.h" // For export macro
21
22VTK_ABI_NAMESPACE_BEGIN
23class VTKIMAGINGCORE_EXPORT vtkImageResample : public vtkImageReslice
24{
25public:
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
31
35 void SetOutputSpacing(double sx, double sy, double sz) override;
36 void SetOutputSpacing(const double spacing[3]) override
37 {
38 this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]);
39 }
40 void SetAxisOutputSpacing(int axis, double spacing);
42
44
48 void SetMagnificationFactors(double fx, double fy, double fz);
49 void SetMagnificationFactors(const double f[3])
50 {
51 this->SetMagnificationFactors(f[0], f[1], f[2]);
52 }
53 vtkGetVector3Macro(MagnificationFactors, double);
54 void SetAxisMagnificationFactor(int axis, double factor);
56
61 double GetAxisMagnificationFactor(int axis, vtkInformation* inInfo = nullptr);
62
64
70 vtkSetMacro(Dimensionality, int);
71 vtkGetMacro(Dimensionality, int);
73
74protected:
76 ~vtkImageResample() override = default;
77
78 double MagnificationFactors[3];
80
82
83private:
84 vtkImageResample(const vtkImageResample&) = delete;
85 void operator=(const vtkImageResample&) = delete;
86};
87
88VTK_ABI_NAMESPACE_END
89#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.
static vtkImageResample * New()
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...
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:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.