go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkMissingStructurePenalty.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 __itkMissingStructurePenalty_h
19#define __itkMissingStructurePenalty_h
20
22#include "itkPoint.h"
23#include "itkPointSet.h"
24#include "itkImage.h"
25#include "itkMesh.h"
26#include "itkVectorContainer.h"
27#include "vnl_adjugate_fixed.h"
28
29namespace itk
30{
31
43template< class TFixedPointSet, class TMovingPointSet >
45 public SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet >
46{
47public:
48
52 TFixedPointSet, TMovingPointSet > Superclass;
54 typedef SmartPointer< const Self > ConstPointer;
55
59 itkNewMacro( Self );
60
62 itkTypeMacro( MissingVolumeMeshPenalty,
64
70
74
77 typedef typename OutputPointType::CoordRepType CoordRepType;
79
81
83 itkStaticConstMacro( FixedPointSetDimension, unsigned int,
84 Superclass::FixedPointSetDimension );
85 itkStaticConstMacro( MovingPointSetDimension, unsigned int,
86 Superclass::MovingPointSetDimension );
87
89 typedef unsigned char DummyMeshPixelType;
90 typedef DefaultStaticMeshTraits< DummyMeshPixelType,
91 FixedPointSetDimension, FixedPointSetDimension, CoordRepType > MeshTraitsType;
92 typedef Mesh< DummyMeshPixelType, FixedPointSetDimension,
94 typedef typename FixedMeshType::PointIdentifier FixedMeshPointIdentifier;
95
96 typedef typename FixedMeshType::ConstPointer FixedMeshConstPointer;
97 typedef typename FixedMeshType::Pointer FixedMeshPointer;
98 typedef typename MeshTraitsType::CellType CellInterfaceType;
99
100 typedef typename FixedMeshType::PointType MeshPointType;
101 typedef typename FixedMeshType::PointType::VectorType VectorType;
102 typedef typename VectorType::const_pointer VectorConstPointer;
103 typedef itk::Vector<
104 typename VectorType::ValueType, FixedPointSetDimension - 1 > SubVectorType;
105
106 typedef typename FixedMeshType::PointsContainer MeshPointsContainerType;
107 typedef typename MeshPointsContainerType::Pointer MeshPointsContainerPointer;
108 typedef typename MeshPointsContainerType::ConstPointer MeshPointsContainerConstPointer;
109 typedef typename FixedMeshType::PointsContainerConstIterator MeshPointsContainerConstIteratorType;
110 typedef typename FixedMeshType::PointsContainerIterator MeshPointsContainerIteratorType;
111
112 typedef typename FixedMeshType::PointDataContainer MeshPointDataContainerType;
113 typedef typename FixedMeshType::PointDataContainerConstPointer MeshPointDataContainerConstPointer;
114 typedef typename FixedMeshType::PointDataContainerPointer MeshPointDataContainerPointer;
115 //typedef typename FixedMeshType::PointDataContainerConstIterator MeshPointDataContainerConstIteratorType;
116 typedef typename FixedMeshType::PointDataContainerIterator MeshPointDataContainerConstIteratorType;
117 typedef typename MeshPointDataContainerType::Iterator MeshPointDataContainerIteratorType;
118
119 typedef unsigned int MeshIdType;
120 typedef VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType;
121 typedef typename FixedMeshContainerType::Pointer FixedMeshContainerPointer;
122 typedef typename FixedMeshContainerType::ConstPointer FixedMeshContainerConstPointer;
123 typedef typename FixedMeshContainerType::ElementIdentifier FixedMeshContainerElementIdentifier;
124
125 typedef VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType;
126 typedef typename MappedMeshContainerType::Pointer MappedMeshContainerPointer;
127 typedef typename MappedMeshContainerType::ConstPointer MappedMeshContainerConstPointer;
128
129 typedef Array< DerivativeValueType > MeshPointsDerivativeValueType;
130
131 itkSetConstObjectMacro( FixedMeshContainer, FixedMeshContainerType );
132 itkGetConstObjectMacro( FixedMeshContainer, FixedMeshContainerType );
133
134 itkSetObjectMacro( MappedMeshContainer, MappedMeshContainerType );
136
140 void Initialize( void ) override;
141
143 // \todo: currently not used
144 //itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
145
147 //itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
148
150 MeasureType GetValue( const TransformParametersType & parameters ) const override;
151
153 void GetDerivative( const TransformParametersType & parameters,
154 DerivativeType & Derivative ) const override;
155
158 MeasureType & Value, DerivativeType & Derivative ) const override;
159
160protected:
161
164
166 //void PrintSelf(std::ostream& os, Indent indent) const;
167
170
173
174private:
175
176 void SubVector( const VectorType & fullVector, SubVectorType & subVector, const unsigned int leaveOutIndex ) const;
177
178 MissingVolumeMeshPenalty( const Self & ); // purposely not implemented
179 void operator=( const Self & ); // purposely not implemented
180
181};
182
183} // end namespace itk
184
185#ifndef ITK_MANUAL_INSTANTIATION
186#include "itkMissingStructurePenalty.hxx"
187#endif
188
189#endif
Computes the (pseudo) volume of the transformed surface mesh of a structure. .
SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override
FixedMeshType::PointDataContainerConstPointer MeshPointDataContainerConstPointer
FixedMeshType::PointsContainer MeshPointsContainerType
FixedMeshContainerType::ElementIdentifier FixedMeshContainerElementIdentifier
FixedMeshContainerType::ConstPointer FixedMeshContainerConstPointer
OutputPointType::CoordRepType CoordRepType
MeasureType GetValue(const TransformParametersType &parameters) const override
Superclass::TransformPointer TransformPointer
FixedMeshContainerConstPointer m_FixedMeshContainer
itkStaticConstMacro(MovingPointSetDimension, unsigned int, Superclass::MovingPointSetDimension)
MeshTraitsType::CellType CellInterfaceType
Superclass::InputPointType InputPointType
FixedMeshType::PointDataContainerIterator MeshPointDataContainerConstIteratorType
VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType
FixedMeshType::PointDataContainer MeshPointDataContainerType
MeshPointDataContainerType::Iterator MeshPointDataContainerIteratorType
itkGetModifiableObjectMacro(MappedMeshContainer, MappedMeshContainerType)
void SubVector(const VectorType &fullVector, SubVectorType &subVector, const unsigned int leaveOutIndex) const
Superclass::TransformType TransformType
FixedMeshType::PointIdentifier FixedMeshPointIdentifier
void GetDerivative(const TransformParametersType &parameters, DerivativeType &Derivative) const override
Superclass::TransformJacobianType TransformJacobianType
MappedMeshContainerType::ConstPointer MappedMeshContainerConstPointer
SmartPointer< const Self > ConstPointer
FixedMeshType::PointsContainerConstIterator MeshPointsContainerConstIteratorType
DefaultStaticMeshTraits< DummyMeshPixelType, FixedPointSetDimension, FixedPointSetDimension, CoordRepType > MeshTraitsType
Superclass::DerivativeValueType DerivativeValueType
VectorType::const_pointer VectorConstPointer
Array< DerivativeValueType > MeshPointsDerivativeValueType
itk::Vector< typename VectorType::ValueType, FixedPointSetDimension - 1 > SubVectorType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
itkStaticConstMacro(FixedPointSetDimension, unsigned int, Superclass::FixedPointSetDimension)
void operator=(const Self &)
MeshPointsContainerType::ConstPointer MeshPointsContainerConstPointer
Superclass::DerivativeType DerivativeType
MeshPointsContainerType::Pointer MeshPointsContainerPointer
FixedMeshType::ConstPointer FixedMeshConstPointer
MappedMeshContainerPointer m_MappedMeshContainer
Superclass::OutputPointType OutputPointType
FixedMeshType::PointDataContainerPointer MeshPointDataContainerPointer
MissingVolumeMeshPenalty(const Self &)
vnl_vector< CoordRepType > VnlVectorType
MappedMeshContainerType::Pointer MappedMeshContainerPointer
FixedMeshContainerType::Pointer FixedMeshContainerPointer
FixedMeshType::PointType::VectorType VectorType
FixedMeshType::PointsContainerIterator MeshPointsContainerIteratorType
void Initialize(void) override
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
Mesh< DummyMeshPixelType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
Superclass::TransformParametersType TransformParametersType
TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
AdvancedTransform< CoordinateRepresentationType, itkGetStaticConstMacro(FixedPointSetDimension), itkGetStaticConstMacro(MovingPointSetDimension) > TransformType


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo