Mercurial > hg > orthanc-stone
diff Framework/Volumes/ImageBuffer3D.cpp @ 734:be3671662eec
moved FitWindowingToRange() from ImageBuffer3D to RenderStyle
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 21 May 2019 15:20:04 +0200 |
parents | 4f2416d519b4 |
children | c3bbb130abc4 |
line wrap: on
line diff
--- a/Framework/Volumes/ImageBuffer3D.cpp Tue May 21 14:27:52 2019 +0200 +++ b/Framework/Volumes/ImageBuffer3D.cpp Tue May 21 15:20:04 2019 +0200 @@ -258,35 +258,6 @@ } - bool ImageBuffer3D::FitWindowingToRange(Deprecated::RenderStyle& style, - const Deprecated::DicomFrameConverter& converter) const - { - if (hasRange_) - { - style.windowing_ = ImageWindowing_Custom; - - // casting the narrower type to wider before calling the + operator - // will prevent overflowing (this is why the cast to double is only - // done on the first operand) - style.customWindowCenter_ = static_cast<float>( - converter.Apply((static_cast<double>(minValue_) + maxValue_) / 2.0)); - - style.customWindowWidth_ = static_cast<float>( - converter.Apply(static_cast<double>(maxValue_) - minValue_)); - - if (style.customWindowWidth_ > 1) - { - return true; - } - } - - style.windowing_ = ImageWindowing_Custom; - style.customWindowCenter_ = 128.0; - style.customWindowWidth_ = 256.0; - return false; - } - - ImageBuffer3D::SliceReader::SliceReader(const ImageBuffer3D& that, VolumeProjection projection, unsigned int slice)