go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxMissingStructurePenalty.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 elxMissingStructurePenalty_h
19#define elxMissingStructurePenalty_h
20
21#include "elxIncludes.h"
23
24#include "itkMeshFileReader.h"
25#include "itkMeshFileWriter.h"
26
27namespace elastix
28{
29
53template <class TElastix>
54class ITK_TEMPLATE_EXPORT MissingStructurePenalty
55 : public itk::MissingVolumeMeshPenalty<typename MetricBase<TElastix>::FixedPointSetType,
56 typename MetricBase<TElastix>::MovingPointSetType>
57 , public MetricBase<TElastix>
58{
59public:
61
67 using Pointer = itk::SmartPointer<Self>;
68 using ConstPointer = itk::SmartPointer<const Self>;
69
71 itkNewMacro(Self);
72
75
80 elxClassNameMacro("MissingStructurePenalty");
81
83 using typename Superclass1::FixedMeshType;
84 using typename Superclass1::FixedMeshPointer;
86
88 using typename Superclass1::FixedPointSetType;
96 using typename Superclass1::CellInterfaceType;
97
98 // using typename Superclass1::FixedImageRegionType;
99 using typename Superclass1::TransformType;
100 using typename Superclass1::TransformPointer;
101 using typename Superclass1::InputPointType;
102 using typename Superclass1::OutputPointType;
105 // using typename Superclass1::RealType;
106 using typename Superclass1::FixedImageMaskType;
110 using typename Superclass1::MeasureType;
111 using typename Superclass1::DerivativeType;
112 using typename Superclass1::ParametersType;
113
114 using CoordRepType = typename OutputPointType::CoordRepType;
115
116 using typename Superclass1::MeshIdType;
119
121 using typename Superclass2::ElastixType;
122 using typename Superclass2::RegistrationType;
124 using typename Superclass2::FixedImageType;
125 using typename Superclass2::MovingImageType;
126
128 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
129 itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
130
137
141 void
142 Initialize() override;
143
148 int
149 BeforeAllBase() override;
150
151 void
153
154 void
156
157 void
159
161 unsigned int
162 ReadMesh(const std::string & meshFileName, typename FixedMeshType::Pointer & mesh);
163
164 void
165 WriteResultMesh(const std::string & filename, MeshIdType meshId);
166
167 unsigned int
168 ReadTransformixPoints(const std::string & filename, typename MeshType::Pointer & mesh);
169
171 void
173 {}
174
175protected:
179 ~MissingStructurePenalty() override = default;
180
181private:
183
184 unsigned int m_NumberOfMeshes;
185};
186
187} // end namespace elastix
188
189#ifndef ITK_MANUAL_INSTANTIATION
190# include "elxMissingStructurePenalty.hxx"
191#endif
192
193#endif // end #ifndef elxMissingStructurePenalty_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
unsigned int ReadTransformixPoints(const std::string &filename, typename MeshType::Pointer &mesh)
~MissingStructurePenalty() override=default
typename CombinationTransformType::InitialTransformType InitialTransformType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
ITK_DISALLOW_COPY_AND_MOVE(MissingStructurePenalty)
Mesh< DummyMeshPixelType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
typename ElastixType::FixedImageType FixedImageType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
typename OutputPointType::CoordRepType CoordRepType
elxClassNameMacro("MissingStructurePenalty")
typename Superclass2::ITKBaseType ITKBaseType
void WriteResultMesh(const std::string &filename, MeshIdType meshId)
itk::SmartPointer< const Self > ConstPointer
unsigned int ReadMesh(const std::string &meshFileName, typename FixedMeshType::Pointer &mesh)
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.
Computes the (pseudo) volume of the transformed surface mesh of a structure. .
VectorContainer< MeshIdType, FixedMeshConstPointer > FixedMeshContainerType
Mesh< DummyMeshPixelType, FixedPointSetDimension, MeshTraitsType > FixedMeshType
typename TransformType::InputPointType InputPointType
typename MeshTraitsType::CellType CellInterfaceType
typename FixedMeshContainerType::Pointer FixedMeshContainerPointer
typename TransformType::ParametersType TransformParametersType
typename TransformType::JacobianType TransformJacobianType
typename FixedMeshType::ConstPointer FixedMeshConstPointer
typename TransformType::OutputPointType OutputPointType
typename FixedMeshType::Pointer FixedMeshPointer
typename MappedMeshContainerType::Pointer MappedMeshContainerPointer
VectorContainer< MeshIdType, FixedMeshPointer > MappedMeshContainerType
typename MovingPointSetType::ConstPointer MovingPointSetConstPointer
typename FixedPointSetType::ConstPointer FixedPointSetConstPointer
ImageMaskSpatialObject< Self::MovingPointSetDimension > MovingImageMaskType
ImageMaskSpatialObject< Self::FixedPointSetDimension > FixedImageMaskType


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo