VTK
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 
49 #include "vtkImagingCoreModule.h" // For export macro
51 #include "vtkImageBSplineInterpolator.h" // for constants
52 
53 class VTKIMAGINGCORE_EXPORT vtkImageBSplineCoefficients :
55 {
56 public:
59 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
63 
67  vtkSetClampMacro(SplineDegree, int, 0, VTK_IMAGE_BSPLINE_DEGREE_MAX);
68  vtkGetMacro(SplineDegree, int);
70 
72 
81  vtkSetClampMacro(BorderMode, int,
84  this->SetBorderMode(VTK_IMAGE_BORDER_CLAMP); }
86  this->SetBorderMode(VTK_IMAGE_BORDER_REPEAT); }
88  this->SetBorderMode(VTK_IMAGE_BORDER_MIRROR); }
89  vtkGetMacro(BorderMode, int);
90  const char *GetBorderModeAsString();
92 
94 
99  vtkSetClampMacro(OutputScalarType, int, VTK_FLOAT, VTK_DOUBLE);
100  vtkGetMacro(OutputScalarType, int);
102  this->SetOutputScalarType(VTK_FLOAT); }
104  this->SetOutputScalarType(VTK_DOUBLE); }
105  const char *GetOutputScalarTypeAsString();
107 
109 
116  vtkSetMacro(Bypass, vtkTypeBool);
117  vtkBooleanMacro(Bypass, vtkTypeBool);
118  vtkGetMacro(Bypass, vtkTypeBool);
120 
127  int CheckBounds(const double point[3]);
128 
130 
136  void Evaluate(const double point[3], double *value);
137  double Evaluate(double x, double y, double z);
138  double Evaluate(const double point[3]) {
139  return this->Evaluate(point[0], point[1], point[2]); }
141 
142 protected:
144  ~vtkImageBSplineCoefficients() override;
145 
146  void AllocateOutputData(
147  vtkImageData *out, vtkInformation *outInfo, int *uExtent) override;
149  vtkDataObject *out, vtkInformation* outInfo) override;
150 
151  int RequestData(
153  int RequestInformation(
157 
158  void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
159  int outExt[6], int threadId) override;
160 
167 
168 private:
170  void operator=(const vtkImageBSplineCoefficients&) = delete;
171 };
172 
173 #endif
vtkImageBSplineCoefficients::SetBorderModeToMirror
void SetBorderModeToMirror()
Definition: vtkImageBSplineCoefficients.h:87
vtkImageBSplineCoefficients::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImageBSplineCoefficients.h:103
vtkImageBSplineCoefficients::BorderMode
int BorderMode
Definition: vtkImageBSplineCoefficients.h:162
VTK_IMAGE_BSPLINE_DEGREE_MAX
#define VTK_IMAGE_BSPLINE_DEGREE_MAX
Definition: vtkImageBSplineInterpolator.h:43
vtkX3D::value
Definition: vtkX3D.h:220
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:163
vtkImageBSplineCoefficients
convert image to b-spline knots
Definition: vtkImageBSplineCoefficients.h:53
vtkImageBSplineCoefficients::DataWasPassed
int DataWasPassed
Definition: vtkImageBSplineCoefficients.h:165
vtkThreadedImageAlgorithm.h
vtkImageBSplineInterpolator.h
vtkX3D::point
Definition: vtkX3D.h:236
vtkImageBSplineCoefficients::Bypass
vtkTypeBool Bypass
Definition: vtkImageBSplineCoefficients.h:164
vtkImageBSplineCoefficients::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkImageBSplineCoefficients.h:101
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:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:58
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:59
vtkImageBSplineCoefficients::SplineDegree
int SplineDegree
Definition: vtkImageBSplineCoefficients.h:161
vtkImageBSplineCoefficients::Iteration
int Iteration
Definition: vtkImageBSplineCoefficients.h:166
VTK_IMAGE_BORDER_REPEAT
#define VTK_IMAGE_BORDER_REPEAT
Definition: vtkAbstractImageInterpolator.h:37
vtkImageBSplineCoefficients::Evaluate
double Evaluate(const double point[3])
Definition: vtkImageBSplineCoefficients.h:138
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkImageBSplineCoefficients::SetBorderModeToRepeat
void SetBorderModeToRepeat()
Definition: vtkImageBSplineCoefficients.h:85
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:83
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkThreadedImageAlgorithm::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69