Fraxinus  18.10
An IGT application
cxImageDefaultTFGenerator.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 #ifndef CXIMAGEDEFAULTTFGENERATOR_H
13 #define CXIMAGEDEFAULTTFGENERATOR_H
14 
15 #include "cxResourceExport.h"
16 #include "cxPrecompiledHeader.h"
17 
18 #include "cxForwardDeclarations.h"
19 
20 namespace cx
21 {
22 typedef std::pair<double,double> double_pair;
23 
24 
34 class cxResource_EXPORT ImageDefaultTFGenerator
35 {
36 public:
38  ImageLUT2DPtr generate2DTFPreset();
39  ImageTF3DPtr generate3DTFPreset();
40  void resetShading();
41 
42 private:
43  ImagePtr mImage;
44  double_pair guessInitialScalarRange() const;
45  double_pair getFullScalarRange() const;
46  double_pair getInitialWindowRange() const;
47  bool hasValidInitialWindow() const;
48  double_pair guessMRRange() const;
49  double_pair guessCTRange() const;
50  double_pair ensureNonZeroRoundedRange(double_pair range) const;
51  bool isUnsignedChar() const;
52  bool looksLikeBinaryImage() const;
53 };
54 
55 
56 } // namespace cx
57 
58 
59 #endif // CXIMAGEDEFAULTTFGENERATOR_H
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
std::pair< double, double > double_pair
boost::shared_ptr< class ImageLUT2D > ImageLUT2DPtr
boost::shared_ptr< class ImageTF3D > ImageTF3DPtr
Namespace for all CustusX production code.