ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkWeightedCovarianceSampleFilter_h 00019 #define __itkWeightedCovarianceSampleFilter_h 00020 00021 #include "itkFunctionBase.h" 00022 #include "itkCovarianceSampleFilter.h" 00023 #include "itkDataObjectDecorator.h" 00024 00025 namespace itk 00026 { 00027 namespace Statistics 00028 { 00042 template< class TSample > 00043 class ITK_EXPORT WeightedCovarianceSampleFilter: 00044 public CovarianceSampleFilter< TSample > 00045 { 00046 public: 00048 typedef WeightedCovarianceSampleFilter Self; 00049 typedef CovarianceSampleFilter< TSample > Superclass; 00050 typedef SmartPointer< Self > Pointer; 00051 typedef SmartPointer< const Self > ConstPointer; 00052 00054 itkTypeMacro(WeightedCovarianceSampleFilter, CovarianceSampleFilter); 00055 itkNewMacro(Self); 00057 00059 typedef typename Superclass::SampleType SampleType; 00060 typedef typename Superclass::MeasurementVectorType MeasurementVectorType; 00061 typedef typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType; 00062 typedef typename Superclass::MeasurementVectorDecoratedType MeasurementVectorDecoratedType; 00063 typedef typename Superclass::OutputType OutputType; 00064 typedef typename Superclass::MeasurementRealType MeasurementRealType; 00065 typedef typename Superclass::MeasurementVectorRealType MeasurementVectorRealType; 00066 00068 typedef VariableSizeMatrix< double > MatrixType; 00069 00071 typedef FunctionBase< MeasurementVectorType, double > WeightingFunctionType; 00072 00075 typedef SimpleDataObjectDecorator< MatrixType > MatrixDecoratedType; 00076 00078 typedef Array< double > WeightArrayType; 00079 00081 typedef SimpleDataObjectDecorator< WeightArrayType > InputWeightArrayObjectType; 00082 00084 itkSetGetDecoratedInputMacro(Weights, WeightArrayType); 00085 00087 typedef DataObjectDecorator< WeightingFunctionType > InputWeightingFunctionObjectType; 00088 00090 itkSetGetDecoratedObjectInputMacro(WeightingFunction, WeightingFunctionType); 00091 00092 protected: 00093 WeightedCovarianceSampleFilter(); 00094 virtual ~WeightedCovarianceSampleFilter(); 00095 void PrintSelf(std::ostream & os, Indent indent) const; 00096 00097 void GenerateData(); 00098 00100 void ComputeCovarianceMatrixWithWeightingFunction(); 00101 00103 void ComputeCovarianceMatrixWithWeights(); 00104 00105 private: 00106 WeightedCovarianceSampleFilter(const Self &); //purposely not implemented 00107 void operator=(const Self &); //purposely not implemented 00108 00109 }; // end of class 00110 } // end of namespace Statistics 00111 } // end of namespace itk 00112 00113 #ifndef ITK_MANUAL_INSTANTIATION 00114 #include "itkWeightedCovarianceSampleFilter.hxx" 00115 #endif 00116 00117 #endif 00118