Mercurial > hg > orthanc-stone
diff Framework/Volumes/ImageBuffer3D.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 | 2eca030792aa |
children | e2fe9352f240 |
line wrap: on
line diff
--- a/Framework/Volumes/ImageBuffer3D.h Mon Oct 02 14:31:26 2017 +0200 +++ b/Framework/Volumes/ImageBuffer3D.h Mon Oct 02 22:01:41 2017 +0200 @@ -22,7 +22,9 @@ #pragma once #include "../Enumerations.h" +#include "../Layers/RenderStyle.h" #include "../Toolbox/CoordinateSystem3D.h" +#include "../Toolbox/DicomFrameConverter.h" #include "../Toolbox/ParallelSlices.h" #include <Core/Images/Image.h> @@ -39,6 +41,12 @@ unsigned int width_; unsigned int height_; unsigned int depth_; + bool computeRange_; + bool hasRange_; + float minValue_; + float maxValue_; + + void ExtendImageRange(const Orthanc::ImageAccessor& slice); Orthanc::ImageAccessor GetAxialSliceAccessor(unsigned int slice, bool readOnly); @@ -52,7 +60,8 @@ ImageBuffer3D(Orthanc::PixelFormat format, unsigned int width, unsigned int height, - unsigned int depth); + unsigned int depth, + bool computeRange); void Clear(); @@ -94,6 +103,12 @@ uint64_t GetEstimatedMemorySize() const; + bool GetRange(float& minValue, + float& maxValue) const; + + bool FitWindowingToRange(RenderStyle& style, + const DicomFrameConverter& converter) const; + class SliceReader : public boost::noncopyable { @@ -116,6 +131,7 @@ class SliceWriter : public boost::noncopyable { private: + ImageBuffer3D& that_; bool modified_; Orthanc::ImageAccessor accessor_; std::auto_ptr<Orthanc::Image> sagittal_; // Unused for axial and coronal