Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkPrincipalAxesAlign.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Realign Volumes
4  Module: $HeadURL$
5  Language: C++
6  Date: $Date$
7  Version: $Revision$
8 
9  Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
10 
11  See License.txt or http://www.slicer.org/copyright/copyright.txt for details.
12 
13 ==========================================================================*/
14 #ifndef __vtk_principal_axes_align_h
15 #define __vtk_principal_axes_align_h
16 #include <vtkPolyDataAlgorithm.h>
17 #include <vtkSetGet.h>
18 #include <vtkVersion.h>
19 // ---------------------------------------------------------
20 // Author: Axel Krauth
21 //
22 // This class computes the principal axes of the input.
23 // The direction of the eigenvector for the largest eigenvalue is the XAxis,
24 // the direction of the eigenvector for the smallest eigenvalue is the ZAxis,
25 // and the YAxis the the eigenvector for the remaining eigenvalue.
26 class vtkPrincipalAxesAlign : public vtkPolyDataAlgorithm
27 {
28 public:
29  static vtkPrincipalAxesAlign * New();
30 
31  vtkTypeMacro(vtkPrincipalAxesAlign, vtkPolyDataAlgorithm);
32 
33  vtkGetVector3Macro(Center, double);
34  vtkGetVector3Macro(XAxis, double);
35  vtkGetVector3Macro(YAxis, double);
36  vtkGetVector3Macro(ZAxis, double);
37  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
38 
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
41 protected:
43  ~vtkPrincipalAxesAlign() override;
44 private:
46  void operator=(const vtkPrincipalAxesAlign &) = delete;
47 
48  double* Center;
49  double* XAxis;
50  double* YAxis;
51  double* ZAxis;
52 
53  // a matrix of the eigenvalue problem
54  double* * eigenvalueProblem;
55  // for efficiency reasons parts of the eigenvalue problem are computed separately
56  double* * eigenvalueProblemDiag;
57  double* * eigenvectors;
58  double* eigenvalues;
59 };
60 
61 #endif
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
static vtkPrincipalAxesAlign * New()
~vtkPrincipalAxesAlign() override
void PrintSelf(ostream &os, vtkIndent indent) override