Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
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_Included
14 #define mitkSliceBasedInterpolationController_h_Included
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 
67  {
68  public:
70  itkFactorylessNewMacro(Self);
71  itkCloneMacro(Self);
72 
80  static SliceBasedInterpolationController *InterpolatorForImage(const Image *);
81 
91  void SetWorkingImage(LabelSetImage *image);
92 
100  void SetReferenceImage(Image *image);
101 
114  void SetChangedSlice(const Image *image,
115  unsigned int sliceDimension,
116  unsigned int sliceIndex,
117  unsigned int timeStep);
118 
127  // void SetChangedImage( const Image* image, unsigned int timeStep );
128 
138  Image::Pointer Interpolate(unsigned int sliceDimension,
139  unsigned int sliceIndex,
140  const mitk::PlaneGeometry *currentPlane,
141  unsigned int timeStep);
142 
146  void ResetLabelCount();
147 
148  protected:
153  {
154  public:
155  SetChangedSliceOptions(unsigned int sd, unsigned int si, unsigned int d0, unsigned int d1, unsigned int t)
156  : sliceDimension(sd), sliceIndex(si), dim0(d0), dim1(d1), timeStep(t)
157  {
158  }
159 
160  unsigned int sliceDimension;
161  unsigned int sliceIndex;
162  unsigned int dim0;
163  unsigned int dim1;
164  unsigned int timeStep;
165  // void* pixelData;
166  };
167 
168  typedef std::vector<unsigned int> LabelCounterVectorType;
169  typedef std::vector<LabelCounterVectorType> LabelCounterSliceVectorType;
170  typedef std::vector<std::vector<LabelCounterSliceVectorType>> LabelCounterSliceTimeVectorType;
171  typedef std::map<const Image *, SliceBasedInterpolationController *> InterpolatorMapType;
172 
173  SliceBasedInterpolationController(); // purposely hidden
175 
177  template <typename PixelType>
178  void ScanSliceITKProcessing(const itk::Image<PixelType, 2> *, const SetChangedSliceOptions &options);
179 
181  template <typename TPixel, unsigned int VImageDimension>
182  void ScanImageITKProcessing(itk::Image<TPixel, VImageDimension> *, unsigned int timeStep);
183 
191  LabelCounterSliceTimeVectorType m_LabelCountInSlice;
192 
193  static InterpolatorMapType s_InterpolatorForImage;
194 
197  };
198 } // namespace
199 
200 #endif
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
std::map< const Image *, SliceBasedInterpolationController * > InterpolatorMapType
class ITK_EXPORT Image
SetChangedSliceOptions(unsigned int sd, unsigned int si, unsigned int d0, unsigned int d1, unsigned int t)
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
Image class for storing images.
Definition: mitkImage.h:72
std::vector< LabelCounterVectorType > LabelCounterSliceVectorType
mitk::Image::Pointer image
std::vector< std::vector< LabelCounterSliceVectorType > > LabelCounterSliceTimeVectorType
LabelSetImage class for handling labels and layers in a segmentation session.
Describes a two-dimensional, rectangular plane.
Protected class of mitk::SliceBasedInterpolationController. Don&#39;t use (you shouldn&#39;t be able to do so...