Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkSliceBasedInterpolationController_h_Included
18 #define mitkSliceBasedInterpolationController_h_Included
19 
20 #include "mitkLabelSetImage.h"
22 
23 #include <itkImage.h>
24 #include <itkObjectFactory.h>
25 
26 #include <map>
27 #include <vector>
28 
29 namespace mitk
30 {
31  class Image;
32 
74  {
75  public:
76  mitkClassMacroItkParent(SliceBasedInterpolationController, itk::Object) itkFactorylessNewMacro(Self)
77  itkCloneMacro(Self)
78 
79 
86  static SliceBasedInterpolationController *InterpolatorForImage(const Image *);
87 
97  void SetWorkingImage(LabelSetImage *image);
98 
106  void SetReferenceImage(Image *image);
107 
120  void SetChangedSlice(const Image *image,
121  unsigned int sliceDimension,
122  unsigned int sliceIndex,
123  unsigned int timeStep);
124 
133  // void SetChangedImage( const Image* image, unsigned int timeStep );
134 
144  Image::Pointer Interpolate(unsigned int sliceDimension,
145  unsigned int sliceIndex,
146  const mitk::PlaneGeometry *currentPlane,
147  unsigned int timeStep);
148 
152  void ResetLabelCount();
153 
154  protected:
159  {
160  public:
161  SetChangedSliceOptions(unsigned int sd, unsigned int si, unsigned int d0, unsigned int d1, unsigned int t)
162  : sliceDimension(sd), sliceIndex(si), dim0(d0), dim1(d1), timeStep(t)
163  {
164  }
165 
166  unsigned int sliceDimension;
167  unsigned int sliceIndex;
168  unsigned int dim0;
169  unsigned int dim1;
170  unsigned int timeStep;
171  // void* pixelData;
172  };
173 
174  typedef std::vector<unsigned int> LabelCounterVectorType;
175  typedef std::vector<LabelCounterVectorType> LabelCounterSliceVectorType;
176  typedef std::vector<std::vector<LabelCounterSliceVectorType>> LabelCounterSliceTimeVectorType;
177  typedef std::map<const Image *, SliceBasedInterpolationController *> InterpolatorMapType;
178 
179  SliceBasedInterpolationController(); // purposely hidden
181 
183  template <typename PixelType>
184  void ScanSliceITKProcessing(const itk::Image<PixelType, 2> *, const SetChangedSliceOptions &options);
185 
187  template <typename TPixel, unsigned int VImageDimension>
188  void ScanImageITKProcessing(itk::Image<TPixel, VImageDimension> *, unsigned int timeStep);
189 
197  LabelCounterSliceTimeVectorType m_LabelCountInSlice;
198 
199  static InterpolatorMapType s_InterpolatorForImage;
200 
203  };
204 } // namespace
205 
206 #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:53
Image class for storing images.
Definition: mitkImage.h:76
std::vector< LabelCounterVectorType > LabelCounterSliceVectorType
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't use (you shouldn't be able to do so...