VTK  9.0.1
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
vtkImageBSplineCoefficients::SetBorderModeToMirror
void SetBorderModeToMirror()
Definition: vtkImageBSplineCoefficients.h:82
vtkImageBSplineCoefficients::CheckBounds
int CheckBounds(const double point[3])
Check a point against the image bounds.
vtkImageBSplineCoefficients::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImageBSplineCoefficients.h:96
vtkImageBSplineCoefficients::BorderMode
int BorderMode
Definition: vtkImageBSplineCoefficients.h:148
vtkImageBSplineCoefficients::GetOutputScalarTypeAsString
const char * GetOutputScalarTypeAsString()
VTK_IMAGE_BSPLINE_DEGREE_MAX
#define VTK_IMAGE_BSPLINE_DEGREE_MAX
Definition: vtkImageBSplineInterpolator.h:43
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkImageBSplineCoefficients::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:38
VTK_IMAGE_BORDER_MIRROR
#define VTK_IMAGE_BORDER_MIRROR
Definition: vtkAbstractImageInterpolator.h:38
vtkImageBSplineCoefficients::Evaluate
void Evaluate(const double point[3], double *value)
Interpolate a value from the image.
vtkImageBSplineCoefficients::OutputScalarType
int OutputScalarType
Definition: vtkImageBSplineCoefficients.h:149
vtkImageBSplineCoefficients
convert image to b-spline knots
Definition: vtkImageBSplineCoefficients.h:53
vtkImageBSplineCoefficients::DataWasPassed
int DataWasPassed
Definition: vtkImageBSplineCoefficients.h:151
vtkThreadedImageAlgorithm.h
vtkImageBSplineCoefficients::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageBSplineCoefficients::New
static vtkImageBSplineCoefficients * New()
vtkImageBSplineInterpolator.h
vtkX3D::point
@ point
Definition: vtkX3D.h:242
vtkImageBSplineCoefficients::Bypass
vtkTypeBool Bypass
Definition: vtkImageBSplineCoefficients.h:150
vtkImageBSplineCoefficients::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkImageBSplineCoefficients.h:95
VTK_IMAGE_BORDER_CLAMP
#define VTK_IMAGE_BORDER_CLAMP
Definition: vtkAbstractImageInterpolator.h:36
vtkImageBSplineCoefficients::ThreadedExecute
void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int outExt[6], int threadId) override
vtkImageBSplineCoefficients::~vtkImageBSplineCoefficients
~vtkImageBSplineCoefficients() override
vtkImageBSplineCoefficients::vtkImageBSplineCoefficients
vtkImageBSplineCoefficients()
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:52
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:53
vtkImageBSplineCoefficients::SplineDegree
int SplineDegree
Definition: vtkImageBSplineCoefficients.h:147
vtkImageBSplineCoefficients::Iteration
int Iteration
Definition: vtkImageBSplineCoefficients.h:152
VTK_IMAGE_BORDER_REPEAT
#define VTK_IMAGE_BORDER_REPEAT
Definition: vtkAbstractImageInterpolator.h:37
vtkImageBSplineCoefficients::Evaluate
double Evaluate(const double point[3])
Definition: vtkImageBSplineCoefficients.h:130
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkImageBSplineCoefficients::SetBorderModeToRepeat
void SetBorderModeToRepeat()
Definition: vtkImageBSplineCoefficients.h:81
vtkImageBSplineCoefficients::AllocateOutputData
void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent) override
Allocate the output data.
vtkImageBSplineCoefficients::AllocateOutputData
vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo) override
vtkImageBSplineCoefficients::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageBSplineCoefficients::SetBorderModeToClamp
void SetBorderModeToClamp()
Definition: vtkImageBSplineCoefficients.h:80
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:60
vtkImageBSplineCoefficients::GetBorderModeAsString
const char * GetBorderModeAsString()
vtkImageBSplineCoefficients::Evaluate
double Evaluate(double x, double y, double z)
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkImageBSplineCoefficients::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...