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
elxBSplineTransformWithDiffusion.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 elxBSplineTransformWithDiffusion_h
19#define elxBSplineTransformWithDiffusion_h
20
21/* For easy changing the BSplineOrder: */
22#define __VSplineOrder 3
23
24#include "elxIncludes.h" // include first to avoid MSVS warning
27// #include "itkBSplineCombinationTransform.h"
28#include "itkBSplineResampleImageFilterBase.h"
29#include "itkBSplineUpsampleImageFilter.h"
30
31#include "itkImageRegionConstIterator.h"
32
36#include "itkImageFileReader.h"
37#include "itkImageFileWriter.h"
38#include "itkResampleImageFilter.h"
39#include "itkCastImageFilter.h"
40#include "itkMaximumImageFilter.h"
41#include "itkImageRegionIterator.h"
42#include "itkBSplineInterpolateImageFunction.h"
43
44namespace elastix
45{
46
157
158template <typename TElastix>
159class ITK_TEMPLATE_EXPORT BSplineTransformWithDiffusion
160 : public itk::DeformationFieldRegulizer<itk::AdvancedCombinationTransform<
161 // BSplineCombinationTransform<
162 typename elx::TransformBase<TElastix>::CoordinateType,
163 elx::TransformBase<TElastix>::FixedImageDimension>>
164 ,
165 // elx::TransformBase<TElastix>::FixedImageDimension, __VSplineOrder > >,
166 public TransformBase<TElastix>
167{
168public:
170
177
184 3>;
185
186 using Pointer = itk::SmartPointer<Self>;
187 using ConstPointer = itk::SmartPointer<const Self>;
188
190 itkNewMacro(Self);
191
194
199 elxClassNameMacro("BSplineTransformWithDiffusion");
200
202 itkStaticConstMacro(SpaceDimension, unsigned int, Superclass2::FixedImageDimension);
203
205 itkStaticConstMacro(SplineOrder, unsigned int, __VSplineOrder);
206
208 using typename Superclass1::ScalarType;
209 using typename Superclass1::ParametersType;
210 using typename Superclass1::JacobianType;
211 using typename Superclass1::InputVectorType;
212 using typename Superclass1::OutputVectorType;
213 using typename Superclass1::InputCovariantVectorType;
214 using typename Superclass1::OutputCovariantVectorType;
215 using typename Superclass1::InputVnlVectorType;
216 using typename Superclass1::OutputVnlVectorType;
217 using typename Superclass1::InputPointType;
218 using typename Superclass1::OutputPointType;
219
221 using PixelType = typename BSplineTransformType::PixelType;
222 using ImageType = typename BSplineTransformType::ImageType;
223 using ImagePointer = typename BSplineTransformType::ImagePointer;
224 using RegionType = typename BSplineTransformType::RegionType;
225 using IndexType = typename BSplineTransformType::IndexType;
226 using SizeType = typename BSplineTransformType::SizeType;
227 using SpacingType = typename BSplineTransformType::SpacingType;
228 using OriginType = typename BSplineTransformType::OriginType;
229 using WeightsFunctionType = typename BSplineTransformType::WeightsFunctionType;
230 using WeightsType = typename BSplineTransformType::WeightsType;
231 using ContinuousIndexType = typename BSplineTransformType::ContinuousIndexType;
232 using ParameterIndexArrayType = typename BSplineTransformType::ParameterIndexArrayType;
233
235 using typename Superclass2::ElastixType;
236 using typename Superclass2::ParameterMapType;
237 using typename Superclass2::RegistrationType;
238 using typename Superclass2::CoordinateType;
239 using typename Superclass2::FixedImageType;
240 using typename Superclass2::MovingImageType;
243
246 using typename Superclass1::VectorImageType;
247 using VectorImagePointer = typename VectorImageType::Pointer;
248
250 using FixedImageELXType = typename ElastixType::FixedImageType;
251 using MovingImageELXType = typename ElastixType::MovingImageType;
252
254 using DummyImageType = itk::Image<short, Self::SpaceDimension>;
255 using BSplineTransformPointer = typename BSplineTransformType::Pointer;
257
259 using VectorReaderType = itk::ImageFileReader<VectorImageType>;
260 using VectorType = typename VectorImageType::PixelType;
261 using VectorImageIteratorType = itk::ImageRegionIterator<VectorImageType>;
263 using GrayValueImagePointer = typename GrayValueImageType::Pointer;
264 using GrayValuePixelType = typename GrayValueImageType::PixelType;
265 using GrayValueImageIteratorType = itk::ImageRegionIterator<GrayValueImageType>;
266 using MaximumImageFilterType = itk::MaximumImageFilter<GrayValueImageType, GrayValueImageType, GrayValueImageType>;
269 using RadiusType = typename VectorImageType::SizeType;
270 using ResamplerType1 = itk::ResampleImageFilter<MovingImageELXType, GrayValueImageType, CoordinateType>;
271 using ResamplerPointer1 = typename ResamplerType1::Pointer;
272 using ResamplerType2 = itk::ResampleImageFilter<GrayValueImageType, GrayValueImageType, CoordinateType>;
273 using ResamplerPointer2 = typename ResamplerType2::Pointer;
274 using InterpolatorType = itk::BSplineInterpolateImageFunction<GrayValueImageType>;
275 using InterpolatorPointer = typename InterpolatorType::Pointer;
276 using GrayValueImageReaderType = itk::ImageFileReader<GrayValueImageType>;
277 using GrayValueImageReaderPointer = typename GrayValueImageReaderType::Pointer;
278
284 void
286
290 void
292
296 void
298
302 void
304
306 virtual void
307 SetInitialGrid(bool upsampleGridOption);
308
310 virtual void
312
314 void
315 ReadFromFile() override;
316
318 void
320
332 TransformPoint(const InputPointType & point) const override;
333
344
345protected:
349 ~BSplineTransformWithDiffusion() override = default;
350
353
354private:
356
360
362 void
364
383
391
394
399};
400
401} // end namespace elastix
402
403#ifndef ITK_MANUAL_INSTANTIATION
404# include "elxBSplineTransformWithDiffusion.hxx"
405#endif
406
407#endif // end #ifndef elxBSplineTransformWithDiffusion_h
itkStaticConstMacro(SplineOrder, unsigned int, __VSplineOrder)
ITK_DISALLOW_COPY_AND_MOVE(BSplineTransformWithDiffusion)
itkStaticConstMacro(SpaceDimension, unsigned int, Superclass2::FixedImageDimension)
typename Superclass1::Superclass GenericDeformationFieldRegulizer
itk::DeformationFieldRegulizer< itk::AdvancedCombinationTransform< typename elx::TransformBase< TElastix >::CoordinateType, elx::TransformBase< TElastix >::FixedImageDimension > > Superclass1
typename Superclass2::CombinationTransformType CombinationTransformType
itk::ResampleImageFilter< GrayValueImageType, GrayValueImageType, CoordinateType > ResamplerType2
typename BSplineTransformType::SpacingType SpacingType
itk::VectorMeanDiffusionImageFilter< VectorImageType, GrayValueImageType > DiffusionFilterType
itk::ImageFileReader< VectorImageType > VectorReaderType
typename BSplineTransformType::IndexType IndexType
itk::MaximumImageFilter< GrayValueImageType, GrayValueImageType, GrayValueImageType > MaximumImageFilterType
typename BSplineTransformType::RegionType RegionType
typename BSplineTransformType::Pointer BSplineTransformPointer
typename GrayValueImageType::PixelType GrayValuePixelType
OutputPointType TransformPoint(const InputPointType &point) const override
typename GrayValueImageReaderType::Pointer GrayValueImageReaderPointer
typename BSplineTransformType::WeightsFunctionType WeightsFunctionType
virtual void SetInitialGrid(bool upsampleGridOption)
typename ElastixType::MovingImageType MovingImageELXType
itk::Image< short, Self::SpaceDimension > DummyImageType
typename BSplineTransformType::SizeType SizeType
typename TElastix::ParameterMapType ParameterMapType
itkOverrideGetNameOfClassMacro(BSplineTransformWithDiffusion)
elxClassNameMacro("BSplineTransformWithDiffusion")
typename BSplineTransformType::WeightsType WeightsType
typename GrayValueImageType::Pointer GrayValueImagePointer
itk::BSplineInterpolateImageFunction< GrayValueImageType > InterpolatorType
typename BSplineTransformType::OriginType OriginType
itk::ImageFileReader< GrayValueImageType > GrayValueImageReaderType
typename BSplineTransformType::ParameterIndexArrayType ParameterIndexArrayType
typename BSplineTransformType::ImageType ImageType
ParameterMapType CreateDerivedTransformParameterMap() const override
typename DiffusionFilterType::Pointer DiffusionFilterPointer
typename InterpolatorType::Pointer InterpolatorPointer
~BSplineTransformWithDiffusion() override=default
typename BSplineTransformType::ContinuousIndexType ContinuousIndexType
typename ElastixType::FixedImageType FixedImageELXType
itk::AdvancedBSplineDeformableTransform< typename elx::TransformBase< TElastix >::CoordinateType, elx::TransformBase< TElastix >::FixedImageDimension, 3 > BSplineTransformType
typename BSplineTransformType::ImagePointer ImagePointer
void WriteDerivedTransformDataToFile() const override
itk::ResampleImageFilter< MovingImageELXType, GrayValueImageType, CoordinateType > ResamplerType1
itk::ImageRegionIterator< GrayValueImageType > GrayValueImageIteratorType
itk::ImageRegionIterator< VectorImageType > VectorImageIteratorType
This class is the elastix base class for all Transforms.
typename TElastix::FixedImageType FixedImageType
typename ITKBaseType::OutputPointType OutputPointType
ElastixBase::CoordinateType CoordinateType
typename TElastix::ParameterMapType ParameterMapType
typename TElastix::MovingImageType MovingImageType
typename ElastixType::RegistrationBaseType RegistrationType
itk::AdvancedCombinationTransform< CoordinateType, Self::FixedImageDimension > CombinationTransformType
typename ITKBaseType::InputPointType InputPointType
CombinationTransformType ITKBaseType
itk::OptimizerParameters< ValueType > ParametersType
Deformable transform using a B-spline representation.
This class combines two transforms: an 'initial transform' with a 'current transform'.
This class combines any itk transform with the DeformationFieldTransform.
itk::AdvancedCombinationTransform< typename elx::TransformBase< TElastix >::CoordinateType, elx::TransformBase< TElastix >::FixedImageDimension > Superclass
Applies an averaging filter to an image.


Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo