VTK  9.5.20251214
vtkImageBSplineCoefficients.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
38
39#ifndef vtkImageBSplineCoefficients_h
40#define vtkImageBSplineCoefficients_h
41
42#include "vtkImageBSplineInterpolator.h" // for constants
43#include "vtkImagingCoreModule.h" // For export macro
45
46VTK_ABI_NAMESPACE_BEGIN
47class VTKIMAGINGCORE_EXPORT vtkImageBSplineCoefficients : public vtkThreadedImageAlgorithm
48{
49public:
52
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
56
60 vtkSetClampMacro(SplineDegree, int, 0, VTK_IMAGE_BSPLINE_DEGREE_MAX);
61 vtkGetMacro(SplineDegree, int);
63
65
79 const char* GetBorderModeAsString();
81
83
88 vtkSetClampMacro(OutputScalarType, int, VTK_FLOAT, VTK_DOUBLE);
89 vtkGetMacro(OutputScalarType, int);
94
96
103 vtkSetMacro(Bypass, vtkTypeBool);
104 vtkBooleanMacro(Bypass, vtkTypeBool);
105 vtkGetMacro(Bypass, vtkTypeBool);
107
114 int CheckBounds(const double point[3]);
115
117
123 void Evaluate(const double point[3], double* value);
124 double Evaluate(double x, double y, double z);
125 double Evaluate(const double point[3]) { return this->Evaluate(point[0], point[1], point[2]); }
127
128protected:
131
132 void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent) override;
134
138
140 vtkImageData* inData, vtkImageData* outData, int outExt[6], int threadId) override;
141
148
149private:
151 void operator=(const vtkImageBSplineCoefficients&) = delete;
152};
153
154VTK_ABI_NAMESPACE_END
155#endif
general representation of visualization data
void Evaluate(const double point[3], double *value)
Interpolate a value from the image.
void SetOutputScalarTypeToFloat()
Set the scalar type of the output.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetBorderMode(vtkImageBorderMode)
Set the border mode.
const char * GetOutputScalarTypeAsString()
Set the scalar type of the output.
void SetOutputScalarTypeToDouble()
Set the scalar type of the output.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
const char * GetBorderModeAsString()
Set the border mode.
static vtkImageBSplineCoefficients * New()
double Evaluate(const double point[3])
Interpolate a value from the image.
vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo) override
Allocate the output data.
int CheckBounds(const double point[3])
Check a point against the image bounds.
void SetBorderModeToMirror()
Set the border mode.
void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent) override
Allocate the output data.
void SetBorderModeToRepeat()
Set the border mode.
void SetBorderModeToClamp()
Set the border mode.
virtual void SetOutputScalarType(int)
Set the scalar type of the output.
double Evaluate(double x, double y, double z)
Interpolate a value from the image.
void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int outExt[6], int threadId) override
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
~vtkImageBSplineCoefficients() override
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_IMAGE_BSPLINE_DEGREE_MAX
#define VTK_DOUBLE
Definition vtkType.h:44
#define VTK_FLOAT
Definition vtkType.h:43