go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkSumSquaredTissueVolumeDifferenceImageToImageMetric.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 __itkSumSquaredTissueVolumeDifferenceImageToImageMetric_h
19 #define __itkSumSquaredTissueVolumeDifferenceImageToImageMetric_h
20 
22 
23 namespace itk
24 {
25 
60 template < class TFixedImage, class TMovingImage >
62  public AdvancedImageToImageMetric< TFixedImage, TMovingImage>
63 {
64 public:
65 
69  typedef SmartPointer<Self> Pointer;
70  typedef SmartPointer<const Self> ConstPointer;
71 
73  itkNewMacro( Self );
74 
77 
92  typedef typename Superclass::RealType RealType;
117 
120  typedef typename TransformType::SpatialJacobianType SpatialJacobianType;
121  typedef typename TransformType::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType;
122  typedef typename TransformType::SpatialHessianType SpatialHessianType;
123  typedef typename TransformType::JacobianOfSpatialHessianType JacobianOfSpatialHessianType;
124  typedef typename TransformType::InternalMatrixType InternalMatrixType;
125 
127  itkStaticConstMacro( FixedImageDimension, unsigned int, FixedImageType::ImageDimension );
128 
130  itkStaticConstMacro( MovingImageDimension, unsigned int, MovingImageType::ImageDimension );
131 
133  virtual MeasureType GetValueSingleThreaded( const TransformParametersType & parameters ) const;
134 
135  MeasureType GetValue( const TransformParametersType & parameters ) const override;
136 
138  void GetDerivative( const TransformParametersType & parameters,
139  DerivativeType & derivative ) const override;
140 
143  MeasureType & Value, DerivativeType & Derivative ) const override;
144 
147  MeasureType & measure, DerivativeType & derivative) const;
148 
150  itkSetMacro( AirValue, RealType );
151  itkGetMacro( AirValue, RealType );
152 
154  itkSetMacro( TissueValue, RealType );
155  itkGetMacro( TissueValue, RealType );
156 
157 protected:
160 
161  void PrintSelf( std::ostream & os, Indent indent ) const override;
162 
176 
181  const TransformJacobianType & jacobian,
182  const MovingImageDerivativeType & movingImageDerivative,
183  DerivativeType & imageJacobian) const override;
184 
188  const RealType fixedImageValue,
189  const RealType movingImageValue,
190  const DerivativeType & imageJacobian,
191  const NonZeroJacobianIndicesType & nzji,
192  const RealType spatialJacobianDeterminant,
193  const DerivativeType & jacobianOfSpatialJacobianDeterminant,
194  MeasureType & measure,
195  DerivativeType & deriv ) const;
196 
204  const SpatialJacobianType & spatialJacobian,
205  const RealType spatialJacobianDeterminant,
206  SpatialJacobianType & inverseSpatialJacobian ) const;
207 
214  const JacobianOfSpatialJacobianType & jacobianOfSpatialJacobian,
215  const SpatialJacobianType & inverseSpatialJacobian,
216  DerivativeType & jacobianOfSpatialJacobianDeterminant ) const;
217 
219  inline void ThreadedGetValue( ThreadIdType threadID ) override;
220 
222  inline void AfterThreadedGetValue( MeasureType & value ) const override;
223 
225  inline void ThreadedGetValueAndDerivative( ThreadIdType threadId ) override;
226 
229  MeasureType & measure, DerivativeType & derivative ) const override;
230 
231 private:
232  SumSquaredTissueVolumeDifferenceImageToImageMetric(const Self&); // purposely not implemented
233  void operator=(const Self&); // purposely not implemented
234 
237 
240 
241 }; // end class SumSquaredTissueVolumeDifferenceImageToImageMetric
242 
243 } // end namespace itk
244 
245 #ifndef ITK_MANUAL_INSTANTIATION
246 #include "itkSumSquaredTissueVolumeDifferenceImageToImageMetric.hxx"
247 #endif
248 
249 #endif // end #ifndef __itkSumSquaredTissueVolumeDifferenceImageToImageMetric_h
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::TransformParametersType TransformParametersType
Superclass::MovingImageConstPointer MovingImageConstPointer
Superclass::FixedImageMaskPointer FixedImageMaskPointer
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::GradientImageFilterType GradientImageFilterType
Superclass::TransformJacobianType TransformJacobianType
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
Superclass::GradientImagePointer GradientImagePointer
AdvancedTransform< ScalarType, FixedImageDimension, MovingImageDimension > AdvancedTransformType
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
ImageSamplerBase< FixedImageType > ImageSamplerType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
Superclass::InterpolatorPointer InterpolatorPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
TransformType::InputPointType FixedImagePointType
Superclass::MovingImageMaskType MovingImageMaskType
Superclass::GradientPixelType GradientPixelType
MovingImageType::IndexType MovingImageIndexType
MovingImageType::RegionType MovingImageRegionType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
FixedImageIndexType::IndexValueType FixedImageIndexValueType
Superclass::MovingImagePixelType MovingImagePixelType
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Superclass::FixedImageMaskType FixedImageMaskType
Superclass::GradientImageType GradientImageType
Superclass::InterpolatorType InterpolatorType
TransformType::OutputPointType MovingImagePointType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::FixedImageRegionType FixedImageRegionType
Compute sum of square tissue volume difference between two images.
MeasureType GetValue(const TransformParametersType &parameters) const override
virtual MeasureType GetValueSingleThreaded(const TransformParametersType &parameters) const
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
void EvaluateJacobianOfSpatialJacobianDeterminantInnerProduct(const JacobianOfSpatialJacobianType &jacobianOfSpatialJacobian, const SpatialJacobianType &inverseSpatialJacobian, DerivativeType &jacobianOfSpatialJacobianDeterminant) const
void UpdateValueAndDerivativeTerms(const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, const RealType spatialJacobianDeterminant, const DerivativeType &jacobianOfSpatialJacobianDeterminant, MeasureType &measure, DerivativeType &deriv) const
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
void AfterThreadedGetValue(MeasureType &value) const override
bool EvaluateInverseSpatialJacobian(const SpatialJacobianType &spatialJacobian, const RealType spatialJacobianDeterminant, SpatialJacobianType &inverseSpatialJacobian) const
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const override
void ThreadedGetValue(ThreadIdType threadID) override
void PrintSelf(std::ostream &os, Indent indent) const override
void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const override
void GetValueAndDerivativeSingleThreaded(const TransformParametersType &parameters, MeasureType &measure, DerivativeType &derivative) const
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override
void AfterThreadedGetValueAndDerivative(MeasureType &measure, DerivativeType &derivative) const override
void ThreadedGetValueAndDerivative(ThreadIdType threadId) override


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.9.1 elastix logo