Fraxinus
17.12-rc3
An IGT application
|
Display overlayed image slices in 2D. More...
#include <cxTexture3DSlicerRep.h>
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< ImagePtr > | getImages () |
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 () |
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.
Used by Sonowand and CustusX.
Definition at line 96 of file cxTexture3DSlicerRep.h.
|
virtual |
Definition at line 71 of file cxTexture3DSlicerRep.cpp.
|
protected |
Definition at line 65 of file cxTexture3DSlicerRep.cpp.
|
protectedvirtual |
Implements cx::RepImpl.
Definition at line 114 of file cxTexture3DSlicerRep.cpp.
std::vector< ImagePtr > cx::Texture3DSlicerRep::getImages | ( | ) |
Definition at line 104 of file cxTexture3DSlicerRep.cpp.
|
virtual |
Implements cx::RepImpl.
Definition at line 75 of file cxTexture3DSlicerRep.cpp.
|
static |
Definition at line 137 of file cxTexture3DSlicerRep.cpp.
|
static |
Definition at line 80 of file cxTexture3DSlicerRep.cpp.
|
virtual |
Reimplemented from cx::RepImpl.
Definition at line 127 of file cxTexture3DSlicerRep.cpp.
|
protectedvirtual |
Implements cx::RepImpl.
Definition at line 121 of file cxTexture3DSlicerRep.cpp.
void cx::Texture3DSlicerRep::setImages | ( | std::vector< ImagePtr > | images | ) |
Definition at line 99 of file cxTexture3DSlicerRep.cpp.
void cx::Texture3DSlicerRep::setRenderWindow | ( | vtkRenderWindowPtr | window | ) |
Definition at line 142 of file cxTexture3DSlicerRep.cpp.
void cx::Texture3DSlicerRep::setShaderPath | ( | QString | path | ) |
Definition at line 85 of file cxTexture3DSlicerRep.cpp.
void cx::Texture3DSlicerRep::setSliceProxy | ( | SliceProxyPtr | slicer | ) |
Definition at line 109 of file cxTexture3DSlicerRep.cpp.
void cx::Texture3DSlicerRep::setTargetSpaceToR | ( | ) |
Definition at line 60 of file cxTexture3DSlicerRep.cpp.
void cx::Texture3DSlicerRep::setViewportData | ( | const Transform3D & | vpMs, |
const DoubleBoundingBox3D & | vp | ||
) |
Definition at line 132 of file cxTexture3DSlicerRep.cpp.