Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitkImageMappingHelper.cpp File Reference
#include <itkInterpolateImageFunction.h>
#include <itkNearestNeighborInterpolateImageFunction.h>
#include <itkLinearInterpolateImageFunction.h>
#include <itkBSplineInterpolateImageFunction.h>
#include <itkWindowedSincInterpolateImageFunction.h>
#include <mitkImageAccessByItk.h>
#include <mitkImageCast.h>
#include <mitkGeometry3D.h>
#include <mitkImageToItk.h>
#include <mitkImageTimeSelector.h>
#include "mapRegistration.h"
#include "mitkImageMappingHelper.h"
#include "mitkRegistrationHelper.h"

Go to the source code of this file.

Functions

template<typename TImage >
typename ::itk::InterpolateImageFunction< TImage >::Pointer generateInterpolator (mitk::ImageMappingInterpolator::Type interpolatorType)
 
template<typename TPixelType , unsigned int VImageDimension>
void doMITKMap (const ::itk::Image< TPixelType, VImageDimension > *input, mitk::ImageMappingHelper::ResultImageType::Pointer &result, const mitk::ImageMappingHelper::RegistrationType *&registration, bool throwOnOutOfInputAreaError, const double &paddingValue, const mitk::ImageMappingHelper::ResultImageGeometryType *&resultGeometry, bool throwOnMappingError, const double &errorValue, mitk::ImageMappingInterpolator::Type interpolatorType)
 

Function Documentation

◆ doMITKMap()

template<typename TPixelType , unsigned int VImageDimension>
void doMITKMap ( const ::itk::Image< TPixelType, VImageDimension > *  input,
mitk::ImageMappingHelper::ResultImageType::Pointer result,
const mitk::ImageMappingHelper::RegistrationType *&  registration,
bool  throwOnOutOfInputAreaError,
const double &  paddingValue,
const mitk::ImageMappingHelper::ResultImageGeometryType *&  resultGeometry,
bool  throwOnMappingError,
const double &  errorValue,
mitk::ImageMappingInterpolator::Type  interpolatorType 
)
Warning
2D MITK images could have a 3D rotation, since they have a 3x3 geometry matrix. If it is only a rotation around the transversal plane normal, it can be express with a 2x2 matrix. In this case, the ITK image conservs this information and is identical to the MITK image! If the MITK image contains any other rotation, the ITK image will have no rotation at all. Spacing is of course conserved in both cases.

Implement extraction of 2D-Rotation-Matrix out of 3D-Rotation-Matrix to cover this case as well. matrix = extract2DRotationMatrix(resultGeometry)

Definition at line 72 of file mitkImageMappingHelper.cpp.

References mitk::BaseGeometry::GetBounds(), mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::BaseGeometry::GetOrigin(), and mitk::BaseGeometry::GetSpacing().

Referenced by mitk::ImageMappingHelper::map().

◆ generateInterpolator()

template<typename TImage >
typename ::itk::InterpolateImageFunction< TImage >::Pointer generateInterpolator ( mitk::ImageMappingInterpolator::Type  interpolatorType)