Slicer 4.2
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.
00001 /*=========================================================================
00002 
00003   Program:   Realign Volumes
00004   Module:    $HeadURL: http://svn.slicer.org/Slicer4/trunk/Modules/CLI/ACPCTransform/vtkPrincipalAxesAlign.h $
00005   Language:  C++
00006   Date:      $Date: 2012-02-02 01:49:17 -0500 (Thu, 02 Feb 2012) $
00007   Version:   $Revision: 19167 $
00008 
00009   Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
00010 
00011   See License.txt or http://www.slicer.org/copyright/copyright.txt for details.
00012 
00013 ==========================================================================*/
00014 #ifndef __vtk_principal_axes_align_h
00015 #define __vtk_principal_axes_align_h
00016 #include <vtkPolyDataToPolyDataFilter.h>
00017 #include <vtkSetGet.h>
00018 // ---------------------------------------------------------
00019 // Author: Axel Krauth
00020 //
00021 // This class computes the principal axes of the input.
00022 // The direction of the eigenvector for the largest eigenvalue is the XAxis,
00023 // the direction of the eigenvector for the smallest eigenvalue is the ZAxis,
00024 // and the YAxis the the eigenvector for the remaining eigenvalue.
00025 class vtkPrincipalAxesAlign : public vtkPolyDataToPolyDataFilter
00026 {
00027 public:
00028   static vtkPrincipalAxesAlign * New();
00029 
00030   vtkTypeMacro(vtkPrincipalAxesAlign, vtkPolyDataToPolyDataFilter);
00031 
00032   vtkGetVector3Macro(Center, vtkFloatingPointType);
00033   vtkGetVector3Macro(XAxis, vtkFloatingPointType);
00034   vtkGetVector3Macro(YAxis, vtkFloatingPointType);
00035   vtkGetVector3Macro(ZAxis, vtkFloatingPointType);
00036   void Execute();
00037 
00038   void PrintSelf(ostream& os, vtkIndent indent);
00039 
00040 protected:
00041   vtkPrincipalAxesAlign();
00042   ~vtkPrincipalAxesAlign();
00043 private:
00044   vtkPrincipalAxesAlign(vtkPrincipalAxesAlign &);
00045   void operator=(const vtkPrincipalAxesAlign &);
00046 
00047   vtkFloatingPointType* Center;
00048   vtkFloatingPointType* XAxis;
00049   vtkFloatingPointType* YAxis;
00050   vtkFloatingPointType* ZAxis;
00051 
00052   // a matrix of the eigenvalue problem
00053   double* * eigenvalueProblem;
00054   // for efficiency reasons parts of the eigenvalue problem are computed separately
00055   double* * eigenvalueProblemDiag;
00056   double* * eigenvectors;
00057   double*   eigenvalues;
00058 };
00059 
00060 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines