go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkComputeDisplacementDistribution.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 #ifndef __itkComputeDisplacementDistribution_h
15 #define __itkComputeDisplacementDistribution_h
16 
18 
19 #include "itkImageGridSampler.h"
22 
23 namespace itk
24 {
39 template< class TFixedImage, class TTransform >
42 {
43 public:
44 
48  typedef SmartPointer< Self > Pointer;
49  typedef SmartPointer< const Self > ConstPointer;
50 
52  itkNewMacro( Self );
53 
55  itkTypeMacro( ComputeDisplacementDistribution,
57 
59  typedef TFixedImage FixedImageType;
60  typedef TTransform TransformType;
61  typedef typename TransformType::Pointer TransformPointer;
62  typedef typename FixedImageType::RegionType FixedImageRegionType;
66 
70  itkStaticConstMacro( FixedImageDimension, unsigned int,
71  TFixedImage::ImageDimension );
72  typedef SpatialObject< itkGetStaticConstMacro( FixedImageDimension ) > FixedImageMaskType;
73  typedef typename FixedImageMaskType::Pointer FixedImageMaskPointer;
74  typedef typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer;
75  typedef typename TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
76 
78  itkSetConstObjectMacro( FixedImage, FixedImageType );
79 
81  itkSetObjectMacro( Transform, TransformType );
82 
84  itkSetObjectMacro( FixedImageMask, FixedImageMaskType );
85  itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
86  itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
87 
89  itkSetMacro( NumberOfJacobianMeasurements, SizeValueType );
90 
93  {
94  if( region != this->m_FixedImageRegion )
95  {
96  this->m_FixedImageRegion = region;
97  }
98  }
99 
100 
102  itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
103 
105  virtual void ComputeDistributionTerms( const ParametersType & mu,
106  double & jacg, double & maxJJ, std::string method );
107 
108 protected:
109 
112 
113  typename FixedImageType::ConstPointer m_FixedImage;
119 
120  typedef typename FixedImageType::IndexType FixedImageIndexType;
121  typedef typename FixedImageType::PointType FixedImagePointType;
122  typedef typename TransformType::JacobianType JacobianType;
123  typedef typename JacobianType::ValueType JacobianValueType;
124 
130 
133  typedef typename ImageGridSamplerType
136 
139  typedef typename TransformType::ScalarType CoordinateRepresentationType;
140  typedef typename TransformType::NumberOfParametersType NumberOfParametersType;
141 
143  // \todo: note that this is an exact copy of itk::ComputeJacobianTerms
144  // in the future it would be better to refactoring this part of the code
146  ImageSampleContainerPointer & sampleContainer );
147 
148 private:
149 
150  ComputeDisplacementDistribution( const Self & ); // purposely not implemented
151  void operator=( const Self & ); // purposely not implemented
152 
153 };
154 
155 } // end namespace itk
156 
157 #ifndef ITK_MANUAL_INSTANTIATION
158 #include "itkComputeDisplacementDistribution.hxx"
159 #endif
160 
161 #endif // end #ifndef __itkComputeDisplacementDistribution_h
ScaledSingleValuedNonLinearOptimizer Superclass
SmartPointer< Self > Pointer
SmartPointer< Self > Pointer
ImageRandomSamplerBase< FixedImageType > ImageRandomSamplerBaseType
itkStaticConstMacro(FixedImageDimension, unsigned int, TFixedImage::ImageDimension)
virtual void SampleFixedImageForJacobianTerms(ImageSampleContainerPointer &sampleContainer)
ScaledSingleValuedCostFunction::Pointer m_CostFunction
This class is a base class for any image sampler.
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
SmartPointer< Self > Pointer
void SetFixedImageRegion(const FixedImageRegionType &region)
FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
ImageSampleContainerType::Pointer ImageSampleContainerPointer
ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
This is a helper class for the automatic parameter estimation of the ASGD optimizer.
SpatialObject< itkGetStaticConstMacro(FixedImageDimension) > FixedImageMaskType
ImageSamplerBase< FixedImageType > ImageSamplerBaseType
ImageGridSampler< FixedImageType > ImageGridSamplerType
This class is a base class for any image sampler that randomly picks samples.
virtual void ComputeDistributionTerms(const ParametersType &mu, double &jacg, double &maxJJ, std::string method)
Samples image voxels on a regular grid.
TransformType::NumberOfParametersType NumberOfParametersType


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