Mercurial > hg > orthanc-stone
diff Framework/Volumes/ImageBuffer3D.h @ 684:7719eb852dd5
new class: VolumeImageGeometry
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 16 May 2019 16:47:46 +0200 |
parents | dbc1d8bfc68a |
children | d2c0e347ddc2 |
line wrap: on
line diff
--- a/Framework/Volumes/ImageBuffer3D.h Thu May 16 16:01:36 2019 +0200 +++ b/Framework/Volumes/ImageBuffer3D.h Thu May 16 16:47:46 2019 +0200 @@ -23,7 +23,7 @@ #include "../StoneEnumerations.h" #include "../Layers/RenderStyle.h" -#include "../Toolbox/CoordinateSystem3D.h" +#include "../Toolbox/VolumeImageGeometry.h" #include "../Toolbox/DicomFrameConverter.h" #include "../Toolbox/ParallelSlices.h" @@ -34,10 +34,7 @@ class ImageBuffer3D : public boost::noncopyable { private: - CoordinateSystem3D axialGeometry_; - CoordinateSystem3D coronalGeometry_; - CoordinateSystem3D sagittalGeometry_; - Vector voxelDimensions_; + VolumeImageGeometry geometry_; // TODO => Move this out of this class Orthanc::Image image_; Orthanc::PixelFormat format_; unsigned int width_; @@ -50,8 +47,6 @@ Matrix transform_; Matrix transformInverse_; - void UpdateGeometry(); - void ExtendImageRange(const Orthanc::ImageAccessor& slice); void GetAxialSliceAccessor(Orthanc::ImageAccessor& target, @@ -83,35 +78,16 @@ void Clear(); - // Set the geometry of the first axial slice (i.e. the one whose - // depth == 0) - void SetAxialGeometry(const CoordinateSystem3D& geometry); - - const CoordinateSystem3D& GetAxialGeometry() const + VolumeImageGeometry& GetGeometry() { - return axialGeometry_; - } - - const CoordinateSystem3D& GetCoronalGeometry() const - { - return coronalGeometry_; + return geometry_; } - const CoordinateSystem3D& GetSagittalGeometry() const + const VolumeImageGeometry& GetGeometry() const { - return sagittalGeometry_; + return geometry_; } - void SetVoxelDimensions(double x, - double y, - double z); - - Vector GetVoxelDimensions(VolumeProjection projection) const; - - void GetSliceSize(unsigned int& width, - unsigned int& height, - VolumeProjection projection); - const Orthanc::ImageAccessor& GetInternalImage() const { return image_; @@ -177,16 +153,7 @@ unsigned int y, unsigned int z) const; - // Get the 3D position of a point in the volume, where x, y and z - // lie in the [0;1] range - Vector GetCoordinates(float x, - float y, - float z) const; - - bool DetectProjection(VolumeProjection& projection, - const CoordinateSystem3D& plane) const; - - + class SliceReader : public boost::noncopyable { private: