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 =========================================================================*/
47 #ifndef __vtkImageBSplineCoefficients_h
48 #define __vtkImageBSplineCoefficients_h
49 
50 
52 #include "vtkImageBSplineInterpolator.h" // for constants
53 
56 {
57 public:
60 
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
64 
66  vtkSetClampMacro(SplineDegree, int, 0, VTK_IMAGE_BSPLINE_DEGREE_MAX);
67  vtkGetMacro(SplineDegree, int);
69 
71 
78  vtkSetClampMacro(BorderMode, int,
81  this->SetBorderMode(VTK_IMAGE_BORDER_CLAMP); }
83  this->SetBorderMode(VTK_IMAGE_BORDER_REPEAT); }
85  this->SetBorderMode(VTK_IMAGE_BORDER_MIRROR); }
86  vtkGetMacro(BorderMode, int);
87  const char *GetBorderModeAsString();
89 
91 
94  vtkSetClampMacro(OutputScalarType, int, VTK_FLOAT, VTK_DOUBLE);
95  vtkGetMacro(OutputScalarType, int);
97  this->SetOutputScalarType(VTK_FLOAT); }
99  this->SetOutputScalarType(VTK_DOUBLE); }
100  const char *GetOutputScalarTypeAsString();
102 
104 
109  vtkSetMacro(Bypass, int);
110  vtkBooleanMacro(Bypass, int);
111  vtkGetMacro(Bypass, int);
113 
118  int CheckBounds(const double point[3]);
119 
121 
125  void Evaluate(const double point[3], double *value);
126  double Evaluate(double x, double y, double z);
127  double Evaluate(const double point[3]) {
128  return this->Evaluate(point[0], point[1], point[2]); }
130 
133  int SplitExtent(int splitExt[6], int startExt[6], int num, int total);
134 
135 protected:
138 
139  virtual void AllocateOutputData(vtkImageData *out, int *uExtent);
141 
142  virtual int RequestData(
144  virtual int RequestInformation(
146  virtual int RequestUpdateExtent(
148 
149  virtual void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
150  int outExt[6], int threadId);
151 
155  int Bypass;
158 
159 private:
160  vtkImageBSplineCoefficients(const vtkImageBSplineCoefficients&); // Not implemented.
161  void operator=(const vtkImageBSplineCoefficients&); // Not implemented.
162 };
163 
164 #endif