Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkImageMappingHelper.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef mitkImageMappingHelper_h
15 #define mitkImageMappingHelper_h
16 
17 #include <mapImageMappingTask.h>
18 #include <mapRegistrationBase.h>
19 #include <mitkImage.h>
20 #include <mitkGeometry3D.h>
21 
23 
25 
26 namespace mitk
27 {
34  {
35  enum Type
36  {
39  Linear = 2,
40  BSpline_3 = 3,
42  WSinc_Welch = 5
43  };
44  };
45 
51  namespace ImageMappingHelper
52  {
54  typedef ::map::core::RegistrationBase RegistrationType;
56  typedef ::mitk::MAPRegistrationWrapper MITKRegistrationType;
57 
59  typedef ::mitk::BaseGeometry ResultImageGeometryType;
64 
74 
75 
95  MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer map(const InputImageType* input, const RegistrationType* registration,
96  bool throwOnOutOfInputAreaError = false, const double& paddingValue = 0,
97  const ResultImageGeometryType* resultGeometry = nullptr,
98  bool throwOnMappingError = true, const double& errorValue = 0, mitk::ImageMappingInterpolator::Type interpolatorType = mitk::ImageMappingInterpolator::Linear);
99 
117  MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer map(const InputImageType* input, const MITKRegistrationType* registration,
118  bool throwOnOutOfInputAreaError = false, const double& paddingValue = 0,
119  const ResultImageGeometryType* resultGeometry = nullptr,
120  bool throwOnMappingError = true, const double& errorValue = 0, mitk::ImageMappingInterpolator::Type interpolatorType = mitk::ImageMappingInterpolator::Linear);
121 
131  MITKMATCHPOINTREGISTRATION_EXPORT ResultImageGeometryType::Pointer GenerateSuperSampledGeometry(const ResultImageGeometryType* inputGeometry,
132  double xScaling, double yScaling, double zScaling);
133 
150  MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer refineGeometry(const InputImageType* input, const RegistrationType* registration, bool throwOnError = true);
152  MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer refineGeometry(const InputImageType* input, const MITKRegistrationType* registration, bool throwOnError = true);
153 
163 
164  }
165 
166 }
167 
168 #endif
#define MITKMATCHPOINTREGISTRATION_EXPORT
Base class of all data objects.
Definition: mitkBaseData.h:60
Abstract base class describing the geometry of a data object.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
Wrapper class that adapts MatchPoint registration objects to the MITK data model.
class ITK_EXPORT Image
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer refineGeometry(const InputImageType *input, const RegistrationType *registration, bool throwOnError=true)
Refines the geometry of an image by applying an affine registration to its Geometry3D.
::mitk::BaseGeometry ResultImageGeometryType
Geometry type used for the result image grid specification.
::mitk::MAPRegistrationWrapper MITKRegistrationType
MITK wrapper type for MatchPoint registrations.
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageGeometryType::Pointer GenerateSuperSampledGeometry(const ResultImageGeometryType *inputGeometry, double xScaling, double yScaling, double zScaling)
Generates a super-sampled geometry by scaling the spacing of an existing geometry.
::mitk::Image InputImageType
Input image type for mapping operations.
::map::core::RegistrationBase RegistrationType
MatchPoint registration base type.
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer map(const InputImageType *input, const RegistrationType *registration, bool throwOnOutOfInputAreaError=false, const double &paddingValue=0, const ResultImageGeometryType *resultGeometry=nullptr, bool throwOnMappingError=true, const double &errorValue=0, mitk::ImageMappingInterpolator::Type interpolatorType=mitk::ImageMappingInterpolator::Linear)
Maps (resamples) an input image using a MatchPoint registration.
::mitk::Image ResultImageType
Result image type returned by mapping operations.
MITKMATCHPOINTREGISTRATION_EXPORT TimeGeometry::Pointer CreateResultTimeGeometry(const mitk::BaseData *input, const mitk::ImageMappingHelper::ResultImageGeometryType *resultGeometry)
Creates a TimeGeometry for the mapping result based on the input data and optional result geometry.
MITKMATCHPOINTREGISTRATION_EXPORT bool canRefineGeometry(const RegistrationType *registration)
Checks whether a registration can be used for geometry refinement.
Find image slices visible on a given plane.
Enumeration of interpolation strategies for image mapping operations.
@ NearestNeighbor
Nearest neighbor interpolation.
@ UserDefined
User may specify a custom interpolator.
@ WSinc_Hamming
Windowed sinc interpolation with Hamming window.
@ BSpline_3
3rd order B-spline interpolation.
@ WSinc_Welch
Windowed sinc interpolation with Welch window.