00001 /*========================================================================= 00002 00003 Program: F.R.E.E. - flexible registration evaluation engine 00004 Version: v.1.0.0 00005 Date: $Date: 2006/09/01 12:00:00 $ 00006 Module: $RCSfile: freVectorSampleCharacteristicsCalculator.h,v $ 00007 Language: C++ 00008 00009 00010 00011 Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics, 00012 Institute for Medical Biometry and Informatics, University of Heidelberg, 00013 Germany). All rights reserved. 00014 See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm 00015 for details. 00016 00017 This software is distributed WITHOUT ANY WARRANTY; without even 00018 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00019 PURPOSE. See the above copyright notices for more information. 00020 00021 =========================================================================*/ 00022 #ifndef _freVectorSampleCharacteristicsCalculator_h 00023 #define _freVectorSampleCharacteristicsCalculator_h 00024 00025 #include "itkVariableSizeMatrix.h" 00026 00027 namespace FREE 00028 { 00029 00039 template <class TVectorField> 00040 class VectorSampleCharacteristicsCalculator 00041 { 00042 public: 00044 typedef VectorSampleCharacteristicsCalculator Self; 00045 typedef TVectorField VectorFieldType; 00046 typedef typename VectorFieldType::ValueType VectorType; 00047 typedef itk::VariableSizeMatrix<typename VectorType::ComponentType> CovarianceMatrixType; 00048 typedef itk::Array<typename VectorType::ComponentType> MeanType; 00049 00051 void Compute(); 00052 00054 void ComputeMean(); 00055 00057 void ComputeCovariance(const MeanType& mean); 00058 00059 MeanType GetMean() const; 00060 00061 MeanType GetVariance() const; 00062 00063 CovarianceMatrixType GetCovariance() const; 00064 00065 void SetVectorField(const VectorFieldType* pField); 00066 00067 VectorSampleCharacteristicsCalculator(); 00068 00069 private: 00070 typename VectorFieldType::ConstPointer m_smpImage; 00071 00072 MeanType m_Mean; 00073 00074 CovarianceMatrixType m_CovarianceMatrix; 00075 00077 unsigned int m_iMatrixSize; 00078 }; 00079 00080 } // namespace free 00081 00082 #ifndef ITK_MANUAL_INSTANTIATION 00083 #include "freVectorSampleCharacteristicsCalculator.txx" 00084 #endif 00085 00086 #endif 00087
1.5.3 written by Dimitri van Heesch,
© 1997-2000