Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkArithmeticOperation.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 mitkArithmeticOperation_h
14 #define mitkArithmeticOperation_h
15 
16 #include <mitkImage.h>
18 
19 namespace mitk
20 {
27  public:
28  static Image::Pointer Add(Image::Pointer & imageA, Image::Pointer & imageB, bool outputAsDouble = true);
29  static Image::Pointer Subtract(Image::Pointer & imageA, Image::Pointer & imageB, bool outputAsDouble = true);
30  static Image::Pointer Multiply(Image::Pointer & imageA, Image::Pointer & imageB, bool outputAsDouble = true);
31  static Image::Pointer Divide(Image::Pointer & imageA, Image::Pointer & imageB, bool outputAsDouble = true);
32 
33  static Image::Pointer Add(Image::Pointer & imageA, double value, bool outputAsDouble = true);
34  static Image::Pointer Subtract(Image::Pointer & imageA, double value, bool outputAsDouble = true);
35  static Image::Pointer Multiply(Image::Pointer & imageA, double value, bool outputAsDouble = true);
36  static Image::Pointer Divide(Image::Pointer & imageA, double value, bool outputAsDouble = true);
37 
38  static Image::Pointer Add(double value, Image::Pointer & imageB, bool outputAsDouble = true);
39  static Image::Pointer Subtract(double value, Image::Pointer & imageB, bool outputAsDouble = true);
40  static Image::Pointer Multiply(double value, Image::Pointer & imageB, bool outputAsDouble = true);
41  static Image::Pointer Divide(double value, Image::Pointer & imageB, bool outputAsDouble = true);
42 
43  static Image::Pointer Tan(Image::Pointer & imageA, bool outputAsDouble = true);
44  static Image::Pointer Atan(Image::Pointer & imageA, bool outputAsDouble = true);
45  static Image::Pointer Cos(Image::Pointer & imageA, bool outputAsDouble = true);
46  static Image::Pointer Acos(Image::Pointer & imageA, bool outputAsDouble = true);
47  static Image::Pointer Sin(Image::Pointer & imageA, bool outputAsDouble = true);
48  static Image::Pointer Asin(Image::Pointer & imageA, bool outputAsDouble = true);
49  static Image::Pointer Square(Image::Pointer & imageA, bool outputAsDouble = true);
50  static Image::Pointer Sqrt(Image::Pointer & imageA, bool outputAsDouble = true);
51  static Image::Pointer Abs(Image::Pointer & imageA, bool outputAsDouble = true);
52  static Image::Pointer Exp(Image::Pointer & imageA, bool outputAsDouble = true);
53  static Image::Pointer ExpNeg(Image::Pointer & imageA, bool outputAsDouble = true);
54  static Image::Pointer Log10(Image::Pointer & imageA, bool outputAsDouble = true);
55  };
56 
58  public:
60  {
64  Div,
70  Tan,
72  Cos,
74  Sin,
78  Abs,
79  Exp,
81  Log10
82  };
83 
84 
85  void CallExecuteTwoImageFilter(mitk::Image::Pointer imageA, mitk::Image::Pointer imageB);
86 
87  template <typename TPixel1, unsigned int VImageDimension1, typename TPixel2, unsigned int VImageDimension2>
88  void ExecuteTwoImageFilter(itk::Image<TPixel1, VImageDimension1>* imageA, itk::Image<TPixel2, VImageDimension2>* imageB);
89 
90  template<typename DefaultFunctorType, typename DoubleFunctorType, typename Image1Type, typename Image2Type, typename DoubleImageType>
91  void ExecuteTwoImageFilterWithFunctor(Image1Type* imageA, Image2Type* imageB);
92 
95  bool m_GenerateDoubleOutput = false;
96  };
97 
98 
99 }
100 #endif
mitk::NonStaticArithmeticOperation
Definition: mitkArithmeticOperation.h:57
mitkImage.h
mitk::NonStaticArithmeticOperation::OperationsEnum
OperationsEnum
Definition: mitkArithmeticOperation.h:59
mitk::NonStaticArithmeticOperation::m_ResultImage
mitk::Image::Pointer m_ResultImage
Definition: mitkArithmeticOperation.h:93
mitk::NonStaticArithmeticOperation::Cos
@ Cos
Definition: mitkArithmeticOperation.h:72
mitk::NonStaticArithmeticOperation::m_Algorithm
OperationsEnum m_Algorithm
Definition: mitkArithmeticOperation.h:94
mitk::NonStaticArithmeticOperation::MultValue
@ MultValue
Definition: mitkArithmeticOperation.h:67
MITKBASICIMAGEPROCESSING_EXPORT
#define MITKBASICIMAGEPROCESSING_EXPORT
Definition: MitkBasicImageProcessingExports.h:15
mitk::NonStaticArithmeticOperation::ATan
@ ATan
Definition: mitkArithmeticOperation.h:71
itk::SmartPointer< Self >
mitk::NonStaticArithmeticOperation::Sqrt
@ Sqrt
Definition: mitkArithmeticOperation.h:77
mitk::NonStaticArithmeticOperation::Sub2
@ Sub2
Definition: mitkArithmeticOperation.h:62
mitk::NonStaticArithmeticOperation::AddValue
@ AddValue
Definition: mitkArithmeticOperation.h:65
mitk::NonStaticArithmeticOperation::PowValue
@ PowValue
Definition: mitkArithmeticOperation.h:69
mitk::NonStaticArithmeticOperation::Square
@ Square
Definition: mitkArithmeticOperation.h:76
mitk::NonStaticArithmeticOperation::DivValue
@ DivValue
Definition: mitkArithmeticOperation.h:68
mitk::NonStaticArithmeticOperation::ExpNeg
@ ExpNeg
Definition: mitkArithmeticOperation.h:80
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::NonStaticArithmeticOperation::Sin
@ Sin
Definition: mitkArithmeticOperation.h:74
mitk::NonStaticArithmeticOperation::Abs
@ Abs
Definition: mitkArithmeticOperation.h:78
MitkBasicImageProcessingExports.h
mitk::NonStaticArithmeticOperation::SubValue
@ SubValue
Definition: mitkArithmeticOperation.h:66
mitk::NonStaticArithmeticOperation::ACos
@ ACos
Definition: mitkArithmeticOperation.h:73
mitk::NonStaticArithmeticOperation::Mult
@ Mult
Definition: mitkArithmeticOperation.h:63
mitk::ArithmeticOperation
Executes a arithmetic operations on one or two images.
Definition: mitkArithmeticOperation.h:26
mitk::NonStaticArithmeticOperation::ASin
@ ASin
Definition: mitkArithmeticOperation.h:75
mitk::NonStaticArithmeticOperation::Div
@ Div
Definition: mitkArithmeticOperation.h:64
mitk::NonStaticArithmeticOperation::Exp
@ Exp
Definition: mitkArithmeticOperation.h:79
mitk::NonStaticArithmeticOperation::Add2
@ Add2
Definition: mitkArithmeticOperation.h:61
mitk::NonStaticArithmeticOperation::Tan
@ Tan
Definition: mitkArithmeticOperation.h:70