VTK  9.2.5
vtkImageBSplineCoefficients.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageBSplineCoefficients.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=========================================================================*/
51#ifndef vtkImageBSplineCoefficients_h
52#define vtkImageBSplineCoefficients_h
53
54#include "vtkImageBSplineInterpolator.h" // for constants
55#include "vtkImagingCoreModule.h" // For export macro
57
58class VTKIMAGINGCORE_EXPORT vtkImageBSplineCoefficients : public vtkThreadedImageAlgorithm
59{
60public:
63
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
67
71 vtkSetClampMacro(SplineDegree, int, 0, VTK_IMAGE_BSPLINE_DEGREE_MAX);
72 vtkGetMacro(SplineDegree, int);
74
76
86 void SetBorderModeToClamp() { this->SetBorderMode(VTK_IMAGE_BORDER_CLAMP); }
87 void SetBorderModeToRepeat() { this->SetBorderMode(VTK_IMAGE_BORDER_REPEAT); }
88 void SetBorderModeToMirror() { this->SetBorderMode(VTK_IMAGE_BORDER_MIRROR); }
89 vtkGetMacro(BorderMode, vtkImageBorderMode);
90 const char* GetBorderModeAsString();
92
94
99 vtkSetClampMacro(OutputScalarType, int, VTK_FLOAT, VTK_DOUBLE);
100 vtkGetMacro(OutputScalarType, int);
101 void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
102 void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
105
107
114 vtkSetMacro(Bypass, vtkTypeBool);
115 vtkBooleanMacro(Bypass, vtkTypeBool);
116 vtkGetMacro(Bypass, vtkTypeBool);
118
125 int CheckBounds(const double point[3]);
126
128
134 void Evaluate(const double point[3], double* value);
135 double Evaluate(double x, double y, double z);
136 double Evaluate(const double point[3]) { return this->Evaluate(point[0], point[1], point[2]); }
138
139protected:
142
143 void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent) override;
145
149
151 vtkImageData* inData, vtkImageData* outData, int outExt[6], int threadId) override;
152
159
160private:
162 void operator=(const vtkImageBSplineCoefficients&) = delete;
163};
164
165#endif
general representation of visualization data
Definition: vtkDataObject.h:66
convert image to b-spline knots
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.
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 by the superclass.
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.
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
Definition: vtkImageData.h:54
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_IMAGE_BSPLINE_DEGREE_MAX
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_FLOAT
Definition: vtkType.h:54