Medical Imaging Interaction Toolkit  2016.11.0
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,
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 __vtkMitkLevelWindowFilter_h
18 #define __vtkMitkLevelWindowFilter_h
19 
20 class vtkScalarsToColors;
21 class vtkPiecewiseFunction;
22 #include <vtkImageData.h>
23 #include <vtkThreadedImageAlgorithm.h>
24 
25 #include <MitkCoreExports.h>
38 class MITKCORE_EXPORT vtkMitkLevelWindowFilter : public vtkThreadedImageAlgorithm
39 {
40 public:
41  vtkTypeMacro(vtkMitkLevelWindowFilter, vtkThreadedImageAlgorithm);
42 
43  static vtkMitkLevelWindowFilter *New();
44 
45  virtual unsigned long int GetMTime() override;
47  vtkScalarsToColors *GetLookupTable();
49  void SetLookupTable(vtkScalarsToColors *lookupTable);
50 
53  vtkPiecewiseFunction *GetOpacityPiecewiseFunction() { return m_OpacityFunction; }
56  void SetOpacityPiecewiseFunction(vtkPiecewiseFunction *opacityFunction);
57 
59  void SetMinOpacity(double minOpacity);
60  inline double GetMinOpacity() const;
61 
63  void SetMaxOpacity(double maxOpacity);
64  inline double GetMaxOpacity() const;
65 
67  void SetClippingBounds(double *);
68 
69 protected:
81  void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int extent[6], int id) override;
82 
83  // /** Standard VTK filter method to apply the filter. See VTK documentation.*/
84  int RequestInformation(vtkInformation *request,
85  vtkInformationVector **inputVector,
86  vtkInformationVector *outputVector) override;
87  // /** Standard VTK filter method to apply the filter. See VTK documentation. Not used at the moment.*/
88  // void ExecuteInformation(vtkImageData *vtkNotUsed(inData), vtkImageData *vtkNotUsed(outData));
89 
90 private:
92  vtkScalarsToColors *m_LookupTable;
94  vtkPiecewiseFunction *m_OpacityFunction;
96  double m_MinOpacity;
98  double m_MaxOpacity;
99 
100  double m_ClippingBounds[4];
101 };
102 #endif
#define MITKCORE_EXPORT
vtkPiecewiseFunction * GetOpacityPiecewiseFunction()
Get the piecewise function used to map scalar to alpha component value (only used when the lookupTabl...
Applies the grayvalue or color/opacity level window to scalar or RGB(A) images.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.