Fraxinus  16.5.0-fx-rc4
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 update ()
 
void setTargetSpaceToR ()
 
- 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 (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 ()
 
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 ()
 

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 96 of file cxTexture3DSlicerRep.h.

Constructor & Destructor Documentation

cx::Texture3DSlicerRep::~Texture3DSlicerRep ( )
virtual

Definition at line 70 of file cxTexture3DSlicerRep.cpp.

cx::Texture3DSlicerRep::Texture3DSlicerRep ( )
protected

Definition at line 64 of file cxTexture3DSlicerRep.cpp.

Member Function Documentation

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

Implements cx::RepImpl.

Definition at line 108 of file cxTexture3DSlicerRep.cpp.

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

Definition at line 98 of file cxTexture3DSlicerRep.cpp.

virtual QString cx::Texture3DSlicerRep::getType ( ) const
inlinevirtual
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 102 of file cxTexture3DSlicerRep.h.

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

Definition at line 136 of file cxTexture3DSlicerRep.cpp.

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

Definition at line 74 of file cxTexture3DSlicerRep.cpp.

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

Reimplemented from cx::RepImpl.

Definition at line 126 of file cxTexture3DSlicerRep.cpp.

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

Implements cx::RepImpl.

Definition at line 115 of file cxTexture3DSlicerRep.cpp.

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

Definition at line 93 of file cxTexture3DSlicerRep.cpp.

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

Definition at line 79 of file cxTexture3DSlicerRep.cpp.

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

Definition at line 103 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::setTargetSpaceToR ( )

Definition at line 59 of file cxTexture3DSlicerRep.cpp.

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

Definition at line 131 of file cxTexture3DSlicerRep.cpp.

void cx::Texture3DSlicerRep::update ( )

Definition at line 121 of file cxTexture3DSlicerRep.cpp.


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