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 
29 namespace itk
30 {
31 
43 template< class TFixedPointSet, class TMovingPointSet >
45  public SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet >
46 {
47 public:
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::CellInterface 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 );
135  itkGetObjectMacro( MappedMeshContainer, MappedMeshContainerType );
136 
140  virtual void Initialize( void ) throw ( ExceptionObject );
141 
143  // \todo: currently not used
144  //itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
145 
147  //itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
148 
150  MeasureType GetValue( const TransformParametersType & parameters ) const;
151 
153  void GetDerivative( const TransformParametersType & parameters,
154  DerivativeType & Derivative ) const;
155 
158  MeasureType & Value, DerivativeType & Derivative ) const;
159 
160 protected:
161 
164 
166  //void PrintSelf(std::ostream& os, Indent indent) const;
167 
170 
173 
174 private:
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
itk::MissingVolumeMeshPenalty::VnlVectorType
vnl_vector< CoordRepType > VnlVectorType
Definition: itkMissingStructurePenalty.h:78
itk::MissingVolumeMeshPenalty::MeshPointDataContainerConstIteratorType
FixedMeshType::PointDataContainerIterator MeshPointDataContainerConstIteratorType
Definition: itkMissingStructurePenalty.h:116
itkSingleValuedPointSetToPointSetMetric.h
itk::MissingVolumeMeshPenalty::FixedMeshConstPointer
FixedMeshType::ConstPointer FixedMeshConstPointer
Definition: itkMissingStructurePenalty.h:96
itk::MissingVolumeMeshPenalty::MeshIdType
unsigned int MeshIdType
Definition: itkMissingStructurePenalty.h:119
itk::MissingVolumeMeshPenalty::TransformPointer
Superclass::TransformPointer TransformPointer
Definition: itkMissingStructurePenalty.h:67
itk::MissingVolumeMeshPenalty::TransformParametersType
Superclass::TransformParametersType TransformParametersType
Definition: itkMissingStructurePenalty.h:68
itk::MissingVolumeMeshPenalty::VectorType
FixedMeshType::PointType::VectorType VectorType
Definition: itkMissingStructurePenalty.h:101
itk::MissingVolumeMeshPenalty::MeshPointDataContainerPointer
FixedMeshType::PointDataContainerPointer MeshPointDataContainerPointer
Definition: itkMissingStructurePenalty.h:114
itk::MissingVolumeMeshPenalty::MeshPointDataContainerType
FixedMeshType::PointDataContainer MeshPointDataContainerType
Definition: itkMissingStructurePenalty.h:112
itk::MissingVolumeMeshPenalty::GetValue
MeasureType GetValue(const TransformParametersType &parameters) const
itk::SingleValuedPointSetToPointSetMetric::TransformParametersType
TransformType::ParametersType TransformParametersType
Definition: itkSingleValuedPointSetToPointSetMetric.h:102
SmartPointer< Self >
itk::MissingVolumeMeshPenalty::Initialize
virtual void Initialize(void)
itk::MissingVolumeMeshPenalty::MeshPointsContainerConstIteratorType
FixedMeshType::PointsContainerConstIterator MeshPointsContainerConstIteratorType
Definition: itkMissingStructurePenalty.h:109
itk::SingleValuedPointSetToPointSetMetric::TransformPointer
TransformType::Pointer TransformPointer
Definition: itkSingleValuedPointSetToPointSetMetric.h:99
itk::SingleValuedPointSetToPointSetMetric
Computes similarity between two point sets.
Definition: itkSingleValuedPointSetToPointSetMetric.h:64
itk::MissingVolumeMeshPenalty::~MissingVolumeMeshPenalty
virtual ~MissingVolumeMeshPenalty()
vnl_adjugate_fixed.h
itk::MissingVolumeMeshPenalty::MeshPointType
FixedMeshType::PointType MeshPointType
Definition: itkMissingStructurePenalty.h:100
itk::MissingVolumeMeshPenalty::MeshPointsContainerConstPointer
MeshPointsContainerType::ConstPointer MeshPointsContainerConstPointer
Definition: itkMissingStructurePenalty.h:108
itk::SingleValuedPointSetToPointSetMetric::OutputPointType
TransformType::OutputPointType OutputPointType
Definition: itkSingleValuedPointSetToPointSetMetric.h:101
itk::MissingVolumeMeshPenalty::CellInterfaceType
MeshTraitsType::CellType::CellInterface CellInterfaceType
Definition: itkMissingStructurePenalty.h:98
itk::MissingVolumeMeshPenalty::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkMissingStructurePenalty.h:76
itk::MissingVolumeMeshPenalty::MeshPointsContainerType
FixedMeshType::PointsContainer MeshPointsContainerType
Definition: itkMissingStructurePenalty.h:106
itk::MissingVolumeMeshPenalty::FixedMeshContainerPointer
FixedMeshContainerType::Pointer FixedMeshContainerPointer
Definition: itkMissingStructurePenalty.h:121
itk::MissingVolumeMeshPenalty::MappedMeshContainerType
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
Definition: itkMissingStructurePenalty.h:125
itk::MissingVolumeMeshPenalty::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkMissingStructurePenalty.h:54
vnl_vector< CoordRepType >
itk::MissingVolumeMeshPenalty::FixedMeshPointer
FixedMeshType::Pointer FixedMeshPointer
Definition: itkMissingStructurePenalty.h:97
itk::MissingVolumeMeshPenalty::VectorConstPointer
VectorType::const_pointer VectorConstPointer
Definition: itkMissingStructurePenalty.h:102
itk::MissingVolumeMeshPenalty::Pointer
SmartPointer< Self > Pointer
Definition: itkMissingStructurePenalty.h:53
itk::MissingVolumeMeshPenalty
Computes the (pseudo) volume of the transformed surface mesh of a structure. .
Definition: itkMissingStructurePenalty.h:46
itk::MissingVolumeMeshPenalty::MeshPointDataContainerConstPointer
FixedMeshType::PointDataContainerConstPointer MeshPointDataContainerConstPointer
Definition: itkMissingStructurePenalty.h:113
itk::MissingVolumeMeshPenalty::FixedMeshContainerElementIdentifier
FixedMeshContainerType::ElementIdentifier FixedMeshContainerElementIdentifier
Definition: itkMissingStructurePenalty.h:123
itk::SingleValuedPointSetToPointSetMetric::MeasureType
Superclass::MeasureType MeasureType
Definition: itkSingleValuedPointSetToPointSetMetric.h:115
itk::SingleValuedPointSetToPointSetMetric::DerivativeValueType
DerivativeType::ValueType DerivativeValueType
Definition: itkSingleValuedPointSetToPointSetMetric.h:117
itk::MissingVolumeMeshPenalty::FixedMeshType
Mesh< DummyMeshPixelType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
Definition: itkMissingStructurePenalty.h:93
itk::SingleValuedPointSetToPointSetMetric::InputPointType
TransformType::InputPointType InputPointType
Definition: itkSingleValuedPointSetToPointSetMetric.h:100
itk::SingleValuedPointSetToPointSetMetric::NonZeroJacobianIndicesType
TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkSingleValuedPointSetToPointSetMetric.h:121
itk::MissingVolumeMeshPenalty::MappedMeshContainerPointer
MappedMeshContainerType::Pointer MappedMeshContainerPointer
Definition: itkMissingStructurePenalty.h:126
itk::MissingVolumeMeshPenalty::MissingVolumeMeshPenalty
MissingVolumeMeshPenalty(const Self &)
itk::MissingVolumeMeshPenalty::FixedMeshContainerConstPointer
FixedMeshContainerType::ConstPointer FixedMeshContainerConstPointer
Definition: itkMissingStructurePenalty.h:122
itk::MissingVolumeMeshPenalty::MeshPointDataContainerIteratorType
MeshPointDataContainerType::Iterator MeshPointDataContainerIteratorType
Definition: itkMissingStructurePenalty.h:117
itk::MissingVolumeMeshPenalty::GetDerivative
void GetDerivative(const TransformParametersType &parameters, DerivativeType &Derivative) const
itk::MissingVolumeMeshPenalty::MeshPointsContainerIteratorType
FixedMeshType::PointsContainerIterator MeshPointsContainerIteratorType
Definition: itkMissingStructurePenalty.h:110
itk::MissingVolumeMeshPenalty::MeshPointsDerivativeValueType
Array< DerivativeValueType > MeshPointsDerivativeValueType
Definition: itkMissingStructurePenalty.h:129
itk::MissingVolumeMeshPenalty::itkStaticConstMacro
itkStaticConstMacro(FixedPointSetDimension, unsigned int, Superclass::FixedPointSetDimension)
itk::MissingVolumeMeshPenalty::operator=
void operator=(const Self &)
itk::MissingVolumeMeshPenalty::MeasureType
Superclass::MeasureType MeasureType
Definition: itkMissingStructurePenalty.h:71
itk::MissingVolumeMeshPenalty::itkStaticConstMacro
itkStaticConstMacro(MovingPointSetDimension, unsigned int, Superclass::MovingPointSetDimension)
itk::MissingVolumeMeshPenalty::NonZeroJacobianIndicesType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkMissingStructurePenalty.h:80
itk::MissingVolumeMeshPenalty::m_FixedMeshContainer
FixedMeshContainerConstPointer m_FixedMeshContainer
Definition: itkMissingStructurePenalty.h:171
itk::MissingVolumeMeshPenalty::m_MappedMeshContainer
MappedMeshContainerPointer m_MappedMeshContainer
Definition: itkMissingStructurePenalty.h:172
itk::SingleValuedPointSetToPointSetMetric::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkSingleValuedPointSetToPointSetMetric.h:116
itk::MissingVolumeMeshPenalty::MeshPointsContainerPointer
MeshPointsContainerType::Pointer MeshPointsContainerPointer
Definition: itkMissingStructurePenalty.h:107
itk::MissingVolumeMeshPenalty::Self
MissingVolumeMeshPenalty Self
Definition: itkMissingStructurePenalty.h:50
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::MissingVolumeMeshPenalty::MissingVolumeMeshPenalty
MissingVolumeMeshPenalty()
itk::MissingVolumeMeshPenalty::SubVectorType
itk::Vector< typename VectorType::ValueType, FixedPointSetDimension - 1 > SubVectorType
Definition: itkMissingStructurePenalty.h:104
itk::MissingVolumeMeshPenalty::MeshTraitsType
DefaultStaticMeshTraits< DummyMeshPixelType, FixedPointSetDimension, FixedPointSetDimension, CoordRepType > MeshTraitsType
Definition: itkMissingStructurePenalty.h:91
itk::MissingVolumeMeshPenalty::MappedMeshContainerConstPointer
MappedMeshContainerType::ConstPointer MappedMeshContainerConstPointer
Definition: itkMissingStructurePenalty.h:127
itk::MissingVolumeMeshPenalty::SubVector
void SubVector(const VectorType &fullVector, SubVectorType &subVector, const unsigned int leaveOutIndex) const
itk::MissingVolumeMeshPenalty::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkMissingStructurePenalty.h:72
itk::MissingVolumeMeshPenalty::FixedMeshPointIdentifier
FixedMeshType::PointIdentifier FixedMeshPointIdentifier
Definition: itkMissingStructurePenalty.h:94
itk::MissingVolumeMeshPenalty::TransformJacobianType
Superclass::TransformJacobianType TransformJacobianType
Definition: itkMissingStructurePenalty.h:69
itk::MissingVolumeMeshPenalty::Superclass
SingleValuedPointSetToPointSetMetric< TFixedPointSet, TMovingPointSet > Superclass
Definition: itkMissingStructurePenalty.h:52
itk::MissingVolumeMeshPenalty::DummyMeshPixelType
unsigned char DummyMeshPixelType
Definition: itkMissingStructurePenalty.h:89
itk::MissingVolumeMeshPenalty::InputPointType
Superclass::InputPointType InputPointType
Definition: itkMissingStructurePenalty.h:75
itk::MissingVolumeMeshPenalty::TransformType
Superclass::TransformType TransformType
Definition: itkMissingStructurePenalty.h:63
itk::MissingVolumeMeshPenalty::m_FixedMesh
FixedMeshConstPointer m_FixedMesh
Definition: itkMissingStructurePenalty.h:169
itk::SingleValuedPointSetToPointSetMetric::TransformType
AdvancedTransform< CoordinateRepresentationType, itkGetStaticConstMacro(FixedPointSetDimension), itkGetStaticConstMacro(MovingPointSetDimension) > TransformType
Definition: itkSingleValuedPointSetToPointSetMetric.h:98
itk::MissingVolumeMeshPenalty::CoordRepType
OutputPointType::CoordRepType CoordRepType
Definition: itkMissingStructurePenalty.h:77
itk::SingleValuedPointSetToPointSetMetric::TransformJacobianType
TransformType::JacobianType TransformJacobianType
Definition: itkSingleValuedPointSetToPointSetMetric.h:103
itk::MissingVolumeMeshPenalty::DerivativeValueType
Superclass::DerivativeValueType DerivativeValueType
Definition: itkMissingStructurePenalty.h:73
itk::MissingVolumeMeshPenalty::FixedMeshContainerType
VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType
Definition: itkMissingStructurePenalty.h:120
itk::MissingVolumeMeshPenalty::GetValueAndDerivative
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo