Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkDiffImageApplier.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 mitkDiffImageApplier_h_Included
14 #define mitkDiffImageApplier_h_Included
15 
16 #include "mitkCommon.h"
17 #include "mitkImage.h"
18 #include "mitkOperationActor.h"
20 
21 #include <itkImage.h>
22 #include <itkObjectFactory.h>
23 
24 namespace mitk
25 {
36  class MITKSEGMENTATION_EXPORT DiffImageApplier : public itk::Object, public OperationActor
37  {
38  public:
40  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
41 
42  void ExecuteOperation(Operation *operation) override;
43 
44  static DiffImageApplier *GetInstanceForUndo();
45 
46  protected:
47  DiffImageApplier(); // purposely hidden
48  ~DiffImageApplier() override;
49 
50  template <typename TPixel, unsigned int VImageDimension>
51  void ItkImageSwitch2DDiff(itk::Image<TPixel, VImageDimension> *image);
52 
53  template <typename TPixel, unsigned int VImageDimension>
54  void ItkImageSwitch3DDiff(itk::Image<TPixel, VImageDimension> *image);
55 
56  template <typename TPixel1, unsigned int VImageDimension1, typename TPixel2, unsigned int VImageDimension2>
57  void ItkImageProcessing2DDiff(itk::Image<TPixel1, VImageDimension1> *itkImage1,
58  itk::Image<TPixel2, VImageDimension2> *itkImage2);
59 
60  template <typename TPixel1, unsigned int VImageDimension1, typename TPixel2, unsigned int VImageDimension2>
61  void ItkImageProcessing3DDiff(itk::Image<TPixel1, VImageDimension1> *itkImage1,
62  itk::Image<TPixel2, VImageDimension2> *itkImage2);
63 
64  template <typename TPixel, unsigned int VImageDimension>
65  void ItkInvertPixelValues(itk::Image<TPixel, VImageDimension> *itkImage);
66 
69 
70  unsigned int m_SliceIndex;
71  unsigned int m_SliceDimension;
72  unsigned int m_TimeStep;
73  unsigned int m_Dimension0;
74  unsigned int m_Dimension1;
75 
76  double m_Factor;
77  };
78 
79 } // namespace
80 
81 #endif
Base class of all Operation-classes.
Definition: mitkOperation.h:29
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
Applies difference images to 3D images.
abstract class, that can be used by Undo to undo an operation.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
mitk::Image::Pointer image
Image::Pointer m_SliceDifferenceImage