comparison Framework/Toolbox/DicomFrameConverter.h @ 338:b3b3fa0e3689 am-2

BitmapStack
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Oct 2018 12:50:38 +0200
parents c80b5bddf86b
children b70e9be013e4
comparison
equal deleted inserted replaced
337:c4d4213f095c 338:b3b3fa0e3689
19 **/ 19 **/
20 20
21 21
22 #pragma once 22 #pragma once
23 23
24 #include <Plugins/Samples/Common/IDicomDataset.h>
24 #include <Core/DicomFormat/DicomMap.h> 25 #include <Core/DicomFormat/DicomMap.h>
25 #include <Core/Images/ImageAccessor.h> 26 #include <Core/Images/ImageAccessor.h>
26 27
27 #include <memory> 28 #include <memory>
28 29
41 bool isSigned_; 42 bool isSigned_;
42 bool isColor_; 43 bool isColor_;
43 bool hasRescale_; 44 bool hasRescale_;
44 double rescaleIntercept_; 45 double rescaleIntercept_;
45 double rescaleSlope_; 46 double rescaleSlope_;
47 bool hasDefaultWindow_;
46 double defaultWindowCenter_; 48 double defaultWindowCenter_;
47 double defaultWindowWidth_; 49 double defaultWindowWidth_;
48 50
49 Orthanc::PhotometricInterpretation photometric_; 51 Orthanc::PhotometricInterpretation photometric_;
50 Orthanc::PixelFormat expectedPixelFormat_; 52 Orthanc::PixelFormat expectedPixelFormat_;
67 return photometric_; 69 return photometric_;
68 } 70 }
69 71
70 void ReadParameters(const Orthanc::DicomMap& dicom); 72 void ReadParameters(const Orthanc::DicomMap& dicom);
71 73
74 void ReadParameters(const OrthancPlugins::IDicomDataset& dicom);
75
76 bool HasDefaultWindow() const
77 {
78 return hasDefaultWindow_;
79 }
80
72 double GetDefaultWindowCenter() const 81 double GetDefaultWindowCenter() const
73 { 82 {
74 return defaultWindowCenter_; 83 return defaultWindowCenter_;
75 } 84 }
76 85
87 double GetRescaleSlope() const 96 double GetRescaleSlope() const
88 { 97 {
89 return rescaleSlope_; 98 return rescaleSlope_;
90 } 99 }
91 100
92 void ConvertFrame(std::auto_ptr<Orthanc::ImageAccessor>& source) const; 101 void ConvertFrameInplace(std::auto_ptr<Orthanc::ImageAccessor>& source) const;
102
103 Orthanc::ImageAccessor* ConvertFrame(const Orthanc::ImageAccessor& source) const;
93 104
94 void ApplyRescale(Orthanc::ImageAccessor& image, 105 void ApplyRescale(Orthanc::ImageAccessor& image,
95 bool useDouble) const; 106 bool useDouble) const;
96 107
97 double Apply(double x) const; 108 double Apply(double x) const;