CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxTexture3DSlicerRep.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
13 #ifndef CXTEXTURE3DSLICERREP_H_
14 #define CXTEXTURE3DSLICERREP_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include "cxRepImpl.h"
19 #include <vector>
20 #include "cxTransform3D.h"
21 #include "cxBoundingBox3D.h"
22 
23 #include "vtkForwardDeclarations.h"
24 #include "cxForwardDeclarations.h"
25 
26 //---------------------------------------------------------
27 namespace cx
28 {
29 
30 typedef boost::shared_ptr<class Texture3DSlicerProxy> Texture3DSlicerProxyPtr;
31 
75 class cxResourceVisualization_EXPORT Texture3DSlicerRep: public RepImpl
76 {
77 Q_OBJECT
78 public:
79  static Texture3DSlicerRepPtr New(SharedOpenGLContextPtr context, const QString& uid="");
80 
81  virtual ~Texture3DSlicerRep();
82 
83  virtual QString getType() const;
84  void setShaderPath(QString path);
85  virtual void printSelf(std::ostream & os, Indent indent);
86  void setViewportData(const Transform3D& vpMs, const DoubleBoundingBox3D& vp); // DEPRECATED: use zoomfactor in View and the object will auto-update
87  void setImages(std::vector<ImagePtr> images);
88  std::vector<ImagePtr> getImages();
89  void setSliceProxy(SliceProxyPtr slicer);
90  void setTargetSpaceToR();
91  static bool isSupported(vtkRenderWindowPtr window);
92  void setRenderWindow(vtkRenderWindowPtr window);
93 
94 protected:
96  virtual void addRepActorsToViewRenderer(ViewPtr view);
97  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
98 
99 private slots:
100  void viewChanged();
101 
102 private:
103  Texture3DSlicerProxyPtr mProxy;
104 };
105 //---------------------------------------------------------
106 }//end namespace
107 //---------------------------------------------------------
108 #endif /* CXTEXTURE3DSLICERREP_H_ */
109 
boost::shared_ptr< class Texture3DSlicerRep > Texture3DSlicerRepPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class SliceProxy > SliceProxyPtr
vtkSmartPointer< class vtkRenderWindow > vtkRenderWindowPtr
Display overlayed image slices in 2D.
boost::shared_ptr< class View > ViewPtr
boost::shared_ptr< class SharedOpenGLContext > SharedOpenGLContextPtr
Formatting class for debug printing of the ssc library.
Definition: cxIndent.h:28
Default implementation of Rep.
Definition: cxRepImpl.h:42
boost::shared_ptr< class Texture3DSlicerProxy > Texture3DSlicerProxyPtr
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Namespace for all CustusX production code.