Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkBinaryMedialNodeMetric.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkBinaryMedialNodeMetric.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/04/20 13:36:35 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkBinaryMedialNodeMetric_h
00018 #define __itkBinaryMedialNodeMetric_h
00019 
00020 #include "itkLightObject.h"
00021 #include "itkBloxCoreAtomPixel.h"
00022 
00023 namespace itk
00024 {
00025   
00034 template <int VDimensions>
00035 class BinaryMedialNodeMetric : public LightObject
00036 {
00037 public:
00038 
00040   typedef BinaryMedialNodeMetric          Self;
00041   typedef LightObject                     Superclass; 
00042   typedef SmartPointer<Self>              Pointer;
00043   typedef SmartPointer<const Self>        ConstPointer;
00044 
00046   itkNewMacro(Self);
00047 
00051   itkStaticConstMacro(EMPTY, int, 2);
00052 
00054   itkTypeMacro(BinaryMedialNodeMetric, LightObject);
00055 
00057   typedef BloxCoreAtomPixel<VDimensions> MedialNode;
00058 
00060   typedef Point<double, VDimensions> PositionType;
00061 
00063   void Initialize(void);
00064 
00066   void SetMedialNodes(MedialNode * NodeA1, MedialNode * NodeA2, MedialNode * NodeB1, MedialNode * NodeB2);
00067 
00069   void PrintCombinedEigens();
00070 
00072   void ShowCalculation(){m_ShowCalc = true;}
00073 
00075   void DontShowCalculation(){m_ShowCalc = false;}
00076 
00078   double GetResult(){return m_Result;}
00079   //itkSetMacro(Result, double);
00080   //itkGetMacro(Result, double);
00082 
00083 
00084 protected:
00086   BinaryMedialNodeMetric();
00087 
00089   ~BinaryMedialNodeMetric() {};
00090 
00091   void PrintSelf(std::ostream& os, Indent indent) const;
00092 
00093 private:
00094 
00096   void OrderValues();
00097 
00099   double m_CombinedEigenValues[VDimensions*2];
00100   double m_CombinedDistanceValues[VDimensions*2];
00101 
00103   int m_CombinedEigensKey[VDimensions*2];
00104 
00106   MedialNode * m_NodeA1;
00107   MedialNode * m_NodeA2;
00108 
00110   MedialNode * m_NodeB1;
00111   MedialNode * m_NodeB2;
00112 
00114   typename MedialNode::EigenvalueType m_EigenA;
00115   typename MedialNode::EigenvalueType m_EigenB;
00116 
00118   PositionType m_DistanceVectorA;
00119   PositionType m_DistanceVectorB;
00120 
00122   double m_Result;
00123 
00125   bool m_ShowCalc;
00126 };
00127 
00128 } // end namespace itk
00129 
00130 #ifndef ITK_MANUAL_INSTANTIATION
00131 #include "itkBinaryMedialNodeMetric.txx"
00132 #endif
00133 
00134 #endif
00135 

Generated at Sun Sep 23 11:55:20 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000