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  * 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 __itkComputeDisplacementDistribution_h
19 #define __itkComputeDisplacementDistribution_h
20 
22 
23 #include "itkImageGridSampler.h"
26 
27 namespace itk
28 {
43 template< class TFixedImage, class TTransform >
46 {
47 public:
48 
53  typedef SmartPointer< const Self > ConstPointer;
54 
56  itkNewMacro( Self );
57 
59  itkTypeMacro( ComputeDisplacementDistribution,
61 
63  typedef TFixedImage FixedImageType;
64  typedef TTransform TransformType;
65  typedef typename TransformType::Pointer TransformPointer;
66  typedef typename FixedImageType::RegionType FixedImageRegionType;
70 
74  itkStaticConstMacro( FixedImageDimension, unsigned int,
75  TFixedImage::ImageDimension );
76  typedef SpatialObject< itkGetStaticConstMacro( FixedImageDimension ) > FixedImageMaskType;
77  typedef typename FixedImageMaskType::Pointer FixedImageMaskPointer;
78  typedef typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer;
79  typedef typename TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
80 
82  itkSetConstObjectMacro( FixedImage, FixedImageType );
83 
85  itkSetObjectMacro( Transform, TransformType );
86 
88  itkSetObjectMacro( FixedImageMask, FixedImageMaskType );
89  itkSetConstObjectMacro( FixedImageMask, FixedImageMaskType );
90  itkGetConstObjectMacro( FixedImageMask, FixedImageMaskType );
91 
93  itkSetMacro( NumberOfJacobianMeasurements, SizeValueType );
94 
96  void SetFixedImageRegion( const FixedImageRegionType & region )
97  {
98  if( region != this->m_FixedImageRegion )
99  {
100  this->m_FixedImageRegion = region;
101  }
102  }
103 
104 
106  itkGetConstReferenceMacro( FixedImageRegion, FixedImageRegionType );
107 
109  virtual void ComputeDistributionTerms( const ParametersType & mu,
110  double & jacg, double & maxJJ, std::string method );
111 
112 protected:
113 
116 
117  typename FixedImageType::ConstPointer m_FixedImage;
118  FixedImageRegionType m_FixedImageRegion;
119  FixedImageMaskConstPointer m_FixedImageMask;
120  TransformPointer m_Transform;
123 
124  typedef typename FixedImageType::IndexType FixedImageIndexType;
125  typedef typename FixedImageType::PointType FixedImagePointType;
126  typedef typename TransformType::JacobianType JacobianType;
127  typedef typename JacobianType::ValueType JacobianValueType;
128 
134 
137  typedef typename ImageGridSamplerType
140 
142  typedef JacobianType TransformJacobianType;
143  typedef typename TransformType::ScalarType CoordinateRepresentationType;
144  typedef typename TransformType::NumberOfParametersType NumberOfParametersType;
145 
147  // \todo: note that this is an exact copy of itk::ComputeJacobianTerms
148  // in the future it would be better to refactoring this part of the code
150  ImageSampleContainerPointer & sampleContainer );
151 
152 private:
153 
154  ComputeDisplacementDistribution( const Self & ); // purposely not implemented
155  void operator=( const Self & ); // purposely not implemented
156 
157 };
158 
159 } // end namespace itk
160 
161 #ifndef ITK_MANUAL_INSTANTIATION
162 #include "itkComputeDisplacementDistribution.hxx"
163 #endif
164 
165 #endif // end #ifndef __itkComputeDisplacementDistribution_h
ScaledSingleValuedNonLinearOptimizer Superclass
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
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 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo