go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxPolydataDummyPenalty.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 __elxPolydataDummyPenalty_H__
19 #define __elxPolydataDummyPenalty_H__
20 
21 #include "elxIncludes.h"
23 
24 //#include "elxMetricBase.h"
25 
26 #include "itkMeshFileReader.h"
27 #include "itkMeshFileWriter.h"
28 
29 namespace elastix
30 {
51 //TODO: define a base class templated on meshes in stead of 2 pointsets.
52 //typedef unsigned char DummyPixelType;
53 //typedef unsigned char BinaryPixelType;
54 //typedef itk::Mesh<BinaryPixelType,FixedImageDimension> FixedMeshType;
55 //typedef itk::Mesh <DummyPixelType, MetricBase<TElastix>::FixedImageDimension> FixedMeshType; //pixeltype is unused, but necessary for the declaration, so a type with the smallest memory footprint is used.
56 // template <class TElastix >
57 //class PolydataDummyPenalty
58 // : public
59 // itk::MeshPenalty < itk::Mesh<DummyPixelType, MetricBase <TElastix>::FixedImageDimension > >,
60 // public MetricBase<TElastix>
61 //
62 template< class TElastix >
64  public
66  typename MetricBase< TElastix >::FixedPointSetType,
67  typename MetricBase< TElastix >::MovingPointSetType >,
68  public MetricBase< TElastix >
69 {
70 public:
71 
74  typedef itk::MeshPenalty<
78  typedef itk::SmartPointer< Self > Pointer;
79  typedef itk::SmartPointer< const Self > ConstPointer;
80 
82  itkNewMacro( Self );
83 
86 
91  elxClassNameMacro( "PolydataDummyPenalty" );
92 
97 
108 
109  // typedef typename Superclass1::FixedImageRegionType FixedImageRegionType;
116  // typedef typename Superclass1::RealType RealType;
124 
125  typedef typename OutputPointType::CoordRepType CoordRepType;
126 
129  typedef itk::Object ObjectType;
130  /*typedef itk::AdvancedTransform<
131  CoordRepType,
132  itkGetStaticConstMacro( FixedImageDimension ),
133  itkGetStaticConstMacro( MovingImageDimension ) > ITKBaseType;
134  */
136  itkGetStaticConstMacro( FixedImageDimension ) > CombinationTransformType;
137  typedef typename
139 
150 
152  itkStaticConstMacro( FixedImageDimension, unsigned int,
153  FixedImageType::ImageDimension );
154  itkStaticConstMacro( MovingImageDimension, unsigned int,
155  MovingImageType::ImageDimension );
156 
163 
165  //typedef tmr::Timer TimerType;
166  //typedef TimerType::Pointer TimerPointer;
167 
171  virtual void Initialize( void ) throw ( itk::ExceptionObject );
172 
177  virtual int BeforeAllBase( void );
178 
179  virtual void BeforeRegistration( void );
180 
181  virtual void AfterEachIteration( void );
182 
183  virtual void AfterEachResolution( void );
184 
186  unsigned int ReadMesh(
187  const std::string & meshFileName,
188  typename FixedMeshType::Pointer & mesh );
189 
190  void WriteResultMesh( const char * filename, MeshIdType meshId );
191 
192  unsigned int ReadTransformixPoints( const std::string & filename, typename MeshType::Pointer & mesh );
193 
195  virtual void SelectNewSamples( void ){}
196 
197 protected:
198 
203 
204 private:
205 
207  PolydataDummyPenalty( const Self & ); // purposely not implemented
209  void operator=( const Self & ); // purposely not implemented
210 
211  unsigned int m_NumberOfMeshes;
212 };
213 
214 } // end namespace elastix
215 
216 #ifndef ITK_MANUAL_INSTANTIATION
217 #include "elxPolydataDummyPenalty.hxx"
218 #endif
219 
220 #endif // end #ifndef __elxPolydataDummyPenalty_H__
itk::MeshPenalty::TransformType
Superclass::TransformType TransformType
Definition: itkPolydataDummyPenalty.h:58
itk::MeshPenalty::FixedMeshType
Mesh< PointNormalType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
Definition: itkPolydataDummyPenalty.h:91
elastix::PolydataDummyPenalty::ParametersType
Superclass1::ParametersType ParametersType
Definition: elxPolydataDummyPenalty.h:123
elastix::PolydataDummyPenalty::BeforeAllBase
virtual int BeforeAllBase(void)
elastix::PolydataDummyPenalty::MeasureType
Superclass1::MeasureType MeasureType
Definition: elxPolydataDummyPenalty.h:121
elastix::PolydataDummyPenalty::RegistrationPointer
Superclass2::RegistrationPointer RegistrationPointer
Definition: elxPolydataDummyPenalty.h:146
itk::MeshPenalty::FixedMeshContainerPointer
FixedMeshContainerType::Pointer FixedMeshContainerPointer
Definition: itkPolydataDummyPenalty.h:115
elastix::PolydataDummyPenalty::ElastixPointer
Superclass2::ElastixPointer ElastixPointer
Definition: elxPolydataDummyPenalty.h:142
itk::SingleValuedPointSetToPointSetMetric::MovingImageMaskType
SpatialObject< itkGetStaticConstMacro(MovingPointSetDimension) > MovingImageMaskType
Definition: itkSingleValuedPointSetToPointSetMetric.h:110
elastix::MetricBase::ITKBaseType
itk::SingleValuedCostFunction ITKBaseType
Definition: elxMetricBase.h:100
elastix::PolydataDummyPenalty::CombinationTransformType
itk::AdvancedCombinationTransform< CoordRepType, itkGetStaticConstMacro(FixedImageDimension) > CombinationTransformType
Definition: elxPolydataDummyPenalty.h:136
elastix::PolydataDummyPenalty::FixedMeshPointer
Superclass1::FixedMeshPointer FixedMeshPointer
Definition: elxPolydataDummyPenalty.h:95
elastix::PolydataDummyPenalty::FixedImageType
Superclass2::FixedImageType FixedImageType
Definition: elxPolydataDummyPenalty.h:148
elastix::PolydataDummyPenalty::itkStaticConstMacro
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
elastix::PolydataDummyPenalty::operator=
void operator=(const Self &)
elastix::MetricBase::RegistrationPointer
Superclass::RegistrationPointer RegistrationPointer
Definition: elxMetricBase.h:89
elastix::PolydataDummyPenalty::TransformPointer
Superclass1::TransformPointer TransformPointer
Definition: elxPolydataDummyPenalty.h:111
itk::MeshPenalty::CellInterfaceType
MeshTraitsType::CellType::CellInterface CellInterfaceType
Definition: itkPolydataDummyPenalty.h:95
elastix::PolydataDummyPenalty::MeshIdType
Superclass1::MeshIdType MeshIdType
Definition: elxPolydataDummyPenalty.h:127
elastix::MetricBase
This class is the elastix base class for all Metrics.
Definition: elxMetricBase.h:73
elastix::PolydataDummyPenalty::FixedMeshContainerType
Superclass1::FixedMeshContainerType FixedMeshContainerType
Definition: elxPolydataDummyPenalty.h:101
elastix::PolydataDummyPenalty::Self
PolydataDummyPenalty Self
Definition: elxPolydataDummyPenalty.h:73
elastix::PolydataDummyPenalty::PolydataDummyPenalty
PolydataDummyPenalty(const Self &)
elastix::PolydataDummyPenalty::SelectNewSamples
virtual void SelectNewSamples(void)
Definition: elxPolydataDummyPenalty.h:195
elastix::PolydataDummyPenalty::TransformJacobianType
Superclass1::TransformJacobianType TransformJacobianType
Definition: elxPolydataDummyPenalty.h:115
elastix::PolydataDummyPenalty::elxClassNameMacro
elxClassNameMacro("PolydataDummyPenalty")
elastix::PolydataDummyPenalty::FixedPointSetType
Superclass1::FixedPointSetType FixedPointSetType
Definition: elxPolydataDummyPenalty.h:99
elastix::PolydataDummyPenalty::BeforeRegistration
virtual void BeforeRegistration(void)
elastix::PolydataDummyPenalty::WriteResultMesh
void WriteResultMesh(const char *filename, MeshIdType meshId)
elastix::MetricBase::MovingPointSetType
itk::PointSet< CoordinateRepresentationType, MovingImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, MovingImageDimension, MovingImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > MovingPointSetType
Definition: elxMetricBase.h:125
itk::MeshPenalty::FixedMeshConstPointer
FixedMeshType::ConstPointer FixedMeshConstPointer
Definition: itkPolydataDummyPenalty.h:93
elastix::PolydataDummyPenalty::Superclass1
itk::MeshPenalty< typename MetricBase< TElastix >::FixedPointSetType, typename MetricBase< TElastix >::MovingPointSetType > Superclass1
Definition: elxPolydataDummyPenalty.h:76
elastix::PolydataDummyPenalty::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: elxPolydataDummyPenalty.h:79
elastix::PolydataDummyPenalty::ImageType
FixedImageType ImageType
Definition: elxPolydataDummyPenalty.h:162
elastix::PolydataDummyPenalty::AfterEachIteration
virtual void AfterEachIteration(void)
elastix::PolydataDummyPenalty::MovingImageType
Superclass2::MovingImageType MovingImageType
Definition: elxPolydataDummyPenalty.h:149
itk::SingleValuedPointSetToPointSetMetric::FixedImageMaskType
SpatialObject< itkGetStaticConstMacro(FixedPointSetDimension) > FixedImageMaskType
Definition: itkSingleValuedPointSetToPointSetMetric.h:106
elastix::PolydataDummyPenalty::ReadTransformixPoints
unsigned int ReadTransformixPoints(const std::string &filename, typename MeshType::Pointer &mesh)
itk::AdvancedCombinationTransform
This class combines two transforms: an 'initial transform' with a 'current transform'.
Definition: itkAdvancedCombinationTransform.h:58
itk::MeshPenalty
A dummy metric to generate transformed meshes each iteration.
Definition: itkPolydataDummyPenalty.h:42
elastix::PolydataDummyPenalty::TransformParametersType
Superclass1::TransformParametersType TransformParametersType
Definition: elxPolydataDummyPenalty.h:114
itk::SingleValuedPointSetToPointSetMetric::MovingImageMaskPointer
MovingImageMaskType::Pointer MovingImageMaskPointer
Definition: itkSingleValuedPointSetToPointSetMetric.h:111
itk::MeshPenalty::MappedMeshContainerType
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
Definition: itkPolydataDummyPenalty.h:119
elastix::PolydataDummyPenalty::ElastixType
Superclass2::ElastixType ElastixType
Definition: elxPolydataDummyPenalty.h:141
elastix::PolydataDummyPenalty::ObjectType
itk::Object ObjectType
Definition: elxPolydataDummyPenalty.h:129
elastix::MetricBase::ConfigurationPointer
Superclass::ConfigurationPointer ConfigurationPointer
Definition: elxMetricBase.h:87
elastix::PolydataDummyPenalty::~PolydataDummyPenalty
virtual ~PolydataDummyPenalty()
Definition: elxPolydataDummyPenalty.h:202
elastix::PolydataDummyPenalty::DerivativeType
Superclass1::DerivativeType DerivativeType
Definition: elxPolydataDummyPenalty.h:122
elastix::PolydataDummyPenalty::m_NumberOfMeshes
unsigned int m_NumberOfMeshes
Definition: elxPolydataDummyPenalty.h:211
itk::MeshPenalty::InputPointType
Superclass::InputPointType InputPointType
Definition: itkPolydataDummyPenalty.h:71
itk::MeshPenalty::FixedMeshContainerType
VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType
Definition: itkPolydataDummyPenalty.h:114
elastix::PolydataDummyPenalty::MovingImageMaskType
Superclass1::MovingImageMaskType MovingImageMaskType
Definition: elxPolydataDummyPenalty.h:119
itk::SingleValuedPointSetToPointSetMetric::MovingPointSetType
TMovingPointSet MovingPointSetType
Definition: itkSingleValuedPointSetToPointSetMetric.h:83
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >
elastix::PolydataDummyPenalty::CoordRepType
OutputPointType::CoordRepType CoordRepType
Definition: elxPolydataDummyPenalty.h:125
elastix::PolydataDummyPenalty::MappedMeshContainerPointer
Superclass1::MappedMeshContainerPointer MappedMeshContainerPointer
Definition: elxPolydataDummyPenalty.h:104
itk::SingleValuedPointSetToPointSetMetric::FixedPointSetConstPointer
FixedPointSetType::ConstPointer FixedPointSetConstPointer
Definition: itkSingleValuedPointSetToPointSetMetric.h:82
itk::SingleValuedPointSetToPointSetMetric::ParametersType
Superclass::ParametersType ParametersType
Definition: itkSingleValuedPointSetToPointSetMetric.h:118
elastix::MetricBase::FixedPointSetType
itk::PointSet< CoordinateRepresentationType, FixedImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, FixedImageDimension, FixedImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > FixedPointSetType
Definition: elxMetricBase.h:118
itk::SingleValuedPointSetToPointSetMetric::MovingPointSetConstPointer
MovingPointSetType::ConstPointer MovingPointSetConstPointer
Definition: itkSingleValuedPointSetToPointSetMetric.h:85
elastix::PolydataDummyPenalty::ConfigurationType
Superclass2::ConfigurationType ConfigurationType
Definition: elxPolydataDummyPenalty.h:143
elastix::PolydataDummyPenalty::MovingImageMaskPointer
Superclass1::MovingImageMaskPointer MovingImageMaskPointer
Definition: elxPolydataDummyPenalty.h:120
elastix::MetricBase::ConfigurationType
Superclass::ConfigurationType ConfigurationType
Definition: elxMetricBase.h:86
elastix::PolydataDummyPenalty::ConfigurationPointer
Superclass2::ConfigurationPointer ConfigurationPointer
Definition: elxPolydataDummyPenalty.h:144
elastix::PolydataDummyPenalty
A dummy metric to generate transformed meshes at each iteration. This metric does not contribute to t...
Definition: elxPolydataDummyPenalty.h:69
elastix::PolydataDummyPenalty::CellInterfaceType
Superclass1::CellInterfaceType CellInterfaceType
Definition: elxPolydataDummyPenalty.h:107
elastix::PolydataDummyPenalty::FixedMeshConstPointer
Superclass1::FixedMeshConstPointer FixedMeshConstPointer
Definition: elxPolydataDummyPenalty.h:96
elastix::PolydataDummyPenalty::ReadMesh
unsigned int ReadMesh(const std::string &meshFileName, typename FixedMeshType::Pointer &mesh)
elxIncludes.h
unsigned int
itkPolydataDummyPenalty.h
elastix::PolydataDummyPenalty::Superclass2
MetricBase< TElastix > Superclass2
Definition: elxPolydataDummyPenalty.h:77
elastix::PolydataDummyPenalty::CoordinateRepresentationType
Superclass1::CoordinateRepresentationType CoordinateRepresentationType
Definition: elxPolydataDummyPenalty.h:98
elastix::PolydataDummyPenalty::OutputPointType
Superclass1::OutputPointType OutputPointType
Definition: elxPolydataDummyPenalty.h:113
elastix::PolydataDummyPenalty::RegistrationType
Superclass2::RegistrationType RegistrationType
Definition: elxPolydataDummyPenalty.h:145
elastix::MetricBase::ElastixPointer
Superclass::ElastixPointer ElastixPointer
Definition: elxMetricBase.h:85
elastix::PolydataDummyPenalty::MovingPointSetConstPointer
Superclass1::MovingPointSetConstPointer MovingPointSetConstPointer
Definition: elxPolydataDummyPenalty.h:106
itk::MeshPenalty::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkPolydataDummyPenalty.h:67
elastix::PolydataDummyPenalty::PointSetType
FixedPointSetType PointSetType
Definition: elxPolydataDummyPenalty.h:160
itk::MeshPenalty::TransformJacobianType
Superclass::TransformJacobianType TransformJacobianType
Definition: itkPolydataDummyPenalty.h:64
elastix::PolydataDummyPenalty::MappedMeshContainerType
Superclass1::MappedMeshContainerType MappedMeshContainerType
Definition: elxPolydataDummyPenalty.h:103
elastix::PolydataDummyPenalty::AfterEachResolution
virtual void AfterEachResolution(void)
elastix::PolydataDummyPenalty::FixedMeshContainerPointer
Superclass1::FixedMeshContainerPointer FixedMeshContainerPointer
Definition: elxPolydataDummyPenalty.h:102
elastix::MetricBase::FixedImageType
ElastixType::FixedImageType FixedImageType
Definition: elxMetricBase.h:92
elastix::PolydataDummyPenalty::TransformType
Superclass1::TransformType TransformType
Definition: elxPolydataDummyPenalty.h:110
elastix::PolydataDummyPenalty::InputPointType
Superclass1::InputPointType InputPointType
Definition: elxPolydataDummyPenalty.h:112
elastix::PolydataDummyPenalty::FixedMeshType
Superclass1::FixedMeshType FixedMeshType
Definition: elxPolydataDummyPenalty.h:94
elastix::PolydataDummyPenalty::InitialTransformType
CombinationTransformType::InitialTransformType InitialTransformType
Definition: elxPolydataDummyPenalty.h:138
itk::SingleValuedPointSetToPointSetMetric::FixedImageMaskPointer
FixedImageMaskType::Pointer FixedImageMaskPointer
Definition: itkSingleValuedPointSetToPointSetMetric.h:107
itk::MeshPenalty::FixedMeshPointer
FixedMeshType::Pointer FixedMeshPointer
Definition: itkPolydataDummyPenalty.h:94
itk::MeshPenalty::MeasureType
Superclass::MeasureType MeasureType
Definition: itkPolydataDummyPenalty.h:66
elastix::PolydataDummyPenalty::MeshType
FixedMeshType MeshType
Definition: elxPolydataDummyPenalty.h:161
elastix::PolydataDummyPenalty::FixedImageMaskType
Superclass1::FixedImageMaskType FixedImageMaskType
Definition: elxPolydataDummyPenalty.h:117
elastix::MetricBase::MovingImageType
ElastixType::MovingImageType MovingImageType
Definition: elxMetricBase.h:95
elastix::PolydataDummyPenalty::FixedPointSetConstPointer
Superclass1::FixedPointSetConstPointer FixedPointSetConstPointer
Definition: elxPolydataDummyPenalty.h:100
elastix::PolydataDummyPenalty::itkStaticConstMacro
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
elastix::MetricBase::ElastixType
Superclass::ElastixType ElastixType
Definition: elxMetricBase.h:81
elastix::PolydataDummyPenalty::PolydataDummyPenalty
PolydataDummyPenalty()
elastix::PolydataDummyPenalty::Initialize
virtual void Initialize(void)
elastix::PolydataDummyPenalty::ITKBaseType
Superclass2::ITKBaseType ITKBaseType
Definition: elxPolydataDummyPenalty.h:147
elastix::PolydataDummyPenalty::FixedImageMaskPointer
Superclass1::FixedImageMaskPointer FixedImageMaskPointer
Definition: elxPolydataDummyPenalty.h:118
itk::SingleValuedPointSetToPointSetMetric::CoordinateRepresentationType
Superclass::ParametersValueType CoordinateRepresentationType
Definition: itkSingleValuedPointSetToPointSetMetric.h:74
elastix::PolydataDummyPenalty::Pointer
itk::SmartPointer< Self > Pointer
Definition: elxPolydataDummyPenalty.h:78
itk::MeshPenalty::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkPolydataDummyPenalty.h:72
itk::SingleValuedPointSetToPointSetMetric::FixedPointSetType
TFixedPointSet FixedPointSetType
Definition: itkSingleValuedPointSetToPointSetMetric.h:77
elastix::PolydataDummyPenalty::MovingPointSetType
Superclass1::MovingPointSetType MovingPointSetType
Definition: elxPolydataDummyPenalty.h:105
elastix
Definition: elxFixedGenericPyramid.h:25
itk::MeshPenalty::MappedMeshContainerPointer
MappedMeshContainerType::Pointer MappedMeshContainerPointer
Definition: itkPolydataDummyPenalty.h:120
elastix::MetricBase::RegistrationType
Superclass::RegistrationType RegistrationType
Definition: elxMetricBase.h:88
itk::MeshPenalty::TransformPointer
Superclass::TransformPointer TransformPointer
Definition: itkPolydataDummyPenalty.h:62
itk::MeshPenalty::TransformParametersType
Superclass::TransformParametersType TransformParametersType
Definition: itkPolydataDummyPenalty.h:63


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo