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); }
97  const char* GetOutputScalarTypeAsString();
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:
135  ~vtkImageBSplineCoefficients() override;
136 
137  void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent) override;
139 
143 
144  void ThreadedExecute(
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::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImageBSplineCoefficients.h:96
vtkImageBSplineCoefficients::BorderMode
int BorderMode
Definition: vtkImageBSplineCoefficients.h:148
VTK_IMAGE_BSPLINE_DEGREE_MAX
#define VTK_IMAGE_BSPLINE_DEGREE_MAX
Definition: vtkImageBSplineInterpolator.h:43
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:37
VTK_IMAGE_BORDER_MIRROR
#define VTK_IMAGE_BORDER_MIRROR
Definition: vtkAbstractImageInterpolator.h:38
vtkImageBSplineCoefficients::OutputScalarType
int OutputScalarType
Definition: vtkImageBSplineCoefficients.h:149
vtkImageBSplineCoefficients
convert image to b-spline knots
Definition: vtkImageBSplineCoefficients.h:52
vtkImageBSplineCoefficients::DataWasPassed
int DataWasPassed
Definition: vtkImageBSplineCoefficients.h:151
vtkThreadedImageAlgorithm.h
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
vtkImageAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
VTK_IMAGE_BORDER_CLAMP
#define VTK_IMAGE_BORDER_CLAMP
Definition: vtkAbstractImageInterpolator.h:36
vtkThreadedImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageAlgorithm::AllocateOutputData
virtual void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent)
Allocate the output data.
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
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:73
vtkImageBSplineCoefficients::SetBorderModeToRepeat
void SetBorderModeToRepeat()
Definition: vtkImageBSplineCoefficients.h:81
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkThreadedImageAlgorithm::ThreadedExecute
virtual void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int extent[6], int threadId)
vtkImageBSplineCoefficients::SetBorderModeToClamp
void SetBorderModeToClamp()
Definition: vtkImageBSplineCoefficients.h:80
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:59
vtkThreadedImageAlgorithm::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69