VTK  9.4.20241219
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
35#ifndef vtkImageResample_h
36#define vtkImageResample_h
37
38#include "vtkImageReslice.h"
39#include "vtkImagingCoreModule.h" // For export macro
40
41VTK_ABI_NAMESPACE_BEGIN
42class VTKIMAGINGCORE_EXPORT vtkImageResample : public vtkImageReslice
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
54 void SetOutputSpacing(double sx, double sy, double sz) override;
55 void SetOutputSpacing(const double spacing[3]) override
56 {
57 this->SetOutputSpacing(spacing[0], spacing[1], spacing[2]);
58 }
59 void SetAxisOutputSpacing(int axis, double spacing);
61
63
67 void SetMagnificationFactors(double fx, double fy, double fz);
68 void SetMagnificationFactors(const double f[3])
69 {
70 this->SetMagnificationFactors(f[0], f[1], f[2]);
71 }
72 vtkGetVector3Macro(MagnificationFactors, double);
73 void SetAxisMagnificationFactor(int axis, double factor);
75
80 double GetAxisMagnificationFactor(int axis, vtkInformation* inInfo = nullptr);
81
83
89 vtkSetMacro(Dimensionality, int);
90 vtkGetMacro(Dimensionality, int);
92
93protected:
95 ~vtkImageResample() override = default;
96
97 double MagnificationFactors[3];
99
101
102private:
103 vtkImageResample(const vtkImageResample&) = delete;
104 void operator=(const vtkImageResample&) = delete;
105};
106
107VTK_ABI_NAMESPACE_END
108#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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.