Loading...
Searching...
No Matches
itkComputeJacobianTerms.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkComputeJacobianTerms_h
#define itkComputeJacobianTerms_h
#include "itkImageGridSampler.h"
#include "itkImageRandomSamplerBase.h"
#include "itkImageRandomCoordinateSampler.h"
#include "itkScaledSingleValuedNonLinearOptimizer.h"
namespace itk
{
template <class TFixedImage, class TTransform>
class ITK_TEMPLATE_EXPORT ComputeJacobianTerms : public Object
{
public:
ITK_DISALLOW_COPY_AND_MOVE(ComputeJacobianTerms);
using Self = ComputeJacobianTerms;
using Superclass = Object;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(ComputeJacobianTerms, Object);
using FixedImageType = TFixedImage;
using TransformType = TTransform;
using TransformPointer = typename TransformType::Pointer;
using FixedImageRegionType = typename FixedImageType::RegionType;
itkStaticConstMacro(FixedImageDimension, unsigned int, TFixedImage::ImageDimension);
using FixedImageMaskType = ImageMaskSpatialObject<Self::FixedImageDimension>;
using FixedImageMaskPointer = typename FixedImageMaskType::Pointer;
using FixedImageMaskConstPointer = typename FixedImageMaskType::ConstPointer;
using ScaledSingleValuedNonLinearOptimizerType = ScaledSingleValuedNonLinearOptimizer;
using ScaledCostFunctionPointer = typename ScaledSingleValuedNonLinearOptimizerType ::ScaledCostFunctionPointer;
using ScalesType = typename ScaledSingleValuedNonLinearOptimizerType::ScalesType;
using NonZeroJacobianIndicesType = typename TransformType::NonZeroJacobianIndicesType;
itkSetConstObjectMacro(FixedImage, FixedImageType);
itkSetObjectMacro(Transform, TransformType);
itkSetObjectMacro(FixedImageMask, FixedImageMaskType);
itkSetConstObjectMacro(FixedImageMask, FixedImageMaskType);
itkGetConstObjectMacro(FixedImageMask, FixedImageMaskType);
itkSetMacro(Scales, ScalesType);
itkSetMacro(UseScales, bool);
itkSetMacro(MaxBandCovSize, unsigned int);
itkSetMacro(NumberOfBandStructureSamples, unsigned int);
itkSetMacro(NumberOfJacobianMeasurements, SizeValueType);
void
SetFixedImageRegion(const FixedImageRegionType & region)
{
if (region != this->m_FixedImageRegion)
{
this->m_FixedImageRegion = region;
}
}
itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
virtual void
Compute(double & TrC, double & TrCC, double & maxJJ, double & maxJCJ);
protected:
ComputeJacobianTerms() = default;
~ComputeJacobianTerms() override = default;
typename FixedImageType::ConstPointer m_FixedImage{ nullptr };
FixedImageRegionType m_FixedImageRegion{};
FixedImageMaskConstPointer m_FixedImageMask{ nullptr };
TransformPointer m_Transform{ nullptr };
ScalesType m_Scales{};
bool m_UseScales{ false };
unsigned int m_MaxBandCovSize{ 0 };
unsigned int m_NumberOfBandStructureSamples{ 0 };
SizeValueType m_NumberOfJacobianMeasurements{ 0 };
using FixedImageIndexType = typename FixedImageType::IndexType;
using FixedImagePointType = typename FixedImageType::PointType;
using JacobianType = typename TransformType::JacobianType;
using JacobianValueType = typename JacobianType::ValueType;
using ImageSamplerBaseType = ImageSamplerBase<FixedImageType>;
using ImageSamplerBasePointer = typename ImageSamplerBaseType::Pointer;
using ImageRandomSamplerBaseType = ImageRandomSamplerBase<FixedImageType>;
using ImageRandomSamplerBasePointer = typename ImageRandomSamplerBaseType::Pointer;
using ImageGridSamplerType = ImageGridSampler<FixedImageType>;
using ImageGridSamplerPointer = typename ImageGridSamplerType::Pointer;
using ImageSampleContainerType = typename ImageGridSamplerType ::ImageSampleContainerType;
using ImageSampleContainerPointer = typename ImageSampleContainerType::Pointer;
using TransformJacobianType = JacobianType;
using CoordinateRepresentationType = typename TransformType::ScalarType;
using NumberOfParametersType = typename TransformType::NumberOfParametersType;
// \todo: note that this is an exact copy of itk::ComputeDisplacementDistribution
// in the future it would be better to refactoring this part of the code.
virtual void
SampleFixedImageForJacobianTerms(ImageSampleContainerPointer & sampleContainer);
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkComputeJacobianTerms.hxx"
#endif
#endif // end #ifndef itkComputeJacobianTerms_h
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_FixedImage
FixedImageType::ConstPointer m_FixedImage
Definition itkComputeJacobianTerms.h:113
itk::ComputeJacobianTerms::NonZeroJacobianIndicesType
typename TransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition itkComputeJacobianTerms.h:71
itk::ComputeJacobianTerms::Self
ComputeJacobianTerms Self
Definition itkComputeJacobianTerms.h:43
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_Scales
ScalesType m_Scales
Definition itkComputeJacobianTerms.h:117
itk::ComputeJacobianTerms::ImageSampleContainerType
typename ImageGridSamplerType ::ImageSampleContainerType ImageSampleContainerType
Definition itkComputeJacobianTerms.h:137
itk::ComputeJacobianTerms::ImageSamplerBasePointer
typename ImageSamplerBaseType::Pointer ImageSamplerBasePointer
Definition itkComputeJacobianTerms.h:131
itk::ComputeJacobianTerms::TransformType
TTransform TransformType
Definition itkComputeJacobianTerms.h:56
itk::ComputeJacobianTerms::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(ComputeJacobianTerms)
itk::ComputeJacobianTerms::ScalesType
typename ScaledSingleValuedNonLinearOptimizerType::ScalesType ScalesType
Definition itkComputeJacobianTerms.h:70
itk::ComputeJacobianTerms::CoordinateRepresentationType
typename TransformType::ScalarType CoordinateRepresentationType
Definition itkComputeJacobianTerms.h:142
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_FixedImageMask
FixedImageMaskConstPointer m_FixedImageMask
Definition itkComputeJacobianTerms.h:115
itk::ComputeJacobianTerms::SampleFixedImageForJacobianTerms
virtual void SampleFixedImageForJacobianTerms(ImageSampleContainerPointer &sampleContainer)
itk::ComputeJacobianTerms::Pointer
SmartPointer< Self > Pointer
Definition itkComputeJacobianTerms.h:45
itk::ComputeJacobianTerms::ImageSampleContainerPointer
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
Definition itkComputeJacobianTerms.h:138
itk::ComputeJacobianTerms::ImageSamplerBaseType
ImageSamplerBase< FixedImageType > ImageSamplerBaseType
Definition itkComputeJacobianTerms.h:130
itk::ComputeJacobianTerms::~ComputeJacobianTerms
~ComputeJacobianTerms() override=default
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_FixedImageRegion
FixedImageRegionType m_FixedImageRegion
Definition itkComputeJacobianTerms.h:114
itk::ComputeJacobianTerms::FixedImagePointType
typename FixedImageType::PointType FixedImagePointType
Definition itkComputeJacobianTerms.h:125
itk::ComputeJacobianTerms::Superclass
Object Superclass
Definition itkComputeJacobianTerms.h:44
itk::ComputeJacobianTerms::ImageRandomSamplerBaseType
ImageRandomSamplerBase< FixedImageType > ImageRandomSamplerBaseType
Definition itkComputeJacobianTerms.h:132
itk::ComputeJacobianTerms::FixedImageIndexType
typename FixedImageType::IndexType FixedImageIndexType
Definition itkComputeJacobianTerms.h:124
itk::ComputeJacobianTerms::FixedImageMaskPointer
typename FixedImageMaskType::Pointer FixedImageMaskPointer
Definition itkComputeJacobianTerms.h:65
itk::ComputeJacobianTerms::SetFixedImageRegion
void SetFixedImageRegion(const FixedImageRegionType &region)
Definition itkComputeJacobianTerms.h:93
itk::ComputeJacobianTerms::TransformPointer
typename TransformType::Pointer TransformPointer
Definition itkComputeJacobianTerms.h:57
itk::ComputeJacobianTerms::JacobianValueType
typename JacobianType::ValueType JacobianValueType
Definition itkComputeJacobianTerms.h:127
itk::ComputeJacobianTerms::ImageGridSamplerType
ImageGridSampler< FixedImageType > ImageGridSamplerType
Definition itkComputeJacobianTerms.h:135
itk::ComputeJacobianTerms::itkStaticConstMacro
itkStaticConstMacro(FixedImageDimension, unsigned int, TFixedImage::ImageDimension)
itk::ComputeJacobianTerms::ComputeJacobianTerms
ComputeJacobianTerms()=default
itk::ComputeJacobianTerms::ImageGridSamplerPointer
typename ImageGridSamplerType::Pointer ImageGridSamplerPointer
Definition itkComputeJacobianTerms.h:136
itk::ComputeJacobianTerms::Compute
virtual void Compute(double &TrC, double &TrCC, double &maxJJ, double &maxJCJ)
itk::ComputeJacobianTerms::ScaledSingleValuedNonLinearOptimizerType
ScaledSingleValuedNonLinearOptimizer ScaledSingleValuedNonLinearOptimizerType
Definition itkComputeJacobianTerms.h:68
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_MaxBandCovSize
unsigned int m_MaxBandCovSize
Definition itkComputeJacobianTerms.h:120
itk::ComputeJacobianTerms::FixedImageMaskType
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
Definition itkComputeJacobianTerms.h:64
itk::ComputeJacobianTerms::NumberOfParametersType
typename TransformType::NumberOfParametersType NumberOfParametersType
Definition itkComputeJacobianTerms.h:143
itk::ComputeJacobianTerms::JacobianType
typename TransformType::JacobianType JacobianType
Definition itkComputeJacobianTerms.h:126
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_Transform
TransformPointer m_Transform
Definition itkComputeJacobianTerms.h:116
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_NumberOfBandStructureSamples
unsigned int m_NumberOfBandStructureSamples
Definition itkComputeJacobianTerms.h:121
itk::ComputeJacobianTerms::FixedImageType
TFixedImage FixedImageType
Definition itkComputeJacobianTerms.h:55
itk::ComputeJacobianTerms::FixedImageRegionType
typename FixedImageType::RegionType FixedImageRegionType
Definition itkComputeJacobianTerms.h:58
itk::ComputeJacobianTerms::FixedImageMaskConstPointer
typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
Definition itkComputeJacobianTerms.h:66
itk::ComputeJacobianTerms::ImageRandomSamplerBasePointer
typename ImageRandomSamplerBaseType::Pointer ImageRandomSamplerBasePointer
Definition itkComputeJacobianTerms.h:133
itk::ComputeJacobianTerms::TransformJacobianType
JacobianType TransformJacobianType
Definition itkComputeJacobianTerms.h:141
itk::ComputeJacobianTerms::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkComputeJacobianTerms.h:46
itk::ComputeJacobianTerms::ScaledCostFunctionPointer
typename ScaledSingleValuedNonLinearOptimizerType ::ScaledCostFunctionPointer ScaledCostFunctionPointer
Definition itkComputeJacobianTerms.h:69
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_UseScales
bool m_UseScales
Definition itkComputeJacobianTerms.h:118
itk::ComputeJacobianTerms< FixedImageType, TransformType >::m_NumberOfJacobianMeasurements
SizeValueType m_NumberOfJacobianMeasurements
Definition itkComputeJacobianTerms.h:122
itk::ImageGridSampler
Samples image voxels on a regular grid.
Definition itkImageGridSampler.h:46
itk::ImageGridSampler< FixedImageType >::Pointer
SmartPointer< Self > Pointer
Definition itkImageGridSampler.h:53
itk::ImageRandomSamplerBase
This class is a base class for any image sampler that randomly picks samples.
Definition itkImageRandomSamplerBase.h:39
itk::ImageRandomSamplerBase< FixedImageType >::Pointer
SmartPointer< Self > Pointer
Definition itkImageRandomSamplerBase.h:46
itk::ImageSamplerBase
This class is a base class for any image sampler.
Definition itkImageSamplerBase.h:44
itk::ImageSamplerBase< FixedImageType >::Pointer
SmartPointer< Self > Pointer
Definition itkImageSamplerBase.h:51
itk::ScaledSingleValuedNonLinearOptimizer
Definition itkScaledSingleValuedNonLinearOptimizer.h:63
itk::ScaledSingleValuedNonLinearOptimizer::ScalesType
NonLinearOptimizer::ScalesType ScalesType
Definition itkScaledSingleValuedNonLinearOptimizer.h:85
itkImageGridSampler.h
itkImageRandomCoordinateSampler.h
itkImageRandomSamplerBase.h
itkScaledSingleValuedNonLinearOptimizer.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |