Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/DicomFrameConverter.h @ 119:ba83e38cf3ff wasm
rendering of rt-dose
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 02 Oct 2017 22:01:41 +0200 |
parents | a4d0b6c82b29 |
children | e2fe9352f240 |
comparison
equal
deleted
inserted
replaced
118:a4d0b6c82b29 | 119:ba83e38cf3ff |
---|---|
39 { | 39 { |
40 private: | 40 private: |
41 bool isSigned_; | 41 bool isSigned_; |
42 bool isColor_; | 42 bool isColor_; |
43 bool hasRescale_; | 43 bool hasRescale_; |
44 float rescaleIntercept_; | 44 double rescaleIntercept_; |
45 float rescaleSlope_; | 45 double rescaleSlope_; |
46 float defaultWindowCenter_; | 46 double defaultWindowCenter_; |
47 float defaultWindowWidth_; | 47 double defaultWindowWidth_; |
48 | |
49 Orthanc::PixelFormat expectedPixelFormat_; | |
48 | 50 |
49 void SetDefaultParameters(); | 51 void SetDefaultParameters(); |
50 | 52 |
51 public: | 53 public: |
52 DicomFrameConverter() | 54 DicomFrameConverter() |
53 { | 55 { |
54 SetDefaultParameters(); | 56 SetDefaultParameters(); |
55 } | 57 } |
56 | 58 |
57 Orthanc::PixelFormat GetExpectedPixelFormat() const; | 59 Orthanc::PixelFormat GetExpectedPixelFormat() const |
60 { | |
61 return expectedPixelFormat_; | |
62 } | |
58 | 63 |
59 void ReadParameters(const Orthanc::DicomMap& dicom); | 64 void ReadParameters(const Orthanc::DicomMap& dicom); |
60 | 65 |
61 float GetDefaultWindowCenter() const | 66 double GetDefaultWindowCenter() const |
62 { | 67 { |
63 return defaultWindowCenter_; | 68 return defaultWindowCenter_; |
64 } | 69 } |
65 | 70 |
66 float GetDefaultWindowWidth() const | 71 double GetDefaultWindowWidth() const |
67 { | 72 { |
68 return defaultWindowWidth_; | 73 return defaultWindowWidth_; |
69 } | 74 } |
70 | 75 |
71 void ConvertFrame(std::auto_ptr<Orthanc::ImageAccessor>& source) const; | 76 void ConvertFrame(std::auto_ptr<Orthanc::ImageAccessor>& source) const; |
77 | |
78 void ApplyRescale(Orthanc::ImageAccessor& image, | |
79 bool useDouble) const; | |
80 | |
81 double Apply(double x) const; | |
72 }; | 82 }; |
73 } | 83 } |