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 
27 #include "itkMeshFileReader.h"
28 #include "itkMeshFileWriter.h"
29 
30 namespace elastix
31 {
52 //TODO: define a base class templated on meshes in stead of 2 pointsets.
53 //typedef unsigned char DummyPixelType;
54 //typedef unsigned char BinaryPixelType;
55 //typedef itk::Mesh<BinaryPixelType,FixedImageDimension> FixedMeshType;
56 //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.
57 // template <class TElastix >
58 //class PolydataDummyPenalty
59 // : public
60 // itk::MeshPenalty < itk::Mesh<DummyPixelType, MetricBase <TElastix>::FixedImageDimension > >,
61 // public MetricBase<TElastix>
62 //
63 template< class TElastix >
65  public
67  typename MetricBase< TElastix >::FixedPointSetType,
68  typename MetricBase< TElastix >::MovingPointSetType >,
69  public MetricBase< TElastix >
70 {
71 public:
72 
75  typedef itk::MeshPenalty<
79  typedef itk::SmartPointer< Self > Pointer;
80  typedef itk::SmartPointer< const Self > ConstPointer;
81 
83  itkNewMacro( Self );
84 
86  itkTypeMacro( PolydataDummyPenalty, itk::MeshPenalty );
87 
92  elxClassNameMacro( "PolydataDummyPenalty" );
93 
98 
109 
110  // typedef typename Superclass1::FixedImageRegionType FixedImageRegionType;
117  // typedef typename Superclass1::RealType RealType;
125 
126  typedef typename OutputPointType::CoordRepType CoordRepType;
127 
130  typedef itk::Object ObjectType;
131  /*typedef itk::AdvancedTransform<
132  CoordRepType,
133  itkGetStaticConstMacro( FixedImageDimension ),
134  itkGetStaticConstMacro( MovingImageDimension ) > ITKBaseType;
135  */
137  itkGetStaticConstMacro( FixedImageDimension ) > CombinationTransformType;
138  typedef typename
140 
151 
153  itkStaticConstMacro( FixedImageDimension, unsigned int,
154  FixedImageType::ImageDimension );
155  itkStaticConstMacro( MovingImageDimension, unsigned int,
156  MovingImageType::ImageDimension );
157 
161  typedef FixedPointSetType PointSetType;
162  typedef FixedMeshType MeshType;
163  typedef FixedImageType ImageType;
164 
166  //typedef tmr::Timer TimerType;
167  //typedef TimerType::Pointer TimerPointer;
168 
172  virtual void Initialize( void ) throw ( itk::ExceptionObject );
173 
178  virtual int BeforeAllBase( void );
179 
180  virtual void BeforeRegistration( void );
181 
182  virtual void AfterEachIteration( void );
183 
184  virtual void AfterEachResolution( void );
185 
187  unsigned int ReadMesh(
188  const std::string & meshFileName,
189  typename FixedMeshType::Pointer & mesh );
190 
191  void WriteResultMesh( const char * filename, MeshIdType meshId );
192 
193  unsigned int ReadTransformixPoints( const std::string & filename, typename MeshType::Pointer & mesh );
194 
196  virtual void SelectNewSamples( void ){}
197 
198 protected:
199 
204 
205 private:
206 
208  PolydataDummyPenalty( const Self & ); // purposely not implemented
210  void operator=( const Self & ); // purposely not implemented
211 
212  unsigned int m_NumberOfMeshes;
213 }; // end class PolydataDummyPenalty
214 
215 } // end namespace elastix
216 
217 #ifndef ITK_MANUAL_INSTANTIATION
218 #include "elxPolydataDummyPenalty.hxx"
219 #endif
220 
221 #endif // end #ifndef __elxPolydataDummyPenalty_H__
222 
This class combines two transforms: an 'initial transform' with a 'current transform'.
Superclass1::OutputPointType OutputPointType
itk::AdvancedCombinationTransform< CoordRepType, itkGetStaticConstMacro(FixedImageDimension) > CombinationTransformType
Superclass::TransformType TransformType
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
Superclass::ElastixPointer ElastixPointer
Definition: elxMetricBase.h:86
OutputPointType::CoordRepType CoordRepType
Superclass::RegistrationType RegistrationType
Definition: elxMetricBase.h:89
Superclass::ConfigurationType ConfigurationType
Definition: elxMetricBase.h:87
A dummy metric to generate transformed meshes each iteration.
Superclass1::MeasureType MeasureType
Superclass::OutputPointType OutputPointType
void WriteResultMesh(const char *filename, MeshIdType meshId)
Superclass2::ConfigurationType ConfigurationType
itk::PointSet< CoordinateRepresentationType, FixedImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, FixedImageDimension, FixedImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > FixedPointSetType
Superclass1::FixedImageMaskType FixedImageMaskType
Superclass1::TransformParametersType TransformParametersType
ElastixType::FixedImageType FixedImageType
Definition: elxMetricBase.h:93
SpatialObject< itkGetStaticConstMacro(MovingPointSetDimension) > MovingImageMaskType
Superclass1::TransformJacobianType TransformJacobianType
MappedMeshContainerType::Pointer MappedMeshContainerPointer
Superclass::TransformJacobianType TransformJacobianType
FixedMeshType::Pointer FixedMeshPointer
virtual void BeforeRegistration(void)
Superclass1::DerivativeType DerivativeType
Superclass2::ITKBaseType ITKBaseType
unsigned int ReadTransformixPoints(const std::string &filename, typename MeshType::Pointer &mesh)
Superclass1::MovingPointSetConstPointer MovingPointSetConstPointer
VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType
Superclass::MeasureType MeasureType
FixedMeshType::ConstPointer FixedMeshConstPointer
Superclass1::ParametersType ParametersType
Superclass1::FixedMeshContainerPointer FixedMeshContainerPointer
Superclass2::FixedImageType FixedImageType
Superclass1::FixedMeshType FixedMeshType
SpatialObject< itkGetStaticConstMacro(FixedPointSetDimension) > FixedImageMaskType
Superclass1::MovingImageMaskPointer MovingImageMaskPointer
Superclass::TransformPointer TransformPointer
Mesh< PointNormalType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
Superclass1::FixedImageMaskPointer FixedImageMaskPointer
Superclass2::ConfigurationPointer ConfigurationPointer
CombinationTransformType::InitialTransformType InitialTransformType
virtual void Initialize(void)
Superclass1::TransformPointer TransformPointer
Superclass1::MovingPointSetType MovingPointSetType
virtual void AfterEachResolution(void)
virtual int BeforeAllBase(void)
elxClassNameMacro("PolydataDummyPenalty")
Superclass1::InputPointType InputPointType
Superclass1::FixedMeshContainerType FixedMeshContainerType
MeshTraitsType::CellType::CellInterface CellInterfaceType
Superclass1::FixedPointSetConstPointer FixedPointSetConstPointer
Superclass1::FixedMeshPointer FixedMeshPointer
unsigned int ReadMesh(const std::string &meshFileName, typename FixedMeshType::Pointer &mesh)
Superclass2::ElastixType ElastixType
itk::SmartPointer< const Self > ConstPointer
Superclass::ElastixType ElastixType
Definition: elxMetricBase.h:82
Superclass1::MappedMeshContainerPointer MappedMeshContainerPointer
itk::SingleValuedCostFunction ITKBaseType
itk::PointSet< CoordinateRepresentationType, MovingImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, MovingImageDimension, MovingImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > MovingPointSetType
Superclass1::MappedMeshContainerType MappedMeshContainerType
ElastixType::MovingImageType MovingImageType
Definition: elxMetricBase.h:96
A dummy metric to generate transformed meshes at each iteration. This metric does not contribute to t...
Superclass::RegistrationPointer RegistrationPointer
Definition: elxMetricBase.h:90
itk::MeshPenalty< typename MetricBase< TElastix >::FixedPointSetType, typename MetricBase< TElastix >::MovingPointSetType > Superclass1
Superclass1::CoordinateRepresentationType CoordinateRepresentationType
Superclass1::TransformType TransformType
FixedMeshContainerType::Pointer FixedMeshContainerPointer
Superclass1::MovingImageMaskType MovingImageMaskType
Superclass::TransformParametersType TransformParametersType
Superclass::DerivativeType DerivativeType
Superclass1::FixedMeshConstPointer FixedMeshConstPointer
void operator=(const Self &)
itk::SmartPointer< Self > Pointer
Superclass2::MovingImageType MovingImageType
virtual void AfterEachIteration(void)
Superclass2::RegistrationPointer RegistrationPointer
Superclass1::CellInterfaceType CellInterfaceType
Superclass2::ElastixPointer ElastixPointer
Superclass::ConfigurationPointer ConfigurationPointer
Definition: elxMetricBase.h:88
Superclass::InputPointType InputPointType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
This class is the elastix base class for all Metrics.
Definition: elxMetricBase.h:73
Superclass1::FixedPointSetType FixedPointSetType
Superclass2::RegistrationType RegistrationType


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo