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) VTK_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, int);
117  vtkBooleanMacro(Bypass, int);
118  vtkGetMacro(Bypass, int);
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() VTK_OVERRIDE;
145 
146  void AllocateOutputData(
147  vtkImageData *out, vtkInformation *outInfo, int *uExtent) VTK_OVERRIDE;
149  vtkDataObject *out, vtkInformation* outInfo) VTK_OVERRIDE;
150 
151  int RequestData(
153  int RequestInformation(
157 
158  void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
159  int outExt[6], int threadId) VTK_OVERRIDE;
160 
164  int Bypass;
167 
168 private:
169  vtkImageBSplineCoefficients(const vtkImageBSplineCoefficients&) VTK_DELETE_FUNCTION;
170  void operator=(const vtkImageBSplineCoefficients&) VTK_DELETE_FUNCTION;
171 };
172 
173 #endif
void SetOutputScalarTypeToFloat()
Set the scalar type of the output.
void SetBorderModeToRepeat()
Set the border mode.
virtual void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int extent[6], int threadId)
double Evaluate(const double point[3])
Interpolate a value from the image.
Store vtkAlgorithm input/output information.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
convert image to b-spline knots
void SetBorderModeToClamp()
Set the border mode.
void SetOutputScalarTypeToDouble()
Set the scalar type of the output.
#define VTK_IMAGE_BORDER_REPEAT
#define VTK_IMAGE_BORDER_CLAMP
#define VTK_IMAGE_BSPLINE_DEGREE_MAX
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
virtual void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent)
Allocate the output data.
#define VTK_DOUBLE
Definition: vtkType.h:59
Generic filter that has one input.
void SetBorderModeToMirror()
Set the border mode.
#define VTK_FLOAT
Definition: vtkType.h:58
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
#define VTK_IMAGE_BORDER_MIRROR
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:58