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: 2007-04-06 12:50:58 $
00007 Version:   $Revision: 1.24 $
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   void CalcMeanCoreAtomIntensity();
00114 
00116   PositionType GetVotedLocation();
00117 
00118   BloxCoreAtomPixel();
00119   ~BloxCoreAtomPixel();
00120 
00121 private:
00122 
00124   double m_MeanCoreAtomDiameter;
00125 
00127   MatrixType m_RawCMatrix;
00128 
00132   EigenvalueType m_Eigenvalues;
00133 
00136   EigenvectorType m_Eigenvectors;
00137 
00139   MatrixType m_VotedCMatrix;
00140 
00142   EigenvalueType m_VotedEigenvalues;
00143 
00145   EigenvectorType m_VotedEigenvectors;
00146 
00149   double m_ConstituencySize;
00150 
00152   PositionType m_LocationSums;
00153 
00155   PositionType m_VotedLocation;
00156 
00158   double m_WeightSum;
00159 
00161   double m_MeanCoreAtomIntensity;
00162 };
00163 
00164 
00165 } // end namespace itk
00166 
00167 // Define instantiation macro for this template.
00168 #define ITK_TEMPLATE_BloxCoreAtomPixel(_, EXPORT, x, y) namespace itk { \
00169   _(1(class EXPORT BloxCoreAtomPixel< ITK_TEMPLATE_1 x >)) \
00170   namespace Templates { typedef BloxCoreAtomPixel< ITK_TEMPLATE_1 x > \
00171                                BloxCoreAtomPixel##y; } \
00172   }
00173 
00174 #if ITK_TEMPLATE_EXPLICIT
00175 # include "Templates/itkBloxCoreAtomPixel+-.h"
00176 #endif
00177 
00178 #if ITK_TEMPLATE_TXX
00179 # include "itkBloxCoreAtomPixel.txx"
00180 #endif
00181 
00182 #endif
00183 

Generated at Sat Feb 28 12:06:31 2009 for ITK by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2000