Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkOrientedBSplineTransform.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8 =========================================================================auto=*/
9 
26 
27 #ifndef __vtkOrientedBSplineTransform_h
28 #define __vtkOrientedBSplineTransform_h
29 
30 #include "vtkAddon.h"
31 
32 #include "vtkBSplineTransform.h"
33 
34 class VTK_ADDON_EXPORT vtkOrientedBSplineTransform : public vtkBSplineTransform
35 {
36 public:
37  static vtkOrientedBSplineTransform *New();
38  vtkTypeMacro(vtkOrientedBSplineTransform,vtkBSplineTransform);
39  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
41  // Description:
42  // Make another transform of the same type.
43  vtkAbstractTransform *MakeTransform() VTK_OVERRIDE;
44 
45  // Description:
46  // Set/Get the b-spline grid axis directions.
47  // This transform class will never modify the data.
48  // Must be an orthogonal, normalized matrix.
49  // The 4th column and 4th row are ignored.
50  virtual void SetGridDirectionMatrix(vtkMatrix4x4*);
51  vtkGetObjectMacro(GridDirectionMatrix,vtkMatrix4x4);
52 
53  // Description:
54  // Set/Get bulk transform that will be added to the b-spline.
55  // This transform class will never modify the data.
56  virtual void SetBulkTransformMatrix(vtkMatrix4x4*);
57  vtkGetObjectMacro(BulkTransformMatrix,vtkMatrix4x4);
58 
59 protected:
62 
63  // Description:
64  // Update the displacement grid.
65  void InternalUpdate() VTK_OVERRIDE;
66 
67  // Description:
68  // Copy this transform from another of the same type.
69  void InternalDeepCopy(vtkAbstractTransform *transform) VTK_OVERRIDE;
70 
71  // Description:
72  // Internal functions for calculating the transformation.
73  void ForwardTransformPoint(const double in[3], double out[3]) VTK_OVERRIDE;
74  using Superclass::ForwardTransformPoint; // Inherit the float version from parent
75 
76  void ForwardTransformDerivative(const double in[3], double out[3],
77  double derivative[3][3]) VTK_OVERRIDE;
78  using Superclass::ForwardTransformDerivative; // Inherit the float version from parent
79 
80  void InverseTransformDerivative(const double in[3], double out[3],
81  double derivative[3][3]) VTK_OVERRIDE;
82  using Superclass::InverseTransformDerivative; // Inherit the float version from parent
83 
84  // Description:
85  // Grid axis direction vectors (i, j, k) in the output space
86  vtkMatrix4x4* GridDirectionMatrix;
87 
88  // Description:
89  // Bulk linear transform that is added to the b-spline transform
90  vtkMatrix4x4* BulkTransformMatrix;
91 
92  vtkMatrix4x4* GridIndexToOutputTransformMatrixCached;
93  vtkMatrix4x4* OutputToGridIndexTransformMatrixCached;
94  vtkMatrix4x4* InverseBulkTransformMatrixCached;
95 
96 private:
97  vtkOrientedBSplineTransform(const vtkOrientedBSplineTransform&); // Not implemented.
98  void operator=(const vtkOrientedBSplineTransform&); // Not implemented.
99 };
100 
101 #endif
vtkOrientedBSplineTransform - arbitrarily oriented cubic b-spline deformation transformation.