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

itkBloxCoreAtomPixel.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   Insight Segmentation & Registration Toolkit
00004 Module:    $RCSfile: itkBloxCoreAtomPixel.h,v $
00005 Language:  C++
00006 Date:      $Date: 2010-07-06 12:24:07 $
00007 Version:   $Revision: 1.25 $
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 __itkBloxCoreAtomPixel_h
00018 #define __itkBloxCoreAtomPixel_h
00019 
00020 #include "vnl/vnl_matrix_fixed.h"
00021 #include "vnl/vnl_vector_fixed.h"
00022 #include "vnl/algo/vnl_generalized_eigensystem.h"
00023 
00024 #include "itkObject.h"
00025 #include "itkBloxCoreAtomItem.h"
00026 #include "itkBloxBoundaryPointItem.h"
00027 #include "itkPoint.h"
00028 #include "itkCovariantVector.h"
00029 #include "itkBloxPixel.h"
00030 
00031 namespace itk
00032 {
00033 
00041 template <unsigned int NDimensions>
00042 class ITK_EXPORT BloxCoreAtomPixel : public BloxPixel< 
00043                                             BloxCoreAtomItem<NDimensions> >
00044 {
00045 public:
00046 
00048   typedef BloxCoreAtomPixel                            Self;
00049   typedef BloxPixel< BloxCoreAtomItem<NDimensions> >   Superclass; 
00050   typedef SmartPointer<Self>                           Pointer;
00051   typedef SmartPointer<const Self>                     ConstPointer;
00052 
00054   typedef BloxCoreAtomItem<NDimensions> CoreAtomItemType;
00055 
00057   typedef BloxBoundaryPointItem<NDimensions> BPItemType;
00058 
00060   typedef Point<double, NDimensions> PositionType;
00061 
00063   typedef CovariantVector<double, NDimensions> GradientType;
00064 
00066   typedef vnl_vector_fixed<double, NDimensions> VectorType;
00067 
00069   typedef vnl_vector_fixed<double, NDimensions> EigenvalueType;
00070 
00072   typedef vnl_matrix_fixed<double, NDimensions, NDimensions> EigenvectorType;
00073 
00075   typedef vnl_matrix_fixed<double, NDimensions, NDimensions> MatrixType;
00076 
00078   double CalcMeanCoreAtomDiameter();
00079 
00082   bool DoCoreAtomEigenanalysis();
00083 
00085   void DoVotedEigenanalysis();
00086 
00088   double GetMeanCoreAtomDiameter() {return m_MeanCoreAtomDiameter;}
00089   double GetMeanCoreAtomIntensity() {return m_MeanCoreAtomIntensity;}
00090   EigenvalueType GetEigenvalues() {return m_Eigenvalues;}
00091   EigenvalueType GetVotedEigenvalues() {return m_VotedEigenvalues;}
00092   EigenvectorType GetEigenvectors() {return m_Eigenvectors;}
00093   EigenvectorType GetVotedEigenvectors() {return m_VotedEigenvectors;}
00094   PositionType GetLocationSums() {return m_LocationSums;}
00095   double GetWeightSum() {return m_WeightSum;}
00097 
00099   MatrixType* GetRawCMatrixPointer() {return &m_RawCMatrix;}
00100 
00102   void CollectVote(MatrixType* pMatrix, double strength, double count);
00103 
00105   void NormalizeVotedCMatrix();
00106 
00110   void CalcWeightedCoreAtomLocation(double weight_factor, Self * votingPixel);
00111 
00113   PositionType GetVotedLocation();
00114 
00115   BloxCoreAtomPixel();
00116   ~BloxCoreAtomPixel();
00117 
00118 private:
00119 
00121   double m_MeanCoreAtomDiameter;
00122 
00124   MatrixType m_RawCMatrix;
00125 
00129   EigenvalueType m_Eigenvalues;
00130 
00133   EigenvectorType m_Eigenvectors;
00134 
00136   MatrixType m_VotedCMatrix;
00137 
00139   EigenvalueType m_VotedEigenvalues;
00140 
00142   EigenvectorType m_VotedEigenvectors;
00143 
00146   double m_ConstituencySize;
00147 
00149   PositionType m_LocationSums;
00150 
00152   PositionType m_VotedLocation;
00153 
00155   double m_WeightSum;
00156 
00158   double m_MeanCoreAtomIntensity;
00159 };
00160 
00161 
00162 } // end namespace itk
00163 
00164 // Define instantiation macro for this template.
00165 #define ITK_TEMPLATE_BloxCoreAtomPixel(_, EXPORT, x, y) namespace itk { \
00166   _(1(class EXPORT BloxCoreAtomPixel< ITK_TEMPLATE_1 x >)) \
00167   namespace Templates { typedef BloxCoreAtomPixel< ITK_TEMPLATE_1 x > \
00168                                BloxCoreAtomPixel##y; } \
00169   }
00170 
00171 #if ITK_TEMPLATE_EXPLICIT
00172 # include "Templates/itkBloxCoreAtomPixel+-.h"
00173 #endif
00174 
00175 #if ITK_TEMPLATE_TXX
00176 # include "itkBloxCoreAtomPixel.txx"
00177 #endif
00178 
00179 #endif
00180 

Generated at Mon Jul 12 2010 17:57:30 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000