diff Framework/Toolbox/Slice.h @ 102:fcec0ab44054 wasm

display volumes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 31 May 2017 17:01:18 +0200
parents efd9ef2b67f1
children 53025eecbc95
line wrap: on
line diff
--- a/Framework/Toolbox/Slice.h	Wed May 31 10:35:20 2017 +0200
+++ b/Framework/Toolbox/Slice.h	Wed May 31 17:01:18 2017 +0200
@@ -32,7 +32,7 @@
     enum Type
     {
       Type_Invalid,
-      Type_Detached,
+      Type_Standalone,
       Type_OrthancInstance
       // TODO A slice could come from some DICOM file (URL)
     };
@@ -57,7 +57,7 @@
     // layers within LayerWidget?
     Slice(const SliceGeometry& plane,
           double thickness) :
-      type_(Type_Detached),
+      type_(Type_Standalone),
       frame_(0),
       geometry_(plane),
       pixelSpacingX_(1),
@@ -68,6 +68,24 @@
     {      
     }
 
+    Slice(const SliceGeometry& plane,
+          double pixelSpacingX,
+          double pixelSpacingY,
+          double thickness,
+          unsigned int width,
+          unsigned int height,
+          const DicomFrameConverter& converter) :
+      type_(Type_Standalone),
+      geometry_(plane),
+      pixelSpacingX_(pixelSpacingX),
+      pixelSpacingY_(pixelSpacingY),
+      thickness_(thickness),
+      width_(width),
+      height_(height),
+      converter_(converter)
+    {
+    }
+
     bool IsValid() const
     {
       return type_ != Type_Invalid;
@@ -101,5 +119,7 @@
     const DicomFrameConverter& GetConverter() const;
 
     bool ContainsPlane(const SliceGeometry& plane) const;
+
+    void GetExtent(std::vector<Vector>& points) const;
   };
 }