go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
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
26namespace itk
27{
35
36template <typename TFixedImage, typename TTransform>
37class ITK_TEMPLATE_EXPORT ComputeJacobianTerms : public Object
38{
39public:
41
44 using Superclass = Object;
45 using Pointer = SmartPointer<Self>;
46 using ConstPointer = SmartPointer<const Self>;
47
49 itkNewMacro(Self);
50
53
55 using TransformPointer = typename TTransform::Pointer;
56 using FixedImageRegionType = typename TFixedImage::RegionType;
57
61 itkStaticConstMacro(FixedImageDimension, unsigned int, TFixedImage::ImageDimension);
62 using FixedImageMaskType = ImageMaskSpatialObject<Self::FixedImageDimension>;
63 using FixedImageMaskPointer = typename FixedImageMaskType::Pointer;
64 using FixedImageMaskConstPointer = typename FixedImageMaskType::ConstPointer;
65
67
69 itkSetConstObjectMacro(FixedImage, TFixedImage);
70
72 itkSetObjectMacro(Transform, TTransform);
73
75 itkSetObjectMacro(FixedImageMask, FixedImageMaskType);
76 itkSetConstObjectMacro(FixedImageMask, FixedImageMaskType);
77 itkGetConstObjectMacro(FixedImageMask, FixedImageMaskType);
78
80 itkSetMacro(Scales, ScalesType);
81 itkSetMacro(UseScales, bool);
82 itkSetMacro(MaxBandCovSize, unsigned int);
83 itkSetMacro(NumberOfBandStructureSamples, unsigned int);
84 itkSetMacro(NumberOfJacobianMeasurements, SizeValueType);
85
87 void
89 {
90 m_FixedImageRegion = region;
91 }
92
93
95 itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
96
98 struct Terms
99 {
100 double TrC;
101 double TrCC;
102 double maxJJ;
103 double maxJCJ;
104 };
105
107 Terms
108 Compute() const;
109
110protected:
112 ~ComputeJacobianTerms() override = default;
113
115
117 // \todo: note that this is an exact copy of itk::ComputeDisplacementDistribution
118 // in the future it would be better to refactoring this part of the code.
119 std::vector<ImageSampleType>
121
122private:
123 typename TFixedImage::ConstPointer m_FixedImage{ nullptr };
128 bool m_UseScales{ false };
129
130 unsigned int m_MaxBandCovSize{ 0 };
133};
134
135} // end namespace itk
136
137#ifndef ITK_MANUAL_INSTANTIATION
138# include "itkComputeJacobianTerms.hxx"
139#endif
140
141#endif // end #ifndef itkComputeJacobianTerms_h
ScaledSingleValuedNonLinearOptimizer::ScalesType ScalesType
ImageSample< TFixedImage > ImageSampleType
ITK_DISALLOW_COPY_AND_MOVE(ComputeJacobianTerms)
typename TFixedImage::RegionType FixedImageRegionType
FixedImageMaskConstPointer m_FixedImageMask
~ComputeJacobianTerms() override=default
FixedImageRegionType m_FixedImageRegion
typename FixedImageMaskType::Pointer FixedImageMaskPointer
typename TTransform::Pointer TransformPointer
void SetFixedImageRegion(const FixedImageRegionType &region)
TFixedImage::ConstPointer m_FixedImage
itkStaticConstMacro(FixedImageDimension, unsigned int, TFixedImage::ImageDimension)
std::vector< ImageSampleType > SampleFixedImageForJacobianTerms() const
itkOverrideGetNameOfClassMacro(ComputeJacobianTerms)
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
SmartPointer< const Self > ConstPointer
A class that defines an image sample, which is the coordinates of a point and its value.


Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo