CustusX  18.04
An IGT application
cx::Texture3DSlicerRep Class Reference

Display overlayed image slices in 2D. More...

#include <cxTexture3DSlicerRep.h>

Inheritance diagram for cx::Texture3DSlicerRep:
cx::RepImpl cx::Rep

Public Member Functions

virtual ~Texture3DSlicerRep ()
 
virtual QString getType () const
 
void setShaderPath (QString path)
 
virtual void printSelf (std::ostream &os, Indent indent)
 
void setViewportData (const Transform3D &vpMs, const DoubleBoundingBox3D &vp)
 
void setImages (std::vector< ImagePtr > images)
 
std::vector< ImagePtrgetImages ()
 
void setSliceProxy (SliceProxyPtr slicer)
 
void setTargetSpaceToR ()
 
void setRenderWindow (vtkRenderWindowPtr window)
 
- Public Member Functions inherited from cx::RepImpl
 RepImpl (const QString &uid="", const QString &name="")
 
virtual ~RepImpl ()
 
virtual void connectToView (ViewPtr theView)
 
virtual void disconnectFromView (ViewPtr theView)
 
virtual bool isConnectedToView (ViewPtr theView) const
 
void setName (QString name)
 
QString getName () const
 
QString getUid () const
 
- Public Member Functions inherited from cx::Rep
virtual ~Rep ()
 

Static Public Member Functions

static Texture3DSlicerRepPtr New (SharedOpenGLContextPtr context, const QString &uid="")
 
static bool isSupported (vtkRenderWindowPtr window)
 
- Static Public Member Functions inherited from cx::RepImpl
template<class REP >
static boost::shared_ptr< REP > wrap_new (REP *object, QString uid)
 

Protected Member Functions

 Texture3DSlicerRep (SharedOpenGLContextPtr context)
 
virtual void addRepActorsToViewRenderer (ViewPtr view)
 
virtual void removeRepActorsFromViewRenderer (ViewPtr view)
 
- Protected Member Functions inherited from cx::RepImpl
ViewPtr getView () const
 
vtkRendererPtr getRenderer ()
 
RepPtr getSelf ()
 
virtual void onModifiedStartRender ()
 
virtual void onEveryRender ()
 

Additional Inherited Members

- Protected Slots inherited from cx::RepImpl
void setModified ()
 

Detailed Description

Display overlayed image slices in 2D.

The functionality is similar to SlicerRepSW, but the actual slicing is performed by loading the image into the GPU as a 3D texture and slicing it there, using the GPU.

Several images are sliced simultaneously, and are overlayed using the alpha transfer function (it is assumed to be a step function).

The Texture3DSlicerRep draws several image slices in an overlay. Opacity and LLR are used to draw several images on top of each other. Despite its name is this a 2D Rep (it is drawn in a plane).

The Texture3DSlicerRep class itself does very little real work: It inherits from RepImpl and Rep, thus it can be added to a View. The drawing functionality is embedded in Texture3DSlicerProxy, while the slicer functionality is embedded in SliceProxy.

SliceProxy determines the slice matrix and viewport from a Tool and the slice definition (fex Axial, Sagittal, etc.). It uses a SliceComputer to do the math. Texture3DSlicerProxy is a base class with default dummy behaviour. This is solely a hack to get the code to compile on Windows. The real behaviour lie in Texture3DSlicerProxyImpl. It assembles images and a slice definition, which is sent to the TextureSlicePainter to be renderered. Most of the actual OpenGL code in embedded inside TextureSlicePainter.

sscArchitecture_slice.png
Texture3DSlicerRep and surrounding classes.

Used by Sonowand and CustusX.

Date
Oct 13, 2009
Jan 8, 2012
Author
petterw
christiana

Definition at line 75 of file cxTexture3DSlicerRep.h.

Constructor & Destructor Documentation

cx::Texture3DSlicerRep::~Texture3DSlicerRep ( )
virtual

Definition at line 50 of file cxTexture3DSlicerRep.cpp.

cx::Texture3DSlicerRep::Texture3DSlicerRep ( SharedOpenGLContextPtr  context)
protected

Definition at line 44 of file cxTexture3DSlicerRep.cpp.

Member Function Documentation

void cx::Texture3DSlicerRep::addRepActorsToViewRenderer ( ViewPtr  view)
protectedvirtual

Implements cx::RepImpl.

Definition at line 93 of file cxTexture3DSlicerRep.cpp.

std::vector< ImagePtr > cx::Texture3DSlicerRep::getImages ( )

Definition at line 83 of file cxTexture3DSlicerRep.cpp.

QString cx::Texture3DSlicerRep::getType ( ) const
virtual
Returns
a string identifying the Rep type. Each suclass implement this with its own class name. Subclasses from other namespaces (such as cx and snw) should add that namespace as a prefix.

Implements cx::RepImpl.

Definition at line 54 of file cxTexture3DSlicerRep.cpp.

bool cx::Texture3DSlicerRep::isSupported ( vtkRenderWindowPtr  window)
static

Definition at line 116 of file cxTexture3DSlicerRep.cpp.

Texture3DSlicerRepPtr cx::Texture3DSlicerRep::New ( SharedOpenGLContextPtr  context,
const QString &  uid = "" 
)
static

Definition at line 59 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::printSelf ( std::ostream &  os,
Indent  indent 
)
virtual

Reimplemented from cx::RepImpl.

Definition at line 106 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::removeRepActorsFromViewRenderer ( ViewPtr  view)
protectedvirtual

Implements cx::RepImpl.

Definition at line 100 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::setImages ( std::vector< ImagePtr images)

Definition at line 78 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::setRenderWindow ( vtkRenderWindowPtr  window)

Definition at line 121 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::setShaderPath ( QString  path)

Definition at line 64 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::setSliceProxy ( SliceProxyPtr  slicer)

Definition at line 88 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::setTargetSpaceToR ( )

Definition at line 39 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::setViewportData ( const Transform3D vpMs,
const DoubleBoundingBox3D vp 
)

Definition at line 111 of file cxTexture3DSlicerRep.cpp.


The documentation for this class was generated from the following files: