Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitkShapeBasedInterpolationAlgorithm.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 #ifndef mitkShapeBasedInterpolationAlgorithm_h
14 #define mitkShapeBasedInterpolationAlgorithm_h
15 
18 
19 #include <map>
20 #include <mutex>
21 
22 namespace mitk
23 {
37  {
38  public:
40  itkFactorylessNewMacro(Self);
41  itkCloneMacro(Self);
42 
43  Image::Pointer Interpolate(Image::ConstPointer lowerSlice,
44  unsigned int lowerSliceIndex,
45  Image::ConstPointer upperSlice,
46  unsigned int upperSliceIndex,
47  unsigned int requestedIndex,
48  unsigned int sliceDimension,
49  Image::Pointer resultImage,
50  unsigned int timeStep,
51  Image::ConstPointer referenceImage) override;
52 
53  private:
54  typedef itk::Image<mitk::ScalarType, 2> DistanceFilterImageType;
55 
56  template <typename TPixel, unsigned int VImageDimension>
57  void ComputeDistanceMap(const itk::Image<TPixel, VImageDimension> *, mitk::Image::Pointer &result);
58 
59  Image::Pointer ComputeDistanceMap(unsigned int sliceIndex, Image::ConstPointer slice);
60 
61  template <typename TPixel, unsigned int VImageDimension>
62  void InterpolateIntermediateSlice(itk::Image<TPixel, VImageDimension> *result,
63  const mitk::Image::Pointer &lowerDistanceImage,
64  const mitk::Image::Pointer &upperDistanceImage,
65  float ratio);
66 
67  std::map<unsigned int, Image::Pointer> m_DistanceImageCache;
68  std::mutex m_DistanceImageCacheMutex;
69  };
70 
71 } // namespace
72 
73 #endif
mitk::ShapeBasedInterpolationAlgorithm
Shape-based binary image interpolation.
Definition: mitkShapeBasedInterpolationAlgorithm.h:36
itk::SmartPointer< Self >
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
MITKSEGMENTATION_EXPORT
#define MITKSEGMENTATION_EXPORT
Definition: MitkSegmentationExports.h:15
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
MitkSegmentationExports.h
mitk::SegmentationInterpolationAlgorithm
Interface class for interpolation algorithms.
Definition: mitkSegmentationInterpolationAlgorithm.h:47
mitkSegmentationInterpolationAlgorithm.h