Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
Loading...
Searching...
No Matches
Common
CostFunctions
itkSingleValuedPointSetToPointSetMetric.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright UMC Utrecht and contributors
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
/*=========================================================================
19
20
Program: Insight Segmentation & Registration Toolkit
21
Module: $RCSfile: itkSingleValuedPointSetToPointSetMetric.h,v $
22
Date: $Date: 2009-01-26 21:45:56 $
23
Version: $Revision: 1.2 $
24
25
Copyright (c) Insight Software Consortium. All rights reserved.
26
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
27
28
This software is distributed WITHOUT ANY WARRANTY; without even
29
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
30
PURPOSE. See the above copyright notices for more information.
31
32
=========================================================================*/
33
#ifndef itkSingleValuedPointSetToPointSetMetric_h
34
#define itkSingleValuedPointSetToPointSetMetric_h
35
36
#include "itkImageBase.h"
37
#include "
itkAdvancedTransform.h
"
38
#include "itkSingleValuedCostFunction.h"
39
#include "itkMacro.h"
40
#include "itkImageMaskSpatialObject.h"
41
#include "itkPointSet.h"
42
43
namespace
itk
44
{
45
59
60
template
<
class
TFixedPo
int
Set,
class
TMovingPo
int
Set>
61
class
ITK_TEMPLATE_EXPORT
SingleValuedPointSetToPointSetMetric
:
public
SingleValuedCostFunction
62
{
63
public
:
64
ITK_DISALLOW_COPY_AND_MOVE
(
SingleValuedPointSetToPointSetMetric
);
65
67
using
Self
=
SingleValuedPointSetToPointSetMetric
;
68
using
Superclass
= SingleValuedCostFunction;
69
using
Pointer
= SmartPointer<Self>;
70
using
ConstPointer
= SmartPointer<const Self>;
71
73
using
CoordinateRepresentationType
= Superclass::ParametersValueType;
74
76
itkTypeMacro(
SingleValuedPointSetToPointSetMetric
, SingleValuedCostFunction);
77
79
using
FixedPointSetType
= TFixedPointSet;
80
using
FixedPointSetPixelType
=
typename
FixedPointSetType::PixelType;
81
using
FixedPointSetConstPointer
=
typename
FixedPointSetType::ConstPointer;
82
using
MovingPointSetType
= TMovingPointSet;
83
using
MovingPointSetPixelType
=
typename
MovingPointSetType::PixelType;
84
using
MovingPointSetConstPointer
=
typename
MovingPointSetType::ConstPointer;
85
using
PointIterator
=
typename
FixedPointSetType::PointsContainer::ConstIterator;
86
using
PointDataIterator
=
typename
FixedPointSetType::PointDataContainer::ConstIterator;
87
89
itkStaticConstMacro
(FixedPointSetDimension,
unsigned
int
, TFixedPointSet::PointDimension);
90
itkStaticConstMacro
(MovingPointSetDimension,
unsigned
int
, TMovingPointSet::PointDimension);
91
93
using
TransformType
=
94
AdvancedTransform<CoordinateRepresentationType, Self::FixedPointSetDimension, Self::MovingPointSetDimension>
;
95
using
TransformPointer
=
typename
TransformType::Pointer
;
96
using
InputPointType
=
typename
TransformType::InputPointType;
97
using
OutputPointType
=
typename
TransformType::OutputPointType;
98
using
TransformParametersType
=
typename
TransformType::ParametersType;
99
using
TransformJacobianType
=
typename
TransformType::JacobianType;
100
101
using
FixedImageMaskType
= ImageMaskSpatialObject<Self::FixedPointSetDimension>;
102
using
FixedImageMaskPointer
=
typename
FixedImageMaskType::Pointer;
103
using
FixedImageMaskConstPointer
=
typename
FixedImageMaskType::ConstPointer;
104
using
MovingImageMaskType
= ImageMaskSpatialObject<Self::MovingPointSetDimension>;
105
using
MovingImageMaskPointer
=
typename
MovingImageMaskType::Pointer;
106
using
MovingImageMaskConstPointer
=
typename
MovingImageMaskType::ConstPointer;
107
109
using
Superclass::MeasureType;
110
using
Superclass::DerivativeType;
111
using
DerivativeValueType
=
typename
DerivativeType::ValueType;
112
using
Superclass::ParametersType;
113
115
using
NonZeroJacobianIndicesType
=
typename
TransformType::NonZeroJacobianIndicesType
;
116
118
itkSetConstObjectMacro(FixedPointSet,
FixedPointSetType
);
119
121
itkGetConstObjectMacro(FixedPointSet,
FixedPointSetType
);
122
124
itkSetConstObjectMacro(MovingPointSet,
MovingPointSetType
);
125
127
itkGetConstObjectMacro(MovingPointSet,
MovingPointSetType
);
128
130
itkSetObjectMacro(Transform,
TransformType
);
131
133
itkGetConstObjectMacro(Transform,
TransformType
);
134
136
void
137
SetTransformParameters
(
const
ParametersType & parameters)
const
;
138
140
unsigned
int
141
GetNumberOfParameters
()
const override
142
{
143
return
this->
m_Transform
->GetNumberOfParameters();
144
}
145
149
virtual
void
150
Initialize
();
151
153
// \todo: currently not used
154
itkSetConstObjectMacro(FixedImageMask,
FixedImageMaskType
);
155
157
itkGetConstObjectMacro(FixedImageMask,
FixedImageMaskType
);
158
160
itkSetConstObjectMacro(MovingImageMask,
MovingImageMaskType
);
161
163
itkGetConstObjectMacro(MovingImageMask,
MovingImageMaskType
);
164
166
virtual
void
167
BeforeThreadedGetValueAndDerivative
(
const
TransformParametersType
& parameters)
const
;
168
170
itkSetMacro(UseMetricSingleThreaded,
bool
);
171
itkGetConstReferenceMacro(UseMetricSingleThreaded,
bool
);
172
itkBooleanMacro(UseMetricSingleThreaded);
173
174
protected
:
175
SingleValuedPointSetToPointSetMetric
() =
default
;
176
~SingleValuedPointSetToPointSetMetric
()
override
=
default
;
177
179
void
180
PrintSelf
(std::ostream & os, Indent indent)
const override
;
181
183
FixedPointSetConstPointer
m_FixedPointSet
{
nullptr
};
184
MovingPointSetConstPointer
m_MovingPointSet
{
nullptr
};
185
FixedImageMaskConstPointer
m_FixedImageMask
{
nullptr
};
186
MovingImageMaskConstPointer
m_MovingImageMask
{
nullptr
};
187
mutable
TransformPointer
m_Transform
{
nullptr
};
188
189
mutable
unsigned
int
m_NumberOfPointsCounted
{ 0 };
190
192
bool
m_UseMetricSingleThreaded
{
true
};
193
};
194
195
}
// end namespace itk
196
197
#ifndef ITK_MANUAL_INSTANTIATION
198
# include "itkSingleValuedPointSetToPointSetMetric.hxx"
199
#endif
200
201
#endif
itk::AdvancedTransform
Transform maps points, vectors and covariant vectors from an input space to an output space.
Definition
itkAdvancedTransform.h:84
itk::AdvancedTransform< CoordinateRepresentationType, Self::FixedPointSetDimension, Self::MovingPointSetDimension >::Pointer
SmartPointer< Self > Pointer
Definition
itkAdvancedTransform.h:91
itk::AdvancedTransform< CoordinateRepresentationType, Self::FixedPointSetDimension, Self::MovingPointSetDimension >::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
Definition
itkAdvancedTransform.h:133
itk::SingleValuedPointSetToPointSetMetric::FixedPointSetPixelType
typename FixedPointSetType::PixelType FixedPointSetPixelType
Definition
itkSingleValuedPointSetToPointSetMetric.h:80
itk::SingleValuedPointSetToPointSetMetric::FixedImageMaskPointer
typename FixedImageMaskType::Pointer FixedImageMaskPointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:102
itk::SingleValuedPointSetToPointSetMetric::ConstPointer
SmartPointer< const Self > ConstPointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:70
itk::SingleValuedPointSetToPointSetMetric::PointDataIterator
typename FixedPointSetType::PointDataContainer::ConstIterator PointDataIterator
Definition
itkSingleValuedPointSetToPointSetMetric.h:86
itk::SingleValuedPointSetToPointSetMetric::MovingImageMaskConstPointer
typename MovingImageMaskType::ConstPointer MovingImageMaskConstPointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:106
itk::SingleValuedPointSetToPointSetMetric::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(SingleValuedPointSetToPointSetMetric)
itk::SingleValuedPointSetToPointSetMetric::MovingPointSetPixelType
typename MovingPointSetType::PixelType MovingPointSetPixelType
Definition
itkSingleValuedPointSetToPointSetMetric.h:83
itk::SingleValuedPointSetToPointSetMetric::itkStaticConstMacro
itkStaticConstMacro(FixedPointSetDimension, unsigned int, TFixedPointSet::PointDimension)
itk::SingleValuedPointSetToPointSetMetric::Initialize
virtual void Initialize()
itk::SingleValuedPointSetToPointSetMetric::NonZeroJacobianIndicesType
typename TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition
itkSingleValuedPointSetToPointSetMetric.h:115
itk::SingleValuedPointSetToPointSetMetric< FixedPointSetType, MovingPointSetType >::m_MovingPointSet
MovingPointSetConstPointer m_MovingPointSet
Definition
itkSingleValuedPointSetToPointSetMetric.h:184
itk::SingleValuedPointSetToPointSetMetric::FixedImageMaskConstPointer
typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:103
itk::SingleValuedPointSetToPointSetMetric::itkStaticConstMacro
itkStaticConstMacro(MovingPointSetDimension, unsigned int, TMovingPointSet::PointDimension)
itk::SingleValuedPointSetToPointSetMetric::InputPointType
typename TransformType::InputPointType InputPointType
Definition
itkSingleValuedPointSetToPointSetMetric.h:96
itk::SingleValuedPointSetToPointSetMetric::TransformPointer
typename TransformType::Pointer TransformPointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:95
itk::SingleValuedPointSetToPointSetMetric::DerivativeValueType
typename DerivativeType::ValueType DerivativeValueType
Definition
itkSingleValuedPointSetToPointSetMetric.h:111
itk::SingleValuedPointSetToPointSetMetric::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::SingleValuedPointSetToPointSetMetric::MovingPointSetConstPointer
typename MovingPointSetType::ConstPointer MovingPointSetConstPointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:84
itk::SingleValuedPointSetToPointSetMetric::FixedPointSetConstPointer
typename FixedPointSetType::ConstPointer FixedPointSetConstPointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:81
itk::SingleValuedPointSetToPointSetMetric< FixedPointSetType, MovingPointSetType >::m_NumberOfPointsCounted
unsigned int m_NumberOfPointsCounted
Definition
itkSingleValuedPointSetToPointSetMetric.h:189
itk::SingleValuedPointSetToPointSetMetric::Pointer
SmartPointer< Self > Pointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:69
itk::SingleValuedPointSetToPointSetMetric::SingleValuedPointSetToPointSetMetric
SingleValuedPointSetToPointSetMetric()=default
itk::SingleValuedPointSetToPointSetMetric< FixedPointSetType, MovingPointSetType >::m_FixedPointSet
FixedPointSetConstPointer m_FixedPointSet
Definition
itkSingleValuedPointSetToPointSetMetric.h:183
itk::SingleValuedPointSetToPointSetMetric::~SingleValuedPointSetToPointSetMetric
~SingleValuedPointSetToPointSetMetric() override=default
itk::SingleValuedPointSetToPointSetMetric::GetNumberOfParameters
unsigned int GetNumberOfParameters() const override
Definition
itkSingleValuedPointSetToPointSetMetric.h:141
itk::SingleValuedPointSetToPointSetMetric::MovingImageMaskPointer
typename MovingImageMaskType::Pointer MovingImageMaskPointer
Definition
itkSingleValuedPointSetToPointSetMetric.h:105
itk::SingleValuedPointSetToPointSetMetric::MovingImageMaskType
ImageMaskSpatialObject< Self::MovingPointSetDimension > MovingImageMaskType
Definition
itkSingleValuedPointSetToPointSetMetric.h:104
itk::SingleValuedPointSetToPointSetMetric::MovingPointSetType
TMovingPointSet MovingPointSetType
Definition
itkSingleValuedPointSetToPointSetMetric.h:82
itk::SingleValuedPointSetToPointSetMetric< FixedPointSetType, MovingPointSetType >::m_Transform
TransformPointer m_Transform
Definition
itkSingleValuedPointSetToPointSetMetric.h:187
itk::SingleValuedPointSetToPointSetMetric::BeforeThreadedGetValueAndDerivative
virtual void BeforeThreadedGetValueAndDerivative(const TransformParametersType ¶meters) const
itk::SingleValuedPointSetToPointSetMetric::TransformType
AdvancedTransform< CoordinateRepresentationType, Self::FixedPointSetDimension, Self::MovingPointSetDimension > TransformType
Definition
itkSingleValuedPointSetToPointSetMetric.h:93
itk::SingleValuedPointSetToPointSetMetric::CoordinateRepresentationType
Superclass::ParametersValueType CoordinateRepresentationType
Definition
itkSingleValuedPointSetToPointSetMetric.h:73
itk::SingleValuedPointSetToPointSetMetric::TransformParametersType
typename TransformType::ParametersType TransformParametersType
Definition
itkSingleValuedPointSetToPointSetMetric.h:98
itk::SingleValuedPointSetToPointSetMetric::FixedImageMaskType
ImageMaskSpatialObject< Self::FixedPointSetDimension > FixedImageMaskType
Definition
itkSingleValuedPointSetToPointSetMetric.h:101
itk::SingleValuedPointSetToPointSetMetric::TransformJacobianType
typename TransformType::JacobianType TransformJacobianType
Definition
itkSingleValuedPointSetToPointSetMetric.h:99
itk::SingleValuedPointSetToPointSetMetric< FixedPointSetType, MovingPointSetType >::m_UseMetricSingleThreaded
bool m_UseMetricSingleThreaded
Definition
itkSingleValuedPointSetToPointSetMetric.h:192
itk::SingleValuedPointSetToPointSetMetric::FixedPointSetType
TFixedPointSet FixedPointSetType
Definition
itkSingleValuedPointSetToPointSetMetric.h:79
itk::SingleValuedPointSetToPointSetMetric::OutputPointType
typename TransformType::OutputPointType OutputPointType
Definition
itkSingleValuedPointSetToPointSetMetric.h:97
itk::SingleValuedPointSetToPointSetMetric::PointIterator
typename FixedPointSetType::PointsContainer::ConstIterator PointIterator
Definition
itkSingleValuedPointSetToPointSetMetric.h:85
itk::SingleValuedPointSetToPointSetMetric< FixedPointSetType, MovingPointSetType >::m_MovingImageMask
MovingImageMaskConstPointer m_MovingImageMask
Definition
itkSingleValuedPointSetToPointSetMetric.h:186
itk::SingleValuedPointSetToPointSetMetric::SetTransformParameters
void SetTransformParameters(const ParametersType ¶meters) const
itk::SingleValuedPointSetToPointSetMetric< FixedPointSetType, MovingPointSetType >::m_FixedImageMask
FixedImageMaskConstPointer m_FixedImageMask
Definition
itkSingleValuedPointSetToPointSetMetric.h:185
itk::SingleValuedPointSetToPointSetMetric::Superclass
SingleValuedCostFunction Superclass
Definition
itkSingleValuedPointSetToPointSetMetric.h:68
itk::SingleValuedPointSetToPointSetMetric::Self
SingleValuedPointSetToPointSetMetric Self
Definition
itkSingleValuedPointSetToPointSetMetric.h:67
itkAdvancedTransform.h
itk
Definition
itkAdvancedImageToImageMetric.h:43
Generated on 1768596610 for elastix by
1.15.0