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  void Initialize( void ) override;
172 
177  int BeforeAllBase( void ) override;
178 
179  void BeforeRegistration( void ) override;
180 
181  void AfterEachIteration( void ) override;
182 
183  void AfterEachResolution( void ) override;
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  void SelectNewSamples( void ) override{}
196 
197 protected:
198 
202  ~PolydataDummyPenalty() override {}
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__
A class that deals with user given parameters and command line arguments.
This class is the elastix base class for all Metrics.
Definition: elxMetricBase.h:73
itk::PointSet< CoordinateRepresentationType, MovingImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, MovingImageDimension, MovingImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > MovingPointSetType
itk::SingleValuedCostFunction ITKBaseType
Superclass::RegistrationPointer RegistrationPointer
Definition: elxMetricBase.h:89
Superclass::ElastixType ElastixType
Definition: elxMetricBase.h:81
ElastixType::MovingImageType MovingImageType
Definition: elxMetricBase.h:95
itk::PointSet< CoordinateRepresentationType, FixedImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, FixedImageDimension, FixedImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > FixedPointSetType
ElastixType::FixedImageType FixedImageType
Definition: elxMetricBase.h:92
Superclass::ConfigurationPointer ConfigurationPointer
Definition: elxMetricBase.h:87
Superclass::RegistrationType RegistrationType
Definition: elxMetricBase.h:88
Superclass::ElastixPointer ElastixPointer
Definition: elxMetricBase.h:85
A dummy metric to generate transformed meshes at each iteration. This metric does not contribute to t...
Superclass1::FixedImageMaskPointer FixedImageMaskPointer
Superclass1::MovingPointSetConstPointer MovingPointSetConstPointer
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
Superclass1::FixedPointSetConstPointer FixedPointSetConstPointer
Superclass1::TransformParametersType TransformParametersType
Superclass1::DerivativeType DerivativeType
void BeforeRegistration(void) override
CombinationTransformType::InitialTransformType InitialTransformType
Superclass1::MovingPointSetType MovingPointSetType
void AfterEachResolution(void) override
Superclass1::FixedMeshType FixedMeshType
Superclass1::CellInterfaceType CellInterfaceType
Superclass2::ConfigurationType ConfigurationType
elxClassNameMacro("PolydataDummyPenalty")
itk::SmartPointer< const Self > ConstPointer
Superclass1::InputPointType InputPointType
Superclass1::ParametersType ParametersType
Superclass1::FixedMeshPointer FixedMeshPointer
Superclass1::OutputPointType OutputPointType
Superclass1::MovingImageMaskPointer MovingImageMaskPointer
Superclass2::RegistrationPointer RegistrationPointer
Superclass2::ITKBaseType ITKBaseType
Superclass1::MappedMeshContainerType MappedMeshContainerType
Superclass2::ElastixType ElastixType
itk::SmartPointer< Self > Pointer
void Initialize(void) override
Superclass2::MovingImageType MovingImageType
Superclass1::FixedMeshContainerPointer FixedMeshContainerPointer
Superclass2::RegistrationType RegistrationType
Superclass1::FixedMeshConstPointer FixedMeshConstPointer
PolydataDummyPenalty(const Self &)
int BeforeAllBase(void) override
Superclass2::FixedImageType FixedImageType
Superclass1::FixedMeshContainerType FixedMeshContainerType
itk::AdvancedCombinationTransform< CoordRepType, itkGetStaticConstMacro(FixedImageDimension) > CombinationTransformType
OutputPointType::CoordRepType CoordRepType
Superclass1::CoordinateRepresentationType CoordinateRepresentationType
Superclass1::MeasureType MeasureType
Superclass1::TransformJacobianType TransformJacobianType
unsigned int ReadMesh(const std::string &meshFileName, typename FixedMeshType::Pointer &mesh)
Superclass1::MovingImageMaskType MovingImageMaskType
Superclass1::TransformPointer TransformPointer
void AfterEachIteration(void) override
Superclass1::MappedMeshContainerPointer MappedMeshContainerPointer
Superclass1::FixedImageMaskType FixedImageMaskType
unsigned int ReadTransformixPoints(const std::string &filename, typename MeshType::Pointer &mesh)
void operator=(const Self &)
Superclass1::TransformType TransformType
void WriteResultMesh(const char *filename, MeshIdType meshId)
Superclass2::ElastixPointer ElastixPointer
itk::MeshPenalty< typename MetricBase< TElastix >::FixedPointSetType, typename MetricBase< TElastix >::MovingPointSetType > Superclass1
Superclass1::FixedPointSetType FixedPointSetType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
Superclass2::ConfigurationPointer ConfigurationPointer
This class combines two transforms: an 'initial transform' with a 'current transform'.
A dummy metric to generate transformed meshes each iteration.
Superclass::TransformParametersType TransformParametersType
Superclass::InputPointType InputPointType
Superclass::TransformType TransformType
Superclass::MeasureType MeasureType
Superclass::TransformPointer TransformPointer
Superclass::OutputPointType OutputPointType
FixedMeshType::Pointer FixedMeshPointer
FixedMeshType::ConstPointer FixedMeshConstPointer
Mesh< PointNormalType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
Superclass::DerivativeType DerivativeType
MappedMeshContainerType::Pointer MappedMeshContainerPointer
FixedMeshContainerType::Pointer FixedMeshContainerPointer
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
MeshTraitsType::CellType CellInterfaceType
Superclass::TransformJacobianType TransformJacobianType
VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType
SpatialObject< itkGetStaticConstMacro(MovingPointSetDimension) > MovingImageMaskType
SpatialObject< itkGetStaticConstMacro(FixedPointSetDimension) > FixedImageMaskType


Generated on 1652341256 for elastix by doxygen 1.9.1 elastix logo