Medical Imaging Interaction Toolkit  2016.11.0
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,
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 mitkDiffImageApplier_h_Included
18 #define mitkDiffImageApplier_h_Included
19 
20 #include "mitkCommon.h"
21 #include "mitkImage.h"
22 #include "mitkOperationActor.h"
24 
25 #include <itkImage.h>
26 #include <itkObjectFactory.h>
27 
28 namespace mitk
29 {
40  class MITKSEGMENTATION_EXPORT DiffImageApplier : public itk::Object, public OperationActor
41  {
42  public:
44  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
45 
46  virtual void ExecuteOperation(Operation *operation) override;
47 
48  static DiffImageApplier *GetInstanceForUndo();
49 
50  protected:
51  DiffImageApplier(); // purposely hidden
52  virtual ~DiffImageApplier();
53 
54  template <typename TPixel, unsigned int VImageDimension>
55  void ItkImageSwitch2DDiff(itk::Image<TPixel, VImageDimension> *image);
56 
57  template <typename TPixel, unsigned int VImageDimension>
58  void ItkImageSwitch3DDiff(itk::Image<TPixel, VImageDimension> *image);
59 
60  template <typename TPixel1, unsigned int VImageDimension1, typename TPixel2, unsigned int VImageDimension2>
61  void ItkImageProcessing2DDiff(itk::Image<TPixel1, VImageDimension1> *itkImage1,
62  itk::Image<TPixel2, VImageDimension2> *itkImage2);
63 
64  template <typename TPixel1, unsigned int VImageDimension1, typename TPixel2, unsigned int VImageDimension2>
65  void ItkImageProcessing3DDiff(itk::Image<TPixel1, VImageDimension1> *itkImage1,
66  itk::Image<TPixel2, VImageDimension2> *itkImage2);
67 
68  template <typename TPixel, unsigned int VImageDimension>
69  void ItkInvertPixelValues(itk::Image<TPixel, VImageDimension> *itkImage);
70 
73 
74  unsigned int m_SliceIndex;
75  unsigned int m_SliceDimension;
76  unsigned int m_TimeStep;
77  unsigned int m_Dimension0;
78  unsigned int m_Dimension1;
79 
80  double m_Factor;
81  };
82 
83 } // namespace
84 
85 #endif
Base class of all Operation-classes.
Definition: mitkOperation.h:33
#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:53
Image::Pointer m_SliceDifferenceImage