ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkWarpHarmonicEnergyCalculator.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkWarpHarmonicEnergyCalculator_h
19#define itkWarpHarmonicEnergyCalculator_h
20
21#include "itkObject.h"
22#include "itkObjectFactory.h"
24#include "itkVector.h"
25
26namespace itk
27{
44template <typename TInputImage>
45class ITK_TEMPLATE_EXPORT WarpHarmonicEnergyCalculator : public Object
46{
47public:
48 ITK_DISALLOW_COPY_AND_MOVE(WarpHarmonicEnergyCalculator);
49
55
57 itkNewMacro(Self);
58
60 itkOverrideGetNameOfClassMacro(WarpHarmonicEnergyCalculator);
61
63 using ImageType = TInputImage;
64
66 using ImagePointer = typename TInputImage::Pointer;
67
69 using ImageConstPointer = typename TInputImage::ConstPointer;
70
72 using PixelType = typename TInputImage::PixelType;
73
75 using IndexType = typename TInputImage::IndexType;
76
78 using RegionType = typename TInputImage::RegionType;
79
81 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
82
84 static constexpr unsigned int VectorDimension = PixelType::Dimension;
85
90
100 void
102 itkGetConstMacro(UseImageSpacing, bool);
103 itkBooleanMacro(UseImageSpacing);
105
107
111 itkSetMacro(DerivativeWeights, WeightsType);
112 itkGetConstReferenceMacro(DerivativeWeights, WeightsType);
114
116 itkSetConstObjectMacro(Image, ImageType);
117
119 void
121
123 itkGetConstMacro(HarmonicEnergy, double);
124
126 void
127 SetRegion(const RegionType & region);
128
129protected:
131 ~WarpHarmonicEnergyCalculator() override = default;
132 void
133 PrintSelf(std::ostream & os, Indent indent) const override;
134
136 itkGetConstReferenceMacro(NeighborhoodRadius, RadiusType);
137 itkSetMacro(NeighborhoodRadius, RadiusType);
139
140 double
142
143private:
144 double m_HarmonicEnergy{ 0.0 };
146
148 bool m_RegionSetByUser{ false };
149
150 bool m_UseImageSpacing{ true };
151
153
155};
156} // end namespace itk
157
158#ifndef ITK_MANUAL_INSTANTIATION
159# include "itkWarpHarmonicEnergyCalculator.hxx"
160#endif
161
162#endif /* itkWarpHarmonicEnergyCalculator_h */
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Simulate a standard C array with copy semantics.
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:50
Implements transparent reference counting.
ConstNeighborhoodIterator< ImageType > ConstNeighborhoodIteratorType
~WarpHarmonicEnergyCalculator() override=default
FixedArray< double, ImageDimension > WeightsType
void SetRegion(const RegionType &region)
void PrintSelf(std::ostream &os, Indent indent) const override
typename TInputImage::RegionType RegionType
typename ConstNeighborhoodIteratorType::RadiusType RadiusType
typename TInputImage::ConstPointer ImageConstPointer
double EvaluateAtNeighborhood(ConstNeighborhoodIteratorType &it) const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....