ITK
4.4.0
Insight Segmentation and Registration Toolkit
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
ITK
Modules
Numerics
Statistics
include
itkMahalanobisDistanceMembershipFunction.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright Insight Software Consortium
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0.txt
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*
17
*=========================================================================*/
18
#ifndef __itkMahalanobisDistanceMembershipFunction_h
19
#define __itkMahalanobisDistanceMembershipFunction_h
20
21
#include "
itkVariableSizeMatrix.h
"
22
23
#include "
itkMembershipFunctionBase.h
"
24
25
namespace
itk
26
{
27
namespace
Statistics
28
{
61
template
<
class
TVector >
62
class
ITK_EXPORT
MahalanobisDistanceMembershipFunction
:
63
public
MembershipFunctionBase
< TVector >
64
{
65
public
:
67
typedef
MahalanobisDistanceMembershipFunction
Self
;
68
typedef
MembershipFunctionBase< TVector >
Superclass
;
69
typedef
SmartPointer< Self >
Pointer
;
70
typedef
SmartPointer< const Self >
ConstPointer
;
71
73
itkTypeMacro(
MahalanobisDistanceMembershipFunction
,
MembershipFunctionBase
);
74
itkNewMacro(
Self
);
76
78
typedef
typename
Superclass::Pointer
MembershipFunctionPointer
;
79
81
typedef
TVector
MeasurementVectorType
;
82
84
typedef
typename
Superclass::MeasurementVectorSizeType
MeasurementVectorSizeType
;
85
88
typedef
typename
itk::NumericTraits< MeasurementVectorType >::RealType
MeasurementVectorRealType
;
89
typedef
MeasurementVectorRealType
MeanVectorType
;
90
92
typedef
VariableSizeMatrix< double >
CovarianceMatrixType
;
93
96
void
SetMean(
const
MeanVectorType
& mean);
97
100
itkGetConstReferenceMacro(Mean,
MeanVectorType
);
101
105
void
SetCovariance(
const
CovarianceMatrixType
& cov);
106
109
itkGetConstReferenceMacro(Covariance,
CovarianceMatrixType
);
110
116
double
Evaluate(
const
MeasurementVectorType
& measurement)
const
;
117
121
virtual
typename
LightObject::Pointer
InternalClone()
const
;
122
123
protected
:
124
MahalanobisDistanceMembershipFunction
(
void
);
125
virtual
~MahalanobisDistanceMembershipFunction
(
void
) {}
126
void
PrintSelf(std::ostream & os,
Indent
indent)
const
;
127
128
private
:
129
MeanVectorType
m_Mean
;
// mean
130
CovarianceMatrixType
m_Covariance
;
// covariance matrix
131
132
// inverse covariance matrix. automatically calculated
133
// when covariace matirx is set.
134
CovarianceMatrixType
m_InverseCovariance
;
135
137
bool
m_CovarianceNonsingular
;
138
};
139
}
// end of namespace Statistics
140
}
// end namespace itk
141
142
#ifndef ITK_MANUAL_INSTANTIATION
143
#include "itkMahalanobisDistanceMembershipFunction.hxx"
144
#endif
145
146
#endif
147
Generated on Mon May 13 2013 01:00:14 for ITK by
1.8.3.1