Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 }
00163
00164
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