go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
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
38
39template <typename TFixedPointSet, typename TMovingPointSet>
40class ITK_TEMPLATE_EXPORT MeshPenalty : public SingleValuedPointSetToPointSetMetric<TFixedPointSet, TMovingPointSet>
41{
42public:
44
48 using Pointer = SmartPointer<Self>;
49 using ConstPointer = SmartPointer<const Self>;
50
52
54 itkNewMacro(Self);
55
58
60 using typename Superclass::TransformType;
61 using typename Superclass::TransformPointer;
62 using typename Superclass::ParametersType;
64
65 using typename Superclass::MeasureType;
66 using typename Superclass::DerivativeType;
68
70 using typename Superclass::InputPointType;
71 using typename Superclass::OutputPointType;
72 using CoordinateType = typename InputPointType::CoordinateType;
73 using VnlVectorType = vnl_vector<CoordinateType>;
74 using FixedImagePointType = typename TransformType::InputPointType;
75 using MovingImagePointType = typename TransformType::OutputPointType;
77
79
81 itkStaticConstMacro(FixedPointSetDimension, unsigned int, Superclass::FixedPointSetDimension);
82
83 using PointNormalType = Vector<typename TransformType::ScalarType, FixedPointSetDimension>;
84 using DummyMeshPixelType = unsigned char;
86 DefaultStaticMeshTraits<PointNormalType, FixedPointSetDimension, FixedPointSetDimension, CoordinateType>;
87 using FixedMeshType = Mesh<PointNormalType, FixedPointSetDimension, MeshTraitsType>;
88
89 using FixedMeshConstPointer = typename FixedMeshType::ConstPointer;
90 using FixedMeshPointer = typename FixedMeshType::Pointer;
91 using CellInterfaceType = typename MeshTraitsType::CellType;
92
93 using MeshPointType = typename FixedMeshType::PointType;
94 using VectorType = typename FixedMeshType::PointType::VectorType;
95
96 using MeshPointsContainerType = typename FixedMeshType::PointsContainer;
97 using MeshPointsContainerPointer = typename MeshPointsContainerType::Pointer;
98 using MeshPointsContainerConstPointer = typename MeshPointsContainerType::ConstPointer;
99 using MeshPointsContainerConstIteratorType = typename FixedMeshType::PointsContainerConstIterator;
100 using MeshPointsContainerIteratorType = typename FixedMeshType::PointsContainerIterator;
101
102 using MeshPointDataContainerType = typename FixedMeshType::PointDataContainer;
103 using MeshPointDataContainerConstPointer = typename FixedMeshType::PointDataContainerConstPointer;
104 using MeshPointDataContainerPointer = typename FixedMeshType::PointDataContainerPointer;
105 using MeshPointDataContainerConstIteratorType = typename FixedMeshType::PointDataContainerIterator;
106
107 using MeshIdType = unsigned int;
108 using FixedMeshContainerType = VectorContainer<MeshIdType, FixedMeshConstPointer>;
109 using FixedMeshContainerPointer = typename FixedMeshContainerType::Pointer;
110 using FixedMeshContainerConstPointer = typename FixedMeshContainerType::ConstPointer;
111 using FixedMeshContainerElementIdentifier = typename FixedMeshContainerType::ElementIdentifier;
112
113 using MappedMeshContainerType = VectorContainer<MeshIdType, FixedMeshPointer>;
114 using MappedMeshContainerPointer = typename MappedMeshContainerType::Pointer;
115 using MappedMeshContainerConstPointer = typename MappedMeshContainerType::ConstPointer;
116
117 using MeshPointsDerivativeValueType = Array<DerivativeValueType>;
118
119 itkSetConstObjectMacro(FixedMeshContainer, FixedMeshContainerType);
120 itkGetConstObjectMacro(FixedMeshContainer, FixedMeshContainerType);
121
122 itkSetObjectMacro(MappedMeshContainer, MappedMeshContainerType);
124
126 // itkGetObjectMacro( MappedPoints, MeshPointsContainerPointer );
127
129 // itkSetConstObjectMacro( FixedMesh, FixedMeshType );
130
132 // itkGetConstObjectMacro( FixedMesh, FixedMeshType );
133
135 // itkSetObjectMacro( Transform, TransformType );
136
138 // itkGetConstObjectMacro( Transform, TransformType );
139
141 // void SetTransformParameters( const ParametersType & parameters ) const;
142
144 // unsigned int GetNumberOfParameters() const
145 //{ return this->m_Transform->GetNumberOfParameters(); }
146
150 void
151 Initialize() override;
152
154 // \todo: currently not used
155 // itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
156
158 // itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
159
161 MeasureType
162 GetValue(const ParametersType & parameters) const override;
163
165 void
166 GetDerivative(const ParametersType & parameters, DerivativeType & Derivative) const override;
167
169 void
170 GetValueAndDerivative(const ParametersType & parameters,
171 MeasureType & Value,
172 DerivativeType & Derivative) const override;
173
174protected:
176 ~MeshPenalty() override = default;
177
179 void
180 PrintSelf(std::ostream & os, Indent indent) const override;
181
185};
186
187} // end namespace itk
188
189#ifndef ITK_MANUAL_INSTANTIATION
190# include "itkPolydataDummyPenalty.hxx"
191#endif
192
193#endif
void PrintSelf(std::ostream &os, Indent indent) const override
void GetValueAndDerivative(const ParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override
itkGetModifiableObjectMacro(MappedMeshContainer, MappedMeshContainerType)
SingleValuedPointSetToPointSetMetric< typename MetricBase< TElastix >::FixedPointSetType, typename MetricBase< TElastix >::MovingPointSetType > Superclass
~MeshPenalty() override=default
ITK_DISALLOW_COPY_AND_MOVE(MeshPenalty)
void GetDerivative(const ParametersType &parameters, DerivativeType &Derivative) const override
void Initialize() override
itkStaticConstMacro(FixedPointSetDimension, unsigned int, Superclass::FixedPointSetDimension)
MeasureType GetValue(const ParametersType &parameters) const override
itkOverrideGetNameOfClassMacro(MeshPenalty)
DefaultStaticMeshTraits< PointNormalType, FixedPointSetDimension, FixedPointSetDimension, CoordinateType > MeshTraitsType
typename TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
AdvancedTransform< CoordinateRepresentationType, Self::FixedPointSetDimension, Self::MovingPointSetDimension > TransformType


Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo