go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxStatisticalShapePenalty.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 elxStatisticalShapePenalty_h
19#define elxStatisticalShapePenalty_h
20
21#include "elxIncludes.h" // include first to avoid MSVS warning
23
24#include <vnl/vnl_matrix.h>
25#include <vnl/vnl_vector.h>
26
27namespace elastix
28{
29using namespace itk;
30
57template <class TElastix>
58class ITK_TEMPLATE_EXPORT StatisticalShapePenalty
59 : public StatisticalShapePointPenalty<typename MetricBase<TElastix>::FixedPointSetType,
60 typename MetricBase<TElastix>::MovingPointSetType>
61 , public MetricBase<TElastix>
62{
63public:
65
71 using Pointer = SmartPointer<Self>;
72 using ConstPointer = SmartPointer<const Self>;
73
75 itkNewMacro(Self);
76
79
84 elxClassNameMacro("StatisticalShapePenalty");
85
88 using typename Superclass1::FixedPointSetType;
92
93 // using typename Superclass1::FixedImageRegionType;
94 using typename Superclass1::TransformType;
95 using typename Superclass1::TransformPointer;
96 using typename Superclass1::InputPointType;
97 using typename Superclass1::OutputPointType;
100 // using typename Superclass1::RealType;
101 using typename Superclass1::FixedImageMaskType;
105 using typename Superclass1::MeasureType;
106 using typename Superclass1::DerivativeType;
107 using typename Superclass1::ParametersType;
108
109 using CoordRepType = typename OutputPointType::CoordRepType;
110 using VnlVectorType = vnl_vector<CoordRepType>;
111
113 /*typedef itk::AdvancedTransform<
114 CoordRepType,
115 itkGetStaticConstMacro( FixedImageDimension ),
116 itkGetStaticConstMacro( MovingImageDimension ) > ITKBaseType;
117 */
120
122 using typename Superclass2::ElastixType;
123 using typename Superclass2::RegistrationType;
125 using typename Superclass2::FixedImageType;
126 using typename Superclass2::MovingImageType;
127
129 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
130
132 itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
133
139
143 void
144 Initialize() override;
145
150 void
152
153 void
155
157 unsigned int
158 ReadLandmarks(const std::string & landmarkFileName,
159 typename PointSetType::Pointer & pointSet,
160 const typename ImageType::ConstPointer image);
161
162 unsigned int
163 ReadShape(const std::string & ShapeFileName,
164 typename PointSetType::Pointer & pointSet,
165 const typename ImageType::ConstPointer image);
166
168 void
170 {}
171
172protected:
176 ~StatisticalShapePenalty() override = default;
177
178private:
180};
181
182} // end namespace elastix
183
184#ifndef ITK_MANUAL_INSTANTIATION
185# include "elxStatisticalShapePenalty.hxx"
186#endif
187
188#endif // end #ifndef elxStatisticalShapePenalty_h
This class is the elastix base class for all Metrics.
Definition: elxMetricBase.h:73
itk::SingleValuedCostFunction ITKBaseType
Definition: elxMetricBase.h:97
typename ElastixType::FixedImageType FixedImageType
Definition: elxMetricBase.h:89
itk::PointSet< CoordinateRepresentationType, FixedImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, FixedImageDimension, FixedImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > FixedPointSetType
typename ElastixType::MovingImageType MovingImageType
Definition: elxMetricBase.h:92
typename ElastixType::RegistrationBaseType RegistrationType
itk::PointSet< CoordinateRepresentationType, MovingImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, MovingImageDimension, MovingImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > MovingPointSetType
An metric based on the itk::StatisticalShapePointPenalty.
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
elxClassNameMacro("StatisticalShapePenalty")
typename OutputPointType::CoordRepType CoordRepType
typename ElastixType::FixedImageType FixedImageType
Definition: elxMetricBase.h:89
typename Superclass2::ITKBaseType ITKBaseType
~StatisticalShapePenalty() override=default
unsigned int ReadShape(const std::string &ShapeFileName, typename PointSetType::Pointer &pointSet, const typename ImageType::ConstPointer image)
typename CombinationTransformType::InitialTransformType InitialTransformType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
void BeforeEachResolution() override
ITK_DISALLOW_COPY_AND_MOVE(StatisticalShapePenalty)
unsigned int ReadLandmarks(const std::string &landmarkFileName, typename PointSetType::Pointer &pointSet, const typename ImageType::ConstPointer image)
This class combines two transforms: an 'initial transform' with a 'current transform'.
Transform maps points, vectors and covariant vectors from an input space to an output space.
SpatialObject< Self::MovingPointSetDimension > MovingImageMaskType
SpatialObject< Self::FixedPointSetDimension > FixedImageMaskType
Computes the Mahalanobis distance between the transformed shape and a mean shape. A model mean and co...
typename TransformType::InputPointType InputPointType
typename MovingPointSetType::ConstPointer MovingPointSetConstPointer
typename FixedPointSetType::ConstPointer FixedPointSetConstPointer
typename TransformType::ParametersType TransformParametersType
typename TransformType::JacobianType TransformJacobianType
typename TransformType::OutputPointType OutputPointType


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo