Mercurial > hg > orthanc-stone
changeset 1488:7f16987131e1
Missing include + docs + public getter for volume geometry in multiframe loader
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 23 Jun 2020 13:44:23 +0200 |
parents | b931ddbe070e |
children | 6e43cac7833c |
files | Framework/Loaders/OrthancMultiframeVolumeLoader.h Framework/Oracle/WebAssemblyOracle.h Framework/Toolbox/SubvoxelReader.h Framework/Volumes/ImageBuffer3D.h |
diffstat | 4 files changed, 93 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Loaders/OrthancMultiframeVolumeLoader.h Tue Jun 23 07:50:14 2020 +0200 +++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.h Tue Jun 23 13:44:23 2020 +0200 @@ -90,9 +90,6 @@ void SetUncompressedPixelData(const std::string& pixelData); - bool HasGeometry() const; - const OrthancStone::VolumeImageGeometry& GetImageGeometry() const; - protected: OrthancMultiframeVolumeLoader( OrthancStone::ILoadersContext& loadersContext, @@ -107,6 +104,9 @@ virtual ~OrthancMultiframeVolumeLoader(); + bool HasGeometry() const; + const OrthancStone::VolumeImageGeometry& GetImageGeometry() const; + bool IsPixelDataLoaded() const { return pixelDataLoaded_;
--- a/Framework/Oracle/WebAssemblyOracle.h Tue Jun 23 07:50:14 2020 +0200 +++ b/Framework/Oracle/WebAssemblyOracle.h Tue Jun 23 13:44:23 2020 +0200 @@ -41,6 +41,7 @@ #include <WebServiceParameters.h> +#include <Enumerations.h> namespace OrthancStone {
--- a/Framework/Toolbox/SubvoxelReader.h Tue Jun 23 07:50:14 2020 +0200 +++ b/Framework/Toolbox/SubvoxelReader.h Tue Jun 23 13:44:23 2020 +0200 @@ -33,6 +33,13 @@ { namespace Internals { + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ class SubvoxelReaderBase : public boost::noncopyable { private: @@ -84,11 +91,25 @@ } + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ template <Orthanc::PixelFormat Format, ImageInterpolation Interpolation> class SubvoxelReader; + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ template <Orthanc::PixelFormat Format> class SubvoxelReader<Format, ImageInterpolation_Nearest> : public Internals::SubvoxelReaderBase @@ -114,6 +135,13 @@ }; + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ template <Orthanc::PixelFormat Format> class SubvoxelReader<Format, ImageInterpolation_Bilinear> : public Internals::SubvoxelReaderBase @@ -147,6 +175,13 @@ }; + /* + WARNING : the slice order is different between this class and ImageBuffer3D + + See the comment above ImageBuffer3D declaration. + + The slices are supposed to be stored in INCREASING z-order in this class! + */ template <Orthanc::PixelFormat Format> class SubvoxelReader<Format, ImageInterpolation_Trilinear> : public Internals::SubvoxelReaderBase @@ -176,6 +211,9 @@ }; + /* + See important comment above + */ template <Orthanc::PixelFormat Format> bool SubvoxelReader<Format, ImageInterpolation_Nearest>::GetValue(PixelType& target, @@ -230,6 +268,9 @@ } + /* + See important comment above + */ template <Orthanc::PixelFormat Format> bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::Sample(float& f00, @@ -284,6 +325,9 @@ } + /* + See important comment above + */ template <Orthanc::PixelFormat Format> bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetFloatValue(float& target, @@ -323,6 +367,9 @@ } + /* + See important comment above + */ template <Orthanc::PixelFormat Format> bool SubvoxelReader<Format, ImageInterpolation_Bilinear>::GetValue(PixelType& target, @@ -397,6 +444,10 @@ } + /* + See important comment above + */ + template <Orthanc::PixelFormat Format> bool SubvoxelReader<Format, ImageInterpolation_Trilinear>::GetValue(PixelType& target,
--- a/Framework/Volumes/ImageBuffer3D.h Tue Jun 23 07:50:14 2020 +0200 +++ b/Framework/Volumes/ImageBuffer3D.h Tue Jun 23 13:44:23 2020 +0200 @@ -29,6 +29,44 @@ namespace OrthancStone { + /* + + This classes stores volume images sliced across the Z axis, vertically, in the decreasing Z order : + + +---------------+ + | | + | SLICE N-1 | + | | + +---------------+ + | | + | SLICE N-2 | + | | + +---------------+ + | | + | SLICE N-3 | + | | + . . + ...... ...... + . . + | | + | SLICE 2 | + | | + +---------------+ + | | + | SLICE 1 | + | | + +---------------+ + | | + | SLICE 0 | + | | + +---------------+ + + As you can see, if the 3d image has size width, height, depth, the 2d image has : + - 2d width = 3d width + - 2d height = 3d height * 3d depth + + */ + class ImageBuffer3D : public boost::noncopyable { private: