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 
85  itkTypeMacro( PolydataDummyPenalty, itk::MeshPenalty );
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 
160  typedef FixedPointSetType PointSetType;
161  typedef FixedMeshType MeshType;
162  typedef FixedImageType ImageType;
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__
This class combines two transforms: an &#39;initial transform&#39; with a &#39;current transform&#39;.
Superclass1::OutputPointType OutputPointType
itk::AdvancedCombinationTransform< CoordRepType, itkGetStaticConstMacro(FixedImageDimension) > CombinationTransformType
Superclass::TransformType TransformType
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
Superclass::ElastixPointer ElastixPointer
Definition: elxMetricBase.h:85
OutputPointType::CoordRepType CoordRepType
Superclass::RegistrationType RegistrationType
Definition: elxMetricBase.h:88
Superclass::ConfigurationType ConfigurationType
Definition: elxMetricBase.h:86
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:92
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:81
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:95
A dummy metric to generate transformed meshes at each iteration. This metric does not contribute to t...
Superclass::RegistrationPointer RegistrationPointer
Definition: elxMetricBase.h:89
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:87
Superclass::InputPointType InputPointType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
This class is the elastix base class for all Metrics.
Definition: elxMetricBase.h:72
Superclass1::FixedPointSetType FixedPointSetType
Superclass2::RegistrationType RegistrationType


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.13 elastix logo