Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkSliceBasedInterpolationController.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 mitkSliceBasedInterpolationController_h
14 #define mitkSliceBasedInterpolationController_h
15 
16 #include "mitkLabelSetImage.h"
18 
19 #include <itkImage.h>
20 #include <itkObjectFactory.h>
21 
22 #include <map>
23 #include <vector>
24 
25 namespace mitk
26 {
27  class Image;
28 
65  {
66  public:
68  itkFactorylessNewMacro(Self);
69  itkCloneMacro(Self);
70 
78  static SliceBasedInterpolationController *InterpolatorForImage(const Image *);
79 
89  void SetWorkingImage(LabelSetImage *image);
90 
98  void SetReferenceImage(Image *image);
99 
112  void SetChangedSlice(const Image *image,
113  unsigned int sliceDimension,
114  unsigned int sliceIndex,
115  unsigned int timeStep);
116 
128  Image::Pointer Interpolate(unsigned int sliceDimension,
129  unsigned int sliceIndex,
130  const mitk::PlaneGeometry *currentPlane,
131  unsigned int timeStep);
132 
136  void ResetLabelCount();
137 
138  protected:
143  {
144  public:
145  SetChangedSliceOptions(unsigned int sd, unsigned int si, unsigned int d0, unsigned int d1, unsigned int t)
146  : sliceDimension(sd), sliceIndex(si), dim0(d0), dim1(d1), timeStep(t)
147  {
148  }
149 
150  unsigned int sliceDimension;
151  unsigned int sliceIndex;
152  unsigned int dim0;
153  unsigned int dim1;
154  unsigned int timeStep;
155  // void* pixelData;
156  };
157 
158  typedef std::vector<unsigned int> LabelCounterVectorType;
159  typedef std::vector<LabelCounterVectorType> LabelCounterSliceVectorType;
160  typedef std::vector<std::vector<LabelCounterSliceVectorType>> LabelCounterSliceTimeVectorType;
161  typedef std::map<const Image *, SliceBasedInterpolationController *> InterpolatorMapType;
162 
163  SliceBasedInterpolationController(); // purposely hidden
165 
167  template <typename PixelType>
168  void ScanSliceITKProcessing(const itk::Image<PixelType, 2> *, const SetChangedSliceOptions &options);
169 
171  template <typename TPixel, unsigned int VImageDimension>
172  void ScanImageITKProcessing(itk::Image<TPixel, VImageDimension> *, unsigned int timeStep);
173 
182 
184 
187  };
188 } // namespace
189 
190 #endif
mitk::SliceBasedInterpolationController::SetChangedSliceOptions::timeStep
unsigned int timeStep
Definition: mitkSliceBasedInterpolationController.h:154
mitk::SliceBasedInterpolationController::LabelCounterVectorType
std::vector< unsigned int > LabelCounterVectorType
Definition: mitkSliceBasedInterpolationController.h:158
mitk::SliceBasedInterpolationController::LabelCounterSliceTimeVectorType
std::vector< std::vector< LabelCounterSliceVectorType > > LabelCounterSliceTimeVectorType
Definition: mitkSliceBasedInterpolationController.h:160
mitk::SliceBasedInterpolationController::InterpolatorMapType
std::map< const Image *, SliceBasedInterpolationController * > InterpolatorMapType
Definition: mitkSliceBasedInterpolationController.h:161
mitk::SliceBasedInterpolationController::SetChangedSliceOptions
Protected class of mitk::SliceBasedInterpolationController. Don't use (you shouldn't be able to do so...
Definition: mitkSliceBasedInterpolationController.h:142
mitk::PlaneGeometry
Describes a two-dimensional, rectangular plane.
Definition: mitkPlaneGeometry.h:78
mitk::SliceBasedInterpolationController::SetChangedSliceOptions::dim0
unsigned int dim0
Definition: mitkSliceBasedInterpolationController.h:152
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< Self >
mitk::SliceBasedInterpolationController::SetChangedSliceOptions::sliceIndex
unsigned int sliceIndex
Definition: mitkSliceBasedInterpolationController.h:151
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::SliceBasedInterpolationController
Generates interpolations of 2D slices.
Definition: mitkSliceBasedInterpolationController.h:64
mitk::SliceBasedInterpolationController::m_WorkingImage
LabelSetImage::Pointer m_WorkingImage
Definition: mitkSliceBasedInterpolationController.h:185
MITKSEGMENTATION_EXPORT
#define MITKSEGMENTATION_EXPORT
Definition: MitkSegmentationExports.h:15
mitk::SliceBasedInterpolationController::SetChangedSliceOptions::sliceDimension
unsigned int sliceDimension
Definition: mitkSliceBasedInterpolationController.h:150
mitk::SliceBasedInterpolationController::m_LabelCountInSlice
LabelCounterSliceTimeVectorType m_LabelCountInSlice
Definition: mitkSliceBasedInterpolationController.h:181
itk::Image
class ITK_EXPORT Image
Definition: mitkGeometryClipImageFilter.h:25
MitkSegmentationExports.h
mitk::SliceBasedInterpolationController::m_ReferenceImage
Image::Pointer m_ReferenceImage
Definition: mitkSliceBasedInterpolationController.h:186
mitk::SliceBasedInterpolationController::LabelCounterSliceVectorType
std::vector< LabelCounterVectorType > LabelCounterSliceVectorType
Definition: mitkSliceBasedInterpolationController.h:159
mitk::SliceBasedInterpolationController::SetChangedSliceOptions::SetChangedSliceOptions
SetChangedSliceOptions(unsigned int sd, unsigned int si, unsigned int d0, unsigned int d1, unsigned int t)
Definition: mitkSliceBasedInterpolationController.h:145
mitk::SliceBasedInterpolationController::s_InterpolatorForImage
static InterpolatorMapType s_InterpolatorForImage
Definition: mitkSliceBasedInterpolationController.h:183
mitk::SliceBasedInterpolationController::SetChangedSliceOptions::dim1
unsigned int dim1
Definition: mitkSliceBasedInterpolationController.h:153
mitk::LabelSetImage
LabelSetImage class for handling labels and layers in a segmentation session.
Definition: mitkLabelSetImage.h:29
mitkLabelSetImage.h