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  * 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 __itkComputeJacobianTerms_h
19 #define __itkComputeJacobianTerms_h
20 
21 #include "itkImageGridSampler.h"
25 
26 namespace itk
27 {
36 template< class TFixedImage, class TTransform >
38  public Object
39 {
40 public:
41 
44  typedef Object Superclass;
46  typedef SmartPointer< const Self > ConstPointer;
47 
49  itkNewMacro( Self );
50 
52  itkTypeMacro( ComputeJacobianTerms, Object );
53 
55  typedef TFixedImage FixedImageType;
56  typedef TTransform TransformType;
57  typedef typename TransformType::Pointer TransformPointer;
58  typedef typename FixedImageType::RegionType FixedImageRegionType;
59 
63  itkStaticConstMacro( FixedImageDimension, unsigned int,
64  TFixedImage::ImageDimension );
65  typedef SpatialObject< itkGetStaticConstMacro( FixedImageDimension ) > FixedImageMaskType;
66  typedef typename FixedImageMaskType::Pointer FixedImageMaskPointer;
67  typedef typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer;
68 
73  typedef typename TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
74 
76  itkSetConstObjectMacro( FixedImage, FixedImageType );
77 
79  itkSetObjectMacro( Transform, TransformType );
80 
82  itkSetObjectMacro( FixedImageMask, FixedImageMaskType );
83  itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
84  itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
85 
87  itkSetMacro( Scales, ScalesType );
88  itkSetMacro( UseScales, bool );
89  itkSetMacro( MaxBandCovSize, unsigned int );
90  itkSetMacro( NumberOfBandStructureSamples, unsigned int );
91  itkSetMacro( NumberOfJacobianMeasurements, SizeValueType );
92 
95  {
96  if( region != this->m_FixedImageRegion )
97  {
98  this->m_FixedImageRegion = region;
99  }
100  }
101 
102 
104  itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
105 
107  virtual void Compute( double & TrC, double & TrCC,
108  double & maxJJ, double & maxJCJ );
109 
110 protected:
111 
114 
115  typename FixedImageType::ConstPointer m_FixedImage;
121 
122  unsigned int m_MaxBandCovSize;
125 
126  typedef typename FixedImageType::IndexType FixedImageIndexType;
127  typedef typename FixedImageType::PointType FixedImagePointType;
128  typedef typename TransformType::JacobianType JacobianType;
129  typedef typename JacobianType::ValueType JacobianValueType;
130 
136 
139  typedef typename ImageGridSamplerType
141  typedef typename ImageSampleContainerType::Pointer ImageSampleContainerPointer;
142 
145  typedef typename TransformType::ScalarType CoordinateRepresentationType;
146  typedef typename TransformType::NumberOfParametersType NumberOfParametersType;
147 
149  // \todo: note that this is an exact copy of itk::ComputeDisplacementDistribution
150  // in the future it would be better to refactoring this part of the code.
152  ImageSampleContainerPointer & sampleContainer );
153 
154 private:
155 
156  ComputeJacobianTerms( const Self & ); // purposely not implemented
157  void operator=( const Self & ); // purposely not implemented
158 
159 };
160 
161 } // end namespace itk
162 
163 #ifndef ITK_MANUAL_INSTANTIATION
164 #include "itkComputeJacobianTerms.hxx"
165 #endif
166 
167 #endif // end #ifndef __itkComputeJacobianTerms_h
itk::ComputeJacobianTerms::SetFixedImageRegion
void SetFixedImageRegion(const FixedImageRegionType &region)
Definition: itkComputeJacobianTerms.h:94
itk::ComputeJacobianTerms::m_FixedImageMask
FixedImageMaskConstPointer m_FixedImageMask
Definition: itkComputeJacobianTerms.h:117
itk::ComputeJacobianTerms::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkComputeJacobianTerms.h:46
itk::ComputeJacobianTerms::JacobianType
TransformType::JacobianType JacobianType
Definition: itkComputeJacobianTerms.h:128
itk::ComputeJacobianTerms::ImageGridSamplerType
ImageGridSampler< FixedImageType > ImageGridSamplerType
Definition: itkComputeJacobianTerms.h:137
itk::ComputeJacobianTerms::m_Transform
TransformPointer m_Transform
Definition: itkComputeJacobianTerms.h:118
itk::ComputeJacobianTerms::ImageSamplerBaseType
ImageSamplerBase< FixedImageType > ImageSamplerBaseType
Definition: itkComputeJacobianTerms.h:132
itk::ComputeJacobianTerms::FixedImageMaskType
SpatialObject< itkGetStaticConstMacro(FixedImageDimension) > FixedImageMaskType
Definition: itkComputeJacobianTerms.h:65
itkImageGridSampler.h
SmartPointer< Self >
itk::ComputeJacobianTerms::Compute
virtual void Compute(double &TrC, double &TrCC, double &maxJJ, double &maxJCJ)
itk::ComputeJacobianTerms::Superclass
Object Superclass
Definition: itkComputeJacobianTerms.h:44
itk::ScaledSingleValuedNonLinearOptimizer::ScaledCostFunctionPointer
ScaledCostFunctionType::Pointer ScaledCostFunctionPointer
Definition: itkScaledSingleValuedNonLinearOptimizer.h:88
itk::ComputeJacobianTerms::ImageGridSamplerPointer
ImageGridSamplerType::Pointer ImageGridSamplerPointer
Definition: itkComputeJacobianTerms.h:138
itk::ComputeJacobianTerms::m_NumberOfBandStructureSamples
unsigned int m_NumberOfBandStructureSamples
Definition: itkComputeJacobianTerms.h:123
itk::ComputeJacobianTerms::ImageRandomSamplerBaseType
ImageRandomSamplerBase< FixedImageType > ImageRandomSamplerBaseType
Definition: itkComputeJacobianTerms.h:134
itkImageRandomCoordinateSampler.h
itk::ComputeJacobianTerms::m_FixedImageRegion
FixedImageRegionType m_FixedImageRegion
Definition: itkComputeJacobianTerms.h:116
itk::ComputeJacobianTerms::NumberOfParametersType
TransformType::NumberOfParametersType NumberOfParametersType
Definition: itkComputeJacobianTerms.h:146
itk::ComputeJacobianTerms::ImageRandomSamplerBasePointer
ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
Definition: itkComputeJacobianTerms.h:135
itk::ComputeJacobianTerms::FixedImageMaskPointer
FixedImageMaskType::Pointer FixedImageMaskPointer
Definition: itkComputeJacobianTerms.h:66
itk::ComputeJacobianTerms::m_NumberOfJacobianMeasurements
SizeValueType m_NumberOfJacobianMeasurements
Definition: itkComputeJacobianTerms.h:124
itk::ComputeJacobianTerms::FixedImageMaskConstPointer
FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
Definition: itkComputeJacobianTerms.h:67
itk::ComputeJacobianTerms::m_Scales
ScalesType m_Scales
Definition: itkComputeJacobianTerms.h:119
itk::ComputeJacobianTerms::m_MaxBandCovSize
unsigned int m_MaxBandCovSize
Definition: itkComputeJacobianTerms.h:122
itk::ComputeJacobianTerms::m_UseScales
bool m_UseScales
Definition: itkComputeJacobianTerms.h:120
itk::ComputeJacobianTerms::SampleFixedImageForJacobianTerms
virtual void SampleFixedImageForJacobianTerms(ImageSampleContainerPointer &sampleContainer)
itk::ComputeJacobianTerms::ImageSampleContainerType
ImageGridSamplerType ::ImageSampleContainerType ImageSampleContainerType
Definition: itkComputeJacobianTerms.h:140
itk::ComputeJacobianTerms::operator=
void operator=(const Self &)
itk::ComputeJacobianTerms::ImageSamplerBasePointer
ImageSamplerBaseType::Pointer ImageSamplerBasePointer
Definition: itkComputeJacobianTerms.h:133
itkScaledSingleValuedNonLinearOptimizer.h
itk::ComputeJacobianTerms::Self
ComputeJacobianTerms Self
Definition: itkComputeJacobianTerms.h:43
itk::ComputeJacobianTerms::ScaledCostFunctionPointer
ScaledSingleValuedNonLinearOptimizerType ::ScaledCostFunctionPointer ScaledCostFunctionPointer
Definition: itkComputeJacobianTerms.h:71
itk::ScaledSingleValuedNonLinearOptimizer
Definition: itkScaledSingleValuedNonLinearOptimizer.h:64
itk::ComputeJacobianTerms::~ComputeJacobianTerms
virtual ~ComputeJacobianTerms()
Definition: itkComputeJacobianTerms.h:113
itk::ComputeJacobianTerms
This is a helper class for the automatic parameter estimation of the ASGD optimizer.
Definition: itkComputeJacobianTerms.h:39
itk::ComputeJacobianTerms::TransformType
TTransform TransformType
Definition: itkComputeJacobianTerms.h:56
itk::ComputeJacobianTerms::JacobianValueType
JacobianType::ValueType JacobianValueType
Definition: itkComputeJacobianTerms.h:129
itk::ComputeJacobianTerms::FixedImageType
TFixedImage FixedImageType
Definition: itkComputeJacobianTerms.h:52
itk::ComputeJacobianTerms::FixedImageRegionType
FixedImageType::RegionType FixedImageRegionType
Definition: itkComputeJacobianTerms.h:58
itk::ComputeJacobianTerms::m_FixedImage
FixedImageType::ConstPointer m_FixedImage
Definition: itkComputeJacobianTerms.h:115
itkImageRandomSamplerBase.h
itk::ComputeJacobianTerms::TransformJacobianType
JacobianType TransformJacobianType
Definition: itkComputeJacobianTerms.h:144
itk::ComputeJacobianTerms::itkStaticConstMacro
itkStaticConstMacro(FixedImageDimension, unsigned int, TFixedImage::ImageDimension)
itk::ComputeJacobianTerms::TransformPointer
TransformType::Pointer TransformPointer
Definition: itkComputeJacobianTerms.h:57
itk::ComputeJacobianTerms::FixedImageIndexType
FixedImageType::IndexType FixedImageIndexType
Definition: itkComputeJacobianTerms.h:126
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::ComputeJacobianTerms::FixedImagePointType
FixedImageType::PointType FixedImagePointType
Definition: itkComputeJacobianTerms.h:127
itk::ComputeJacobianTerms::NonZeroJacobianIndicesType
TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkComputeJacobianTerms.h:73
itk::ComputeJacobianTerms::ComputeJacobianTerms
ComputeJacobianTerms(const Self &)
itk::ComputeJacobianTerms::ScalesType
ScaledSingleValuedNonLinearOptimizerType::ScalesType ScalesType
Definition: itkComputeJacobianTerms.h:72
itk::ImageSamplerBase
This class is a base class for any image sampler.
Definition: itkImageSamplerBase.h:45
itk::ImageGridSampler::ImageSampleContainerType
Superclass::ImageSampleContainerType ImageSampleContainerType
Definition: itkImageGridSampler.h:71
itk::ComputeJacobianTerms::CoordinateRepresentationType
TransformType::ScalarType CoordinateRepresentationType
Definition: itkComputeJacobianTerms.h:145
itk::ImageGridSampler
Samples image voxels on a regular grid.
Definition: itkImageGridSampler.h:46
itk::ComputeJacobianTerms::ImageSampleContainerPointer
ImageSampleContainerType::Pointer ImageSampleContainerPointer
Definition: itkComputeJacobianTerms.h:141
itk::ComputeJacobianTerms::Pointer
SmartPointer< Self > Pointer
Definition: itkComputeJacobianTerms.h:45
itk::ScaledSingleValuedNonLinearOptimizer::ScalesType
NonLinearOptimizer::ScalesType ScalesType
Definition: itkScaledSingleValuedNonLinearOptimizer.h:86
itk::ImageRandomSamplerBase
This class is a base class for any image sampler that randomly picks samples.
Definition: itkImageRandomSamplerBase.h:38
itk::ComputeJacobianTerms::ScaledSingleValuedNonLinearOptimizerType
ScaledSingleValuedNonLinearOptimizer ScaledSingleValuedNonLinearOptimizerType
Definition: itkComputeJacobianTerms.h:69
itk::ComputeJacobianTerms::ComputeJacobianTerms
ComputeJacobianTerms()


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo