Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/Framework/Toolbox/DicomFrameConverter.h Mon Oct 02 14:31:26 2017 +0200 +++ b/Framework/Toolbox/DicomFrameConverter.h Mon Oct 02 22:01:41 2017 +0200 @@ -41,10 +41,12 @@ bool isSigned_; bool isColor_; bool hasRescale_; - float rescaleIntercept_; - float rescaleSlope_; - float defaultWindowCenter_; - float defaultWindowWidth_; + double rescaleIntercept_; + double rescaleSlope_; + double defaultWindowCenter_; + double defaultWindowWidth_; + + Orthanc::PixelFormat expectedPixelFormat_; void SetDefaultParameters(); @@ -54,20 +56,28 @@ SetDefaultParameters(); } - Orthanc::PixelFormat GetExpectedPixelFormat() const; + Orthanc::PixelFormat GetExpectedPixelFormat() const + { + return expectedPixelFormat_; + } void ReadParameters(const Orthanc::DicomMap& dicom); - float GetDefaultWindowCenter() const + double GetDefaultWindowCenter() const { return defaultWindowCenter_; } - float GetDefaultWindowWidth() const + double GetDefaultWindowWidth() const { return defaultWindowWidth_; } - void ConvertFrame(std::auto_ptr<Orthanc::ImageAccessor>& source) const; + void ConvertFrame(std::auto_ptr<Orthanc::ImageAccessor>& source) const; + + void ApplyRescale(Orthanc::ImageAccessor& image, + bool useDouble) const; + + double Apply(double x) const; }; }