go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkPolydataDummyPenalty.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#ifndef __itkPolydataDummyPenalty_h
19#define __itkPolydataDummyPenalty_h
20
22#include "itkPoint.h"
23#include "itkPointSet.h"
24#include "itkImage.h"
25#include "itkMesh.h"
26#include <itkVectorContainer.h>
27
28namespace itk
29{
30
39template< class TFixedPointSet, class TMovingPointSet >
40class ITK_EXPORT MeshPenalty :
41 public SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet >
42{
43public:
44
48 TFixedPointSet, TMovingPointSet > Superclass;
50 typedef SmartPointer< const Self > ConstPointer;
51
55 itkNewMacro( Self );
56
59
61 typedef typename Superclass::TransformType TransformType;
62 typedef typename Superclass::TransformPointer TransformPointer;
63 typedef typename Superclass::TransformParametersType TransformParametersType;
64 typedef typename Superclass::TransformJacobianType TransformJacobianType;
65
66 typedef typename Superclass::MeasureType MeasureType;
67 typedef typename Superclass::DerivativeType DerivativeType;
68 typedef typename Superclass::DerivativeValueType DerivativeValueType;
69
71 typedef typename Superclass::InputPointType InputPointType;
72 typedef typename Superclass::OutputPointType OutputPointType;
73 typedef typename InputPointType::CoordRepType CoordRepType;
78
79 typedef typename Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
80
82 itkStaticConstMacro( FixedPointSetDimension, unsigned int,
83 Superclass::FixedPointSetDimension );
84
85 typedef Vector< typename TransformType::ScalarType,
86 FixedPointSetDimension > PointNormalType;
87 typedef unsigned char DummyMeshPixelType;
88 typedef DefaultStaticMeshTraits< PointNormalType,
89 FixedPointSetDimension, FixedPointSetDimension, CoordRepType > MeshTraitsType;
90 typedef Mesh< PointNormalType, FixedPointSetDimension,
92
93 typedef typename FixedMeshType::ConstPointer FixedMeshConstPointer;
94 typedef typename FixedMeshType::Pointer FixedMeshPointer;
95 typedef typename MeshTraitsType::CellType CellInterfaceType;
96
97 typedef typename FixedMeshType::PointType MeshPointType;
98 typedef typename FixedMeshType::PointType::VectorType VectorType;
99
100 typedef typename FixedMeshType::PointsContainer MeshPointsContainerType;
101 typedef typename MeshPointsContainerType::Pointer MeshPointsContainerPointer;
102 typedef typename MeshPointsContainerType::ConstPointer MeshPointsContainerConstPointer;
103 typedef typename FixedMeshType::PointsContainerConstIterator MeshPointsContainerConstIteratorType;
104 typedef typename FixedMeshType::PointsContainerIterator MeshPointsContainerIteratorType;
105
106 typedef typename FixedMeshType::PointDataContainer MeshPointDataContainerType;
107 typedef typename FixedMeshType::PointDataContainerConstPointer MeshPointDataContainerConstPointer;
108 typedef typename FixedMeshType::PointDataContainerPointer MeshPointDataContainerPointer;
109 //typedef typename FixedMeshType::PointDataContainerConstIterator MeshPointDataContainerConstIteratorType;
110 typedef typename FixedMeshType::PointDataContainerIterator MeshPointDataContainerConstIteratorType;
111 typedef typename MeshPointDataContainerType::Iterator MeshPointDataContainerIteratorType;
112
113 typedef unsigned int MeshIdType;
114 typedef VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType;
115 typedef typename FixedMeshContainerType::Pointer FixedMeshContainerPointer;
116 typedef typename FixedMeshContainerType::ConstPointer FixedMeshContainerConstPointer;
117 typedef typename FixedMeshContainerType::ElementIdentifier FixedMeshContainerElementIdentifier;
118
119 typedef VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType;
120 typedef typename MappedMeshContainerType::Pointer MappedMeshContainerPointer;
121 typedef typename MappedMeshContainerType::ConstPointer MappedMeshContainerConstPointer;
122
123 typedef Array< DerivativeValueType > MeshPointsDerivativeValueType;
124
125 itkSetConstObjectMacro( FixedMeshContainer, FixedMeshContainerType );
126 itkGetConstObjectMacro( FixedMeshContainer, FixedMeshContainerType );
127
128 itkSetObjectMacro( MappedMeshContainer, MappedMeshContainerType );
130
132 //itkGetObjectMacro( MappedPoints, MeshPointsContainerPointer );
133
135 //itkSetConstObjectMacro( FixedMesh, FixedMeshType );
136
138 //itkGetConstObjectMacro( FixedMesh, FixedMeshType );
139
141 //itkSetObjectMacro( Transform, TransformType );
142
144 //itkGetConstObjectMacro( Transform, TransformType );
145
147 //void SetTransformParameters( const ParametersType & parameters ) const;
148
150 //unsigned int GetNumberOfParameters( void ) const
151 //{ return this->m_Transform->GetNumberOfParameters(); }
152
156 void Initialize( void ) override;
157
159 // \todo: currently not used
160 //itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
161
163 //itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
164
166 MeasureType GetValue( const TransformParametersType & parameters ) const override;
167
169 void GetDerivative( const TransformParametersType & parameters,
170 DerivativeType & Derivative ) const override;
171
174 MeasureType & Value, DerivativeType & Derivative ) const override;
175
176protected:
177
179 ~MeshPenalty() override;
180
182 void PrintSelf( std::ostream & os, Indent indent ) const override;
183
187
188private:
189
190 MeshPenalty( const Self & ); // purposely not implemented
191 void operator=( const Self & ); // purposely not implemented
192
193};
194
195} // end namespace itk
196
197#ifndef ITK_MANUAL_INSTANTIATION
198#include "itkPolydataDummyPenalty.hxx"
199#endif
200
201#endif
Superclass::OutputPointType OutputPointType
Superclass::InputPointType InputPointType
Superclass::ScalarType ScalarType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
A dummy metric to generate transformed meshes each iteration.
FixedMeshContainerType::ElementIdentifier FixedMeshContainerElementIdentifier
TransformType::OutputPointType MovingImagePointType
void PrintSelf(std::ostream &os, Indent indent) const override
SmartPointer< const Self > ConstPointer
FixedMeshType::PointDataContainerPointer MeshPointDataContainerPointer
itkGetModifiableObjectMacro(MappedMeshContainer, MappedMeshContainerType)
Superclass::TransformParametersType TransformParametersType
FixedMeshContainerConstPointer m_FixedMeshContainer
Superclass::InputPointType InputPointType
FixedMeshContainerType::ConstPointer FixedMeshContainerConstPointer
FixedMeshType::PointDataContainer MeshPointDataContainerType
SmartPointer< Self > Pointer
Superclass::TransformType TransformType
DefaultStaticMeshTraits< PointNormalType, FixedPointSetDimension, FixedPointSetDimension, CoordRepType > MeshTraitsType
MeshPointsContainerType::ConstPointer MeshPointsContainerConstPointer
FixedMeshType::PointDataContainerConstPointer MeshPointDataContainerConstPointer
MeshPenalty(const Self &)
TransformType::InputPointType FixedImagePointType
unsigned char DummyMeshPixelType
Superclass::MeasureType MeasureType
Superclass::TransformPointer TransformPointer
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override
MappedMeshContainerPointer m_MappedMeshContainer
Superclass::OutputPointType OutputPointType
itkStaticConstMacro(FixedPointSetDimension, unsigned int, Superclass::FixedPointSetDimension)
FixedMeshType::Pointer FixedMeshPointer
FixedMeshType::PointType::VectorType VectorType
FixedMeshType::ConstPointer FixedMeshConstPointer
FixedMeshType::PointsContainerConstIterator MeshPointsContainerConstIteratorType
~MeshPenalty() override
Mesh< PointNormalType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
void Initialize(void) override
MeshPointDataContainerType::Iterator MeshPointDataContainerIteratorType
Superclass::DerivativeType DerivativeType
FixedMeshType::PointDataContainerIterator MeshPointDataContainerConstIteratorType
MappedMeshContainerType::ConstPointer MappedMeshContainerConstPointer
Superclass::DerivativeValueType DerivativeValueType
MappedMeshContainerType::Pointer MappedMeshContainerPointer
FixedMeshContainerType::Pointer FixedMeshContainerPointer
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
InputPointType::CoordRepType CoordRepType
void operator=(const Self &)
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
FixedMeshType::PointsContainerIterator MeshPointsContainerIteratorType
MeshTraitsType::CellType CellInterfaceType
Superclass::TransformJacobianType TransformJacobianType
MeshPointsContainerType::Pointer MeshPointsContainerPointer
vnl_vector< CoordRepType > VnlVectorType
void GetDerivative(const TransformParametersType &parameters, DerivativeType &Derivative) const override
FixedMeshType::PointsContainer MeshPointsContainerType
MeasureType GetValue(const TransformParametersType &parameters) const override
Vector< typename TransformType::ScalarType, FixedPointSetDimension > PointNormalType
SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
Array< DerivativeValueType > MeshPointsDerivativeValueType
VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType
FixedMeshType::PointType MeshPointType
TransformType::SpatialJacobianType SpatialJacobianType


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo