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 
28 namespace itk
29 {
30 
39 template< class TFixedPointSet, class TMovingPointSet >
40 class ITK_EXPORT MeshPenalty :
41  public SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet >
42 {
43 public:
44 
46  typedef MeshPenalty Self;
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::CellInterface 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 );
129  itkGetObjectMacro( 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  virtual void Initialize( void ) throw ( ExceptionObject );
157 
159  // \todo: currently not used
160  //itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
161 
163  //itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
164 
166  MeasureType GetValue( const TransformParametersType & parameters ) const;
167 
169  void GetDerivative( const TransformParametersType & parameters,
170  DerivativeType & Derivative ) const;
171 
174  MeasureType & Value, DerivativeType & Derivative ) const;
175 
176 protected:
177 
179  virtual ~MeshPenalty();
180 
182  void PrintSelf( std::ostream & os, Indent indent ) const;
183 
187 
188 private:
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
itkSingleValuedPointSetToPointSetMetric.h
itk::MeshPenalty::TransformType
Superclass::TransformType TransformType
Definition: itkPolydataDummyPenalty.h:58
itk::AdvancedTransform::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkAdvancedTransform.h:125
itk::MeshPenalty::FixedMeshType
Mesh< PointNormalType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
Definition: itkPolydataDummyPenalty.h:91
itk::MeshPenalty::FixedMeshContainerPointer
FixedMeshContainerType::Pointer FixedMeshContainerPointer
Definition: itkPolydataDummyPenalty.h:115
itk::AdvancedTransform::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition: itkAdvancedTransform.h:143
itk::MeshPenalty::MeshPointsContainerConstPointer
MeshPointsContainerType::ConstPointer MeshPointsContainerConstPointer
Definition: itkPolydataDummyPenalty.h:102
itk::MeshPenalty::CellInterfaceType
MeshTraitsType::CellType::CellInterface CellInterfaceType
Definition: itkPolydataDummyPenalty.h:95
itk::SingleValuedPointSetToPointSetMetric< MetricBase< TElastix >::FixedPointSetType, MetricBase< TElastix >::MovingPointSetType >::TransformParametersType
TransformType::ParametersType TransformParametersType
Definition: itkSingleValuedPointSetToPointSetMetric.h:102
itk::AdvancedTransform::InputPointType
Superclass::InputPointType InputPointType
Definition: itkAdvancedTransform.h:124
SmartPointer< Self >
itk::MeshPenalty::PointNormalType
Vector< typename TransformType::ScalarType, FixedPointSetDimension > PointNormalType
Definition: itkPolydataDummyPenalty.h:86
itk::MeshPenalty::MeshPointDataContainerConstIteratorType
FixedMeshType::PointDataContainerIterator MeshPointDataContainerConstIteratorType
Definition: itkPolydataDummyPenalty.h:110
itk::MeshPenalty::MeshPointsContainerIteratorType
FixedMeshType::PointsContainerIterator MeshPointsContainerIteratorType
Definition: itkPolydataDummyPenalty.h:104
itk::MeshPenalty::GetValue
MeasureType GetValue(const TransformParametersType &parameters) const
itk::SingleValuedPointSetToPointSetMetric
Computes similarity between two point sets.
Definition: itkSingleValuedPointSetToPointSetMetric.h:64
itk::MeshPenalty::MeshTraitsType
DefaultStaticMeshTraits< PointNormalType, FixedPointSetDimension, FixedPointSetDimension, CoordRepType > MeshTraitsType
Definition: itkPolydataDummyPenalty.h:89
itk::MeshPenalty::MeshPointsContainerType
FixedMeshType::PointsContainer MeshPointsContainerType
Definition: itkPolydataDummyPenalty.h:100
itk::MeshPenalty::m_MappedMeshContainer
MappedMeshContainerPointer m_MappedMeshContainer
Definition: itkPolydataDummyPenalty.h:186
itk::MeshPenalty::MeshPointsContainerPointer
MeshPointsContainerType::Pointer MeshPointsContainerPointer
Definition: itkPolydataDummyPenalty.h:101
itk::MeshPenalty::FixedMeshConstPointer
FixedMeshType::ConstPointer FixedMeshConstPointer
Definition: itkPolydataDummyPenalty.h:93
itk::AdvancedTransform::ScalarType
Superclass::ScalarType ScalarType
Definition: itkAdvancedTransform.h:109
itk::MeshPenalty::DummyMeshPixelType
unsigned char DummyMeshPixelType
Definition: itkPolydataDummyPenalty.h:87
vnl_vector< CoordRepType >
itk::MeshPenalty::CoordRepType
InputPointType::CoordRepType CoordRepType
Definition: itkPolydataDummyPenalty.h:73
itk::MeshPenalty::GetValueAndDerivative
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const
itk::MeshPenalty::MovingImagePointType
TransformType::OutputPointType MovingImagePointType
Definition: itkPolydataDummyPenalty.h:76
itk::MeshPenalty
A dummy metric to generate transformed meshes each iteration.
Definition: itkPolydataDummyPenalty.h:42
itk::MeshPenalty::NonZeroJacobianIndicesType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkPolydataDummyPenalty.h:79
itk::MeshPenalty::MappedMeshContainerType
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
Definition: itkPolydataDummyPenalty.h:119
itk::MeshPenalty::GetDerivative
void GetDerivative(const TransformParametersType &parameters, DerivativeType &Derivative) const
itk::MeshPenalty::Self
MeshPenalty Self
Definition: itkPolydataDummyPenalty.h:46
itk::SingleValuedPointSetToPointSetMetric< MetricBase< TElastix >::FixedPointSetType, MetricBase< TElastix >::MovingPointSetType >::MeasureType
Superclass::MeasureType MeasureType
Definition: itkSingleValuedPointSetToPointSetMetric.h:115
itk::MeshPenalty::InputPointType
Superclass::InputPointType InputPointType
Definition: itkPolydataDummyPenalty.h:71
itk::MeshPenalty::FixedMeshContainerType
VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType
Definition: itkPolydataDummyPenalty.h:114
itk::MeshPenalty::FixedMeshContainerElementIdentifier
FixedMeshContainerType::ElementIdentifier FixedMeshContainerElementIdentifier
Definition: itkPolydataDummyPenalty.h:117
itk::MeshPenalty::MeshPenalty
MeshPenalty()
itk::MeshPenalty::VectorType
FixedMeshType::PointType::VectorType VectorType
Definition: itkPolydataDummyPenalty.h:98
itk::MeshPenalty::MeshPointsContainerConstIteratorType
FixedMeshType::PointsContainerConstIterator MeshPointsContainerConstIteratorType
Definition: itkPolydataDummyPenalty.h:103
itk::MeshPenalty::MeshPointDataContainerIteratorType
MeshPointDataContainerType::Iterator MeshPointDataContainerIteratorType
Definition: itkPolydataDummyPenalty.h:111
itk::MeshPenalty::operator=
void operator=(const Self &)
itk::MeshPenalty::~MeshPenalty
virtual ~MeshPenalty()
itk::MeshPenalty::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkPolydataDummyPenalty.h:67
itk::SingleValuedPointSetToPointSetMetric< MetricBase< TElastix >::FixedPointSetType, MetricBase< TElastix >::MovingPointSetType >::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkSingleValuedPointSetToPointSetMetric.h:116
itk::MeshPenalty::TransformJacobianType
Superclass::TransformJacobianType TransformJacobianType
Definition: itkPolydataDummyPenalty.h:64
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::MeshPenalty::MeshPenalty
MeshPenalty(const Self &)
itk::MeshPenalty::VnlVectorType
vnl_vector< CoordRepType > VnlVectorType
Definition: itkPolydataDummyPenalty.h:74
itk::MeshPenalty::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
itk::MeshPenalty::FixedMeshPointer
FixedMeshType::Pointer FixedMeshPointer
Definition: itkPolydataDummyPenalty.h:94
itk::MeshPenalty::MeasureType
Superclass::MeasureType MeasureType
Definition: itkPolydataDummyPenalty.h:66
itk::MeshPenalty::MappedMeshContainerConstPointer
MappedMeshContainerType::ConstPointer MappedMeshContainerConstPointer
Definition: itkPolydataDummyPenalty.h:121
itk::MeshPenalty::FixedImagePointType
TransformType::InputPointType FixedImagePointType
Definition: itkPolydataDummyPenalty.h:75
itk::MeshPenalty::MeshPointsDerivativeValueType
Array< DerivativeValueType > MeshPointsDerivativeValueType
Definition: itkPolydataDummyPenalty.h:123
itk::MeshPenalty::SpatialJacobianType
TransformType::SpatialJacobianType SpatialJacobianType
Definition: itkPolydataDummyPenalty.h:77
itk::MeshPenalty::Superclass
SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
Definition: itkPolydataDummyPenalty.h:48
itk::MeshPenalty::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkPolydataDummyPenalty.h:50
itk::MeshPenalty::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkPolydataDummyPenalty.h:72
itk::MeshPenalty::DerivativeValueType
Superclass::DerivativeValueType DerivativeValueType
Definition: itkPolydataDummyPenalty.h:68
itk::MeshPenalty::m_FixedMeshContainer
FixedMeshContainerConstPointer m_FixedMeshContainer
Definition: itkPolydataDummyPenalty.h:185
itk::MeshPenalty::MeshIdType
unsigned int MeshIdType
Definition: itkPolydataDummyPenalty.h:113
itk::MeshPenalty::MeshPointDataContainerConstPointer
FixedMeshType::PointDataContainerConstPointer MeshPointDataContainerConstPointer
Definition: itkPolydataDummyPenalty.h:107
itk::MeshPenalty::MeshPointDataContainerType
FixedMeshType::PointDataContainer MeshPointDataContainerType
Definition: itkPolydataDummyPenalty.h:106
itk::MeshPenalty::Initialize
virtual void Initialize(void)
itk::MeshPenalty::MappedMeshContainerPointer
MappedMeshContainerType::Pointer MappedMeshContainerPointer
Definition: itkPolydataDummyPenalty.h:120
itk::MeshPenalty::Pointer
SmartPointer< Self > Pointer
Definition: itkPolydataDummyPenalty.h:49
itk::MeshPenalty::FixedMeshContainerConstPointer
FixedMeshContainerType::ConstPointer FixedMeshContainerConstPointer
Definition: itkPolydataDummyPenalty.h:116
itk::MeshPenalty::itkStaticConstMacro
itkStaticConstMacro(FixedPointSetDimension, unsigned int, Superclass::FixedPointSetDimension)
itk::MeshPenalty::MeshPointDataContainerPointer
FixedMeshType::PointDataContainerPointer MeshPointDataContainerPointer
Definition: itkPolydataDummyPenalty.h:108
itk::MeshPenalty::TransformPointer
Superclass::TransformPointer TransformPointer
Definition: itkPolydataDummyPenalty.h:62
itk::MeshPenalty::MeshPointType
FixedMeshType::PointType MeshPointType
Definition: itkPolydataDummyPenalty.h:97
itk::MeshPenalty::TransformParametersType
Superclass::TransformParametersType TransformParametersType
Definition: itkPolydataDummyPenalty.h:63


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo