Medical Imaging Interaction Toolkit  2018.4.99-936b789b
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);
41  itkCloneMacro(Self);
42 
43  void ExecuteOperation(Operation *operation) override;
44 
45  static DiffImageApplier *GetInstanceForUndo();
46 
47  protected:
48  DiffImageApplier(); // purposely hidden
49  ~DiffImageApplier() override;
50 
51  template <typename TPixel, unsigned int VImageDimension>
52  void ItkImageSwitch2DDiff(itk::Image<TPixel, VImageDimension> *image);
53 
54  template <typename TPixel, unsigned int VImageDimension>
55  void ItkImageSwitch3DDiff(itk::Image<TPixel, VImageDimension> *image);
56 
57  template <typename TPixel1, unsigned int VImageDimension1, typename TPixel2, unsigned int VImageDimension2>
58  void ItkImageProcessing2DDiff(itk::Image<TPixel1, VImageDimension1> *itkImage1,
59  itk::Image<TPixel2, VImageDimension2> *itkImage2);
60 
61  template <typename TPixel1, unsigned int VImageDimension1, typename TPixel2, unsigned int VImageDimension2>
62  void ItkImageProcessing3DDiff(itk::Image<TPixel1, VImageDimension1> *itkImage1,
63  itk::Image<TPixel2, VImageDimension2> *itkImage2);
64 
65  template <typename TPixel, unsigned int VImageDimension>
66  void ItkInvertPixelValues(itk::Image<TPixel, VImageDimension> *itkImage);
67 
70 
71  unsigned int m_SliceIndex;
72  unsigned int m_SliceDimension;
73  unsigned int m_TimeStep;
74  unsigned int m_Dimension0;
75  unsigned int m_Dimension1;
76 
77  double m_Factor;
78  };
79 
80 } // namespace
81 
82 #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