Medical Imaging Interaction Toolkit  2023.12.99-4c75e429
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
14 #define mitkDiffImageApplier_h
15 
16 #include "mitkCommon.h"
17 #include "mitkImage.h"
18 #include "mitkOperationActor.h"
20 #include <mitkLabelSetImage.h>
21 
22 #include <itkImage.h>
23 #include <itkObjectFactory.h>
24 
25 namespace mitk
26 {
37  class MITKSEGMENTATION_EXPORT DiffImageApplier : public itk::Object, public OperationActor
38  {
39  public:
41  itkFactorylessNewMacro(Self);
42  itkCloneMacro(Self);
43 
44  void ExecuteOperation(Operation *operation) override;
45 
46  void SetDestinationLabel(mitk::Label::PixelType);
47 
48  static DiffImageApplier *GetInstanceForUndo();
49 
50  protected:
51  DiffImageApplier(); // purposely hidden
52  ~DiffImageApplier() override;
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 
81 
82  double m_Factor;
83  };
84 
85 } // namespace
86 
87 #endif
mitk::OperationActor
abstract class, that can be used by Undo to undo an operation.
Definition: mitkOperationActor.h:41
mitkImage.h
mitk::DiffImageApplier::m_SliceDifferenceImage
Image::Pointer m_SliceDifferenceImage
Definition: mitkDiffImageApplier.h:72
mitk::DiffImageApplier::m_Dimension0
unsigned int m_Dimension0
Definition: mitkDiffImageApplier.h:77
mitk::DiffImageApplier::m_Factor
double m_Factor
Definition: mitkDiffImageApplier.h:82
mitk::Operation
Base class of all Operation-classes.
Definition: mitkOperation.h:29
mitkOperationActor.h
mitk::DiffImageApplier::m_TimeStep
unsigned int m_TimeStep
Definition: mitkDiffImageApplier.h:76
itk::SmartPointer< Self >
mitk::Label::PixelType
unsigned short PixelType
Definition: mitkLabel.h:34
mitk::DiffImageApplier::m_Image
Image::Pointer m_Image
Definition: mitkDiffImageApplier.h:71
mitk::DiffImageApplier
Applies difference images to 3D images.
Definition: mitkDiffImageApplier.h:37
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::DiffImageApplier::m_Dimension1
unsigned int m_Dimension1
Definition: mitkDiffImageApplier.h:78
mitk::DiffImageApplier::m_DestinationLabel
mitk::Label::PixelType m_DestinationLabel
Definition: mitkDiffImageApplier.h:80
mitk::DiffImageApplier::m_SliceIndex
unsigned int m_SliceIndex
Definition: mitkDiffImageApplier.h:74
mitkCommon.h
MITKSEGMENTATION_EXPORT
#define MITKSEGMENTATION_EXPORT
Definition: MitkSegmentationExports.h:15
MitkSegmentationExports.h
mitk::DiffImageApplier::m_SliceDimension
unsigned int m_SliceDimension
Definition: mitkDiffImageApplier.h:75
mitkLabelSetImage.h