VTK  9.0.2
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 =========================================================================*/
45 #ifndef vtkImageBSplineCoefficients_h
46 #define vtkImageBSplineCoefficients_h
47 
48 #include "vtkImageBSplineInterpolator.h" // for constants
49 #include "vtkImagingCoreModule.h" // For export macro
51 
52 class VTKIMAGINGCORE_EXPORT vtkImageBSplineCoefficients : public vtkThreadedImageAlgorithm
53 {
54 public:
57 
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
65  vtkSetClampMacro(SplineDegree, int, 0, VTK_IMAGE_BSPLINE_DEGREE_MAX);
66  vtkGetMacro(SplineDegree, int);
68 
70 
79  vtkSetClampMacro(BorderMode, int, VTK_IMAGE_BORDER_CLAMP, VTK_IMAGE_BORDER_MIRROR);
80  void SetBorderModeToClamp() { this->SetBorderMode(VTK_IMAGE_BORDER_CLAMP); }
81  void SetBorderModeToRepeat() { this->SetBorderMode(VTK_IMAGE_BORDER_REPEAT); }
82  void SetBorderModeToMirror() { this->SetBorderMode(VTK_IMAGE_BORDER_MIRROR); }
83  vtkGetMacro(BorderMode, int);
84  const char* GetBorderModeAsString();
86 
88 
93  vtkSetClampMacro(OutputScalarType, int, VTK_FLOAT, VTK_DOUBLE);
94  vtkGetMacro(OutputScalarType, int);
95  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
96  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
99 
101 
108  vtkSetMacro(Bypass, vtkTypeBool);
109  vtkBooleanMacro(Bypass, vtkTypeBool);
110  vtkGetMacro(Bypass, vtkTypeBool);
112 
119  int CheckBounds(const double point[3]);
120 
122 
128  void Evaluate(const double point[3], double* value);
129  double Evaluate(double x, double y, double z);
130  double Evaluate(const double point[3]) { return this->Evaluate(point[0], point[1], point[2]); }
132 
133 protected:
136 
137  void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent) override;
139 
143 
145  vtkImageData* inData, vtkImageData* outData, int outExt[6], int threadId) override;
146 
153 
154 private:
156  void operator=(const vtkImageBSplineCoefficients&) = delete;
157 };
158 
159 #endif
general representation of visualization data
Definition: vtkDataObject.h:60
convert image to b-spline knots
void Evaluate(const double point[3], double *value)
Interpolate a value from the image.
const char * GetBorderModeAsString()
const char * GetOutputScalarTypeAsString()
vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo) override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
double Evaluate(const double point[3])
int CheckBounds(const double point[3])
Check a point against the image bounds.
static vtkImageBSplineCoefficients * New()
void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent) override
Allocate the output data.
double Evaluate(double x, double y, double z)
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:42
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
@ point
Definition: vtkX3D.h:242
@ value
Definition: vtkX3D.h:226
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_IMAGE_BORDER_REPEAT
#define VTK_IMAGE_BORDER_MIRROR
#define VTK_IMAGE_BORDER_CLAMP
#define VTK_IMAGE_BSPLINE_DEGREE_MAX
#define VTK_DOUBLE
Definition: vtkType.h:53
#define VTK_FLOAT
Definition: vtkType.h:52