CustusX  18.04
An IGT application
cxImageLUT2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
13 #ifndef CXIMAGELUT2D_H_
14 #define CXIMAGELUT2D_H_
15 
16 #include "cxResourceExport.h"
17 #include "cxPrecompiledHeader.h"
18 
19 class QDomElement;
20 class QDomNode;
21 
22 #include <boost/shared_ptr.hpp>
23 #include <QColor>
24 #include <QObject>
25 #include "vtkForwardDeclarations.h"
26 #include "cxImageTFData.h"
27 
28 namespace cx
29 {
30 typedef boost::shared_ptr<class ImageLUT2D> ImageLUT2DPtr;
31 
32 
47 class cxResource_EXPORT ImageLUT2D: public ImageTFData
48 {
49 Q_OBJECT
50 public:
51  explicit ImageLUT2D();
52 // void setInitialTFFromImage(vtkImageDataPtr base);
53  ImageLUT2DPtr createCopy();
54  void setFullRangeWinLevel(vtkImageDataPtr image);
55 
56  vtkLookupTablePtr getOutputLookupTable();
57 
58 protected:
59  virtual void internalsHaveChanged();
60 
61 private:
62  std::pair<int,int> getMapsRange();
63  void buildOpacityMapFromLLRAlpha();
64  void refreshOutputLUT();
65 
66  vtkLookupTablePtr mOutputLUT;
67 };
68 
69 }
70 
71 #endif /* CXIMAGELUT2D_H_ */
Handling of color and opacity for 2D slices.
Definition: cxImageLUT2D.h:47
boost::shared_ptr< class ImageLUT2D > ImageLUT2DPtr
vtkSmartPointer< class vtkLookupTable > vtkLookupTablePtr
Data class for Transfer Function info, either 2D or 3D.
Definition: cxImageTFData.h:76
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Namespace for all CustusX production code.