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 =========================================================================*/
51 #ifndef vtkImageBSplineCoefficients_h
52 #define vtkImageBSplineCoefficients_h
53 
54 
55 #include "vtkImagingCoreModule.h" // For export macro
57 #include "vtkImageBSplineInterpolator.h" // for constants
58 
59 class VTKIMAGINGCORE_EXPORT vtkImageBSplineCoefficients :
61 {
62 public:
65 
66  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
69 
73  vtkSetClampMacro(SplineDegree, int, 0, VTK_IMAGE_BSPLINE_DEGREE_MAX);
74  vtkGetMacro(SplineDegree, int);
76 
78 
87  vtkSetClampMacro(BorderMode, int,
90  this->SetBorderMode(VTK_IMAGE_BORDER_CLAMP); }
92  this->SetBorderMode(VTK_IMAGE_BORDER_REPEAT); }
94  this->SetBorderMode(VTK_IMAGE_BORDER_MIRROR); }
95  vtkGetMacro(BorderMode, int);
96  const char *GetBorderModeAsString();
98 
100 
105  vtkSetClampMacro(OutputScalarType, int, VTK_FLOAT, VTK_DOUBLE);
106  vtkGetMacro(OutputScalarType, int);
108  this->SetOutputScalarType(VTK_FLOAT); }
110  this->SetOutputScalarType(VTK_DOUBLE); }
111  const char *GetOutputScalarTypeAsString();
113 
115 
122  vtkSetMacro(Bypass, vtkTypeBool);
123  vtkBooleanMacro(Bypass, vtkTypeBool);
124  vtkGetMacro(Bypass, vtkTypeBool);
126 
133  int CheckBounds(const double point[3]);
134 
136 
142  void Evaluate(const double point[3], double *value);
143  double Evaluate(double x, double y, double z);
144  double Evaluate(const double point[3]) {
145  return this->Evaluate(point[0], point[1], point[2]); }
147 
148 protected:
150  ~vtkImageBSplineCoefficients() override;
151 
152  void AllocateOutputData(
153  vtkImageData *out, vtkInformation *outInfo, int *uExtent) override;
155  vtkDataObject *out, vtkInformation* outInfo) override;
156 
157  int RequestData(
159  int RequestInformation(
163 
164  void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
165  int outExt[6], int threadId) override;
166 
173 
174 private:
176  void operator=(const vtkImageBSplineCoefficients&) = delete;
177 };
178 
179 #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.
int vtkTypeBool
Definition: vtkABI.h:69
#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:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
#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.
general representation of visualization data
Definition: vtkDataObject.h:64