go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkComputeJacobianTerms.h
Go to the documentation of this file.
1 /*======================================================================
2 
3  This file is part of the elastix software.
4 
5  Copyright (c) University Medical Center Utrecht. All rights reserved.
6  See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7  details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkComputeJacobianTerms_h
16 #define __itkComputeJacobianTerms_h
17 
18 #include "itkImageGridSampler.h"
22 
23 namespace itk
24 {
33 template< class TFixedImage, class TTransform >
35  public Object
36 {
37 public:
38 
41  typedef Object Superclass;
42  typedef SmartPointer< Self > Pointer;
43  typedef SmartPointer< const Self > ConstPointer;
44 
46  itkNewMacro( Self );
47 
49  itkTypeMacro( ComputeJacobianTerms, Object );
50 
52  typedef TFixedImage FixedImageType;
53  typedef TTransform TransformType;
54  typedef typename TransformType::Pointer TransformPointer;
55  typedef typename FixedImageType::RegionType FixedImageRegionType;
56 
60  itkStaticConstMacro( FixedImageDimension, unsigned int,
61  TFixedImage::ImageDimension );
62  typedef SpatialObject< itkGetStaticConstMacro( FixedImageDimension ) > FixedImageMaskType;
63  typedef typename FixedImageMaskType::Pointer FixedImageMaskPointer;
64  typedef typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer;
65 
70  typedef typename TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
71 
73  itkSetConstObjectMacro( FixedImage, FixedImageType );
74 
76  itkSetObjectMacro( Transform, TransformType );
77 
79  itkSetObjectMacro( FixedImageMask, FixedImageMaskType );
80  itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
81  itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
82 
84  itkSetMacro( Scales, ScalesType );
85  itkSetMacro( UseScales, bool );
86  itkSetMacro( MaxBandCovSize, unsigned int );
87  itkSetMacro( NumberOfBandStructureSamples, unsigned int );
88  itkSetMacro( NumberOfJacobianMeasurements, SizeValueType );
89 
92  {
93  if( region != this->m_FixedImageRegion )
94  {
95  this->m_FixedImageRegion = region;
96  }
97  }
98 
99 
101  itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
102 
104  virtual void ComputeParameters( double & TrC, double & TrCC,
105  double & maxJJ, double & maxJCJ );
106 
107 protected:
108 
111 
112  typename FixedImageType::ConstPointer m_FixedImage;
118 
119  unsigned int m_MaxBandCovSize;
122 
123  typedef typename FixedImageType::IndexType FixedImageIndexType;
124  typedef typename FixedImageType::PointType FixedImagePointType;
125  typedef typename TransformType::JacobianType JacobianType;
126  typedef typename JacobianType::ValueType JacobianValueType;
127 
133 
136  typedef typename ImageGridSamplerType
139 
142  typedef typename TransformType::ScalarType CoordinateRepresentationType;
143  typedef typename TransformType::NumberOfParametersType NumberOfParametersType;
144 
146  // \todo: note that this is an exact copy of itk::ComputeDisplacementDistribution
147  // in the future it would be better to refactoring this part of the code.
149  ImageSampleContainerPointer & sampleContainer );
150 
151 private:
152 
153  ComputeJacobianTerms( const Self & ); // purposely not implemented
154  void operator=( const Self & ); // purposely not implemented
155 
156 };
157 
158 } // end namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkComputeJacobianTerms.hxx"
162 #endif
163 
164 #endif // end #ifndef __itkComputeJacobianTerms_h
FixedImageMaskConstPointer m_FixedImageMask
void SetFixedImageRegion(const FixedImageRegionType &region)
ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
ScaledSingleValuedNonLinearOptimizerType::ScalesType ScalesType
This is a helper class for the automatic parameter estimation of the ASGD optimizer.
ImageSampleContainerType::Pointer ImageSampleContainerPointer
SmartPointer< Self > Pointer
FixedImageType::IndexType FixedImageIndexType
SmartPointer< Self > Pointer
ImageGridSamplerType::Pointer ImageGridSamplerPointer
FixedImageType::ConstPointer m_FixedImage
FixedImageType::RegionType FixedImageRegionType
This class is a base class for any image sampler.
ImageSamplerBaseType::Pointer ImageSamplerBasePointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
SpatialObject< itkGetStaticConstMacro(FixedImageDimension) > FixedImageMaskType
ScaledSingleValuedNonLinearOptimizerType::ScaledCostFunctionPointer ScaledCostFunctionPointer
SmartPointer< const Self > ConstPointer
TransformType::JacobianType JacobianType
SmartPointer< Self > Pointer
ImageSamplerBase< FixedImageType > ImageSamplerBaseType
FixedImageMaskType::Pointer FixedImageMaskPointer
itkStaticConstMacro(FixedImageDimension, unsigned int, TFixedImage::ImageDimension)
virtual void ComputeParameters(double &TrC, double &TrCC, double &maxJJ, double &maxJCJ)
TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
TransformType::ScalarType CoordinateRepresentationType
ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
TransformType::Pointer TransformPointer
FixedImageType::PointType FixedImagePointType
FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
ScaledSingleValuedNonLinearOptimizer ScaledSingleValuedNonLinearOptimizerType
This class is a base class for any image sampler that randomly picks samples.
ImageRandomSamplerBase< FixedImageType > ImageRandomSamplerBaseType
FixedImageRegionType m_FixedImageRegion
TransformType::NumberOfParametersType NumberOfParametersType
JacobianType::ValueType JacobianValueType
virtual void SampleFixedImageForJacobianTerms(ImageSampleContainerPointer &sampleContainer)
Samples image voxels on a regular grid.
ImageGridSampler< FixedImageType > ImageGridSamplerType
void operator=(const Self &)


Generated on 27-04-2014 for elastix by doxygen 1.8.6 elastix logo