Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
vtkMitkLevelWindowFilter.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 __vtkMitkLevelWindowFilter_h
14 #define __vtkMitkLevelWindowFilter_h
15 
16 class vtkScalarsToColors;
17 class vtkPiecewiseFunction;
18 #include <vtkImageData.h>
19 #include <vtkThreadedImageAlgorithm.h>
20 
21 #include <MitkCoreExports.h>
33 class MITKCORE_EXPORT vtkMitkLevelWindowFilter : public vtkThreadedImageAlgorithm
34 {
35 public:
36  vtkTypeMacro(vtkMitkLevelWindowFilter, vtkThreadedImageAlgorithm);
37 
38  static vtkMitkLevelWindowFilter *New();
39 
40  vtkMTimeType GetMTime() override;
42  vtkScalarsToColors *GetLookupTable();
44  void SetLookupTable(vtkScalarsToColors *lookupTable);
45 
48  vtkPiecewiseFunction *GetOpacityPiecewiseFunction() { return m_OpacityFunction; }
51  void SetOpacityPiecewiseFunction(vtkPiecewiseFunction *opacityFunction);
52 
54  void SetMinOpacity(double minOpacity);
55  inline double GetMinOpacity() const;
56 
58  void SetMaxOpacity(double maxOpacity);
59  inline double GetMaxOpacity() const;
60 
62  void SetClippingBounds(double *);
63 
64 protected:
68  ~vtkMitkLevelWindowFilter() override;
76  void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int extent[6], int id) override;
77 
78  // /** Standard VTK filter method to apply the filter. See VTK documentation.*/
79  int RequestInformation(vtkInformation *request,
80  vtkInformationVector **inputVector,
81  vtkInformationVector *outputVector) override;
82  // /** Standard VTK filter method to apply the filter. See VTK documentation. Not used at the moment.*/
83  // void ExecuteInformation(vtkImageData *vtkNotUsed(inData), vtkImageData *vtkNotUsed(outData));
84 
85 private:
87  vtkScalarsToColors *m_LookupTable;
89  vtkPiecewiseFunction *m_OpacityFunction;
91  double m_MinOpacity;
93  double m_MaxOpacity;
94 
95  double m_ClippingBounds[4];
96 };
97 #endif
vtkMitkLevelWindowFilter::GetOpacityPiecewiseFunction
vtkPiecewiseFunction * GetOpacityPiecewiseFunction()
Get the piecewise function used to map scalar to alpha component value (only used when the lookupTabl...
Definition: vtkMitkLevelWindowFilter.h:48
MitkCoreExports.h
vtkMitkLevelWindowFilter
Applies the grayvalue or color/opacity level window to scalar or RGB(A) images.
Definition: vtkMitkLevelWindowFilter.h:33
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15