Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkOverwriteSliceImageFilter.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 mitkOverwriteSliceImageFilter_h_Included
18 #define mitkOverwriteSliceImageFilter_h_Included
19 
20 #include "mitkCommon.h"
21 #include "mitkImageToImageFilter.h"
23 
24 #include <itkImage.h>
25 
26 namespace mitk
27 {
63  {
64  public:
66  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
67 
68 
71  itkSetMacro(SliceIndex, unsigned int);
72  itkGetConstMacro(SliceIndex, unsigned int);
73 
80  itkSetMacro(SliceDimension, unsigned int);
81  itkGetConstMacro(SliceDimension, unsigned int);
82 
86  itkSetMacro(TimeStep, unsigned int);
87  itkGetConstMacro(TimeStep, unsigned int);
88 
92  itkSetMacro(CreateUndoInformation, bool);
93  itkGetConstMacro(CreateUndoInformation, bool);
94 
95  itkSetObjectMacro(SliceImage, Image);
96  const Image *GetSliceImage() { return m_SliceImage.GetPointer(); }
97  const Image *GetLastDifferenceImage() { return m_SliceDifferenceImage.GetPointer(); }
98  protected:
99  OverwriteSliceImageFilter(); // purposely hidden
100  virtual ~OverwriteSliceImageFilter();
101 
102  virtual void GenerateData() override;
103 
104  template <typename TPixel, unsigned int VImageDimension>
105  void ItkImageSwitch(itk::Image<TPixel, VImageDimension> *image);
106 
107  template <typename TPixel1, unsigned int VImageDimension1, typename TPixel2, unsigned int VImageDimension2>
108  void ItkImageProcessing(const itk::Image<TPixel1, VImageDimension1> *itkImage1,
109  itk::Image<TPixel2, VImageDimension2> *itkImage2);
110 
111  std::string EventDescription(unsigned int sliceDimension, unsigned int sliceIndex, unsigned int timeStep);
112 
115 
116  unsigned int m_SliceIndex;
117  unsigned int m_SliceDimension;
118  unsigned int m_TimeStep;
119  unsigned int m_Dimension0;
120  unsigned int m_Dimension1;
121 
123  };
124 
125 } // namespace
126 
127 #endif
Superclass of all classes generating some kind of mitk::BaseData.
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Image class for storing images.
Definition: mitkImage.h:76
Superclass of all classes having one or more Images as input and generating Images as output...
Writes a 2D slice into a 3D image.