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, typename PointSetType::Pointer & pointSet);
164
166 void
168 {}
169
170protected:
174 ~StatisticalShapePenalty() override = default;
175
176private:
178};
179
180} // end namespace elastix
181
182#ifndef ITK_MANUAL_INSTANTIATION
183# include "elxStatisticalShapePenalty.hxx"
184#endif
185
186#endif // end #ifndef elxStatisticalShapePenalty_h
This class is the elastix base class for all Metrics.
itk::PointSet< CoordinateRepresentationType, MovingImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, MovingImageDimension, MovingImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > MovingPointSetType
itk::PointSet< CoordinateRepresentationType, FixedImageDimension, itk::DefaultStaticMeshTraits< CoordinateRepresentationType, FixedImageDimension, FixedImageDimension, CoordinateRepresentationType, CoordinateRepresentationType, CoordinateRepresentationType > > FixedPointSetType
itk::SingleValuedCostFunction ITKBaseType
typename ElastixType::FixedImageType FixedImageType
typename ElastixType::MovingImageType MovingImageType
typename ElastixType::RegistrationBaseType RegistrationType
An metric based on the itk::StatisticalShapePointPenalty.
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
elxClassNameMacro("StatisticalShapePenalty")
typename OutputPointType::CoordRepType CoordRepType
typename ElastixType::FixedImageType FixedImageType
typename Superclass2::ITKBaseType ITKBaseType
~StatisticalShapePenalty() override=default
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)
unsigned int ReadShape(const std::string &ShapeFileName, typename PointSetType::Pointer &pointSet)
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.
ImageMaskSpatialObject< Self::MovingPointSetDimension > MovingImageMaskType
ImageMaskSpatialObject< 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 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo