This class represents the DGV Volume Plot Display object using VTK. More...
#include <DGVVolumePlotVTK.h>
Public Slots | |
void | scanVolume () |
Scan through x-y plane using surface plots. | |
void | xLabel () |
Ask for x-label. | |
void | yLabel () |
Ask for y-label. | |
void | zLabel () |
Ask for z-label. | |
void | opacity () |
Ask for opacity level. | |
void | background () |
Ask for rgb values and change background to that colour. | |
void | axesProperties () |
Ask for rgb values and change axes to that colour. | |
void | toggleAxesAsClosestTriad () |
Toggles if the axes are display with closest triad display mode. | |
void | toggleAntiAliasing () |
Toggles the Anti-Aliasing in display. May slow rendering if enabled. | |
void | save () |
Saves the data. | |
void | renameData () |
Renames the volume data. | |
Signals | |
void | surfacePlotAvailable (DGVSurfacePlotVTK *) |
Public Member Functions | |
DGVVolumePlotVTK (QWidget *parent=0) | |
The standard constructor. | |
virtual | ~DGVVolumePlotVTK () |
The standard destructor. | |
void | setName (QString filename) |
Set the name of the plot. | |
void | setData (Array< imageType, 3 > &data) |
Set the data to be plotted. | |
void | setData (Array< complex< imageType >, 3 > &data) |
Set the complex data to be plotted. Volume display will show absolute magnitude, real and imaginary (3 scalar components). | |
void | setData (vtkImageData *data) |
Set the data to be plotted. | |
void | SetInputConnection (vtkAlgorithmOutput *data) |
Set the data to be plotted. | |
void | generatePlot () |
Generates a volume plot from the data provided. | |
void | generateAxes () |
Generates and enables the axes on the plot. | |
void | unsignedCharModeOn () |
Volume plot will expect unsigned chars in image data type. WARNING: Plotting appears not to work in unsigned char mode. | |
void | unsignedCharModeOff () |
Volume plot will expect any image data type. | |
void | setXLabel (QString text) |
Set the label of x-axis. | |
void | setYLabel (QString text) |
Set the label of y-axis. | |
void | setZLabel (QString text) |
Set the label of z-axis. | |
void | setBackground (double r, double g, double b) |
Sets the background of the renderer to colour (r,g,b). | |
void | setAxesAsClosestTriad () |
Set the axes display method as the closest triad to viewer. | |
void | setAxesAsOuterEdges () |
bool | saveVTI (const QString filename) |
Saves data using VTK XML Image (VTI) format with stored filename. | |
bool | saveVTK (const QString filename) |
Saves data using VTK Legacy Structured Points (VTK) format with stored filename. | |
QString | strippedName () |
Returns the stripped (path removed) name of the plot. | |
QString | strippedNamePrefix () |
Returns the stripped (path removed) name of the plot with "VPlot" prefix. | |
Array< imageType, 3 > & | data () |
Returns the data in Blitz array form. | |
Protected Member Functions | |
void | setupEvents () |
Executes common events setup code. | |
void | contextMenuEvent (QContextMenuEvent *event) |
The context menu setup member. | |
Protected Attributes | |
bool | loaded |
Data loaded? | |
bool | externalData |
External Data used? | |
bool | mapper |
Has mapper been setup? | |
bool | generated |
Plot has been generated? | |
bool | axisGenerated |
Axis has been generated? | |
bool | closestTriad |
Closest Triad being displayed? | |
bool | antiAliasing |
Smooth Polygons? | |
bool | imageDataSource |
Source is VTK ImageData? | |
QString | name |
Name of the plot. | |
bool | unsignedCharMode |
Use this mode? | |
QMenu * | contextMenu |
Context Menu. | |
QAction * | surfaceAct |
Action object for surface scan. | |
QAction * | xLabelAct |
Show Change x label. | |
QAction * | yLabelAct |
Show Change y label. | |
QAction * | zLabelAct |
Show Change z label. | |
QAction * | opacityAct |
Change opacity. | |
QAction * | backgroundAct |
Change background colour? | |
QAction * | axesAct |
Change axes colour? | |
QAction * | triadAct |
Change Axis Type. | |
QAction * | antiAliasingAct |
Change Anti Aliasing. | |
QAction * | saveAct |
Saves data as VTI file. | |
QAction * | renameAct |
Refreshes window. | |
QAction * | closeAct |
Closes window. | |
vtkImageData * | plotData |
Actual data stored as using an image geometry. | |
DGVBlitzArrayCasterVTK< imageType > | Blitz |
For casting Blitz arrays to and from VTK structures. | |
Array< imageType, 3 > | plotArray |
Plot data in array form. | |
vtkAlgorithmOutput * | inputConnection |
VTK connection member. | |
vtkPiecewiseFunction * | opacityTransferFunction |
VTK Volume instances. | |
vtkColorTransferFunction * | colorTransferFunction |
Colour map. | |
vtkVolumeProperty * | volumeProperty |
Encapsulates transparency and colour. | |
vtkFixedPointVolumeRayCastMapper * | volumeMapper_Fixed |
Maps data to grid volume. | |
vtkVolumeRayCastMapper * | volumeMapper |
Maps data to grid volume with unsigned chars. | |
vtkVolumeRayCastCompositeFunction * | compositeFunction |
vtkVolume * | volume |
Actual volume actor. | |
vtkCubeAxesActor2D * | axes |
Axis for plot. | |
vtkRenderer * | renderer |
Renderer of the plot. | |
vtkRenderWindow * | renderWin |
Window that controls the renderer. |
This class represents the DGV Volume Plot Display object using VTK.
The class displays image values using OpenGL via the VTK library. The rendering is encapsulated within a QVTK widget. Controls:
Usage Example:
volViewer = new DGVVolumePlotVTK; Load or create 3D data called imageData ... volViewer->setName(name); volViewer->setData(imageData); //imageData can be a vtkImageData object or a 3D Blitz Array volViewer->generatePlot(); volViewer->generateAxes(); volViewer->show();
Definition at line 74 of file DGVVolumePlotVTK.h.
DGVVolumePlotVTK::DGVVolumePlotVTK | ( | QWidget * | parent = 0 |
) |
The standard constructor.
Definition at line 29 of file DGVVolumePlotVTK.cpp.
DGVVolumePlotVTK::~DGVVolumePlotVTK | ( | ) | [virtual] |
The standard destructor.
< Control Transparency
< Colour map
< Encapsulates transparency and colour
< Maps data to grid volume
< Maps data to grid volume using unsigned chars.
< Actual volume actor
< Renderer of the plot
< Window that controls the renderer
< Axis for plot
Definition at line 42 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::axesProperties | ( | ) | [slot] |
Ask for rgb values and change axes to that colour.
Definition at line 447 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::background | ( | ) | [slot] |
Ask for rgb values and change background to that colour.
Definition at line 427 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::contextMenuEvent | ( | QContextMenuEvent * | event | ) | [protected] |
The context menu setup member.
< Only exists for the duration of the context selection
Global Ops
Labels and Options
Setup Toggle Options
Setup Close action Save
Close
Definition at line 551 of file DGVVolumePlotVTK.cpp.
DGVVolumePlotVTK::data | ( | ) | [inline] |
Returns the data in Blitz array form.
Definition at line 198 of file DGVVolumePlotVTK.h.
void DGVVolumePlotVTK::generateAxes | ( | ) |
Generates and enables the axes on the plot.
Axes
Ensure z-scale is true
Definition at line 219 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::generatePlot | ( | ) |
Generates a volume plot from the data provided.
Definition at line 140 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::opacity | ( | ) | [slot] |
Ask for opacity level.
Definition at line 404 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::renameData | ( | ) | [slot] |
Renames the volume data.
Definition at line 534 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::save | ( | ) | [slot] |
Saves the data.
Definition at line 508 of file DGVVolumePlotVTK.cpp.
bool DGVVolumePlotVTK::saveVTI | ( | const QString | filename | ) |
Saves data using VTK XML Image (VTI) format with stored filename.
Definition at line 308 of file DGVVolumePlotVTK.cpp.
bool DGVVolumePlotVTK::saveVTK | ( | const QString | filename | ) |
Saves data using VTK Legacy Structured Points (VTK) format with stored filename.
Definition at line 326 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::scanVolume | ( | ) | [slot] |
Scan through x-y plane using surface plots.
Definition at line 353 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setAxesAsClosestTriad | ( | ) |
Set the axes display method as the closest triad to viewer.
Set the axes display method as the outer edges from the viewer.
Definition at line 292 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setAxesAsOuterEdges | ( | ) |
Definition at line 300 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setBackground | ( | double | r, | |
double | g, | |||
double | b | |||
) |
Sets the background of the renderer to colour (r,g,b).
Definition at line 283 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setData | ( | vtkImageData * | data | ) |
Set the data to be plotted.
Definition at line 104 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setData | ( | Array< complex< imageType >, 3 > & | data | ) |
Set the complex data to be plotted. Volume display will show absolute magnitude, real and imaginary (3 scalar components).
Internal array only holds absolute magnitude.
Definition at line 91 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setData | ( | Array< imageType, 3 > & | data | ) |
Set the data to be plotted.
Definition at line 78 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::SetInputConnection | ( | vtkAlgorithmOutput * | data | ) |
Set the data to be plotted.
Definition at line 122 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setName | ( | QString | filename | ) |
Set the name of the plot.
Definition at line 72 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setupEvents | ( | ) | [protected] |
Executes common events setup code.
Unbind the right mouse button events as Qt uses context menu.
Definition at line 544 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setXLabel | ( | QString | text | ) |
Set the label of x-axis.
Definition at line 259 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setYLabel | ( | QString | text | ) |
Set the label of y-axis.
Definition at line 267 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::setZLabel | ( | QString | text | ) |
Set the label of z-axis.
Definition at line 275 of file DGVVolumePlotVTK.cpp.
QString DGVVolumePlotVTK::strippedName | ( | ) |
Returns the stripped (path removed) name of the plot.
Definition at line 343 of file DGVVolumePlotVTK.cpp.
QString DGVVolumePlotVTK::strippedNamePrefix | ( | ) |
Returns the stripped (path removed) name of the plot with "VPlot" prefix.
Definition at line 348 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::surfacePlotAvailable | ( | DGVSurfacePlotVTK * | _t1 | ) | [signal] |
Definition at line 110 of file moc_DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::toggleAntiAliasing | ( | ) | [slot] |
Toggles the Anti-Aliasing in display. May slow rendering if enabled.
Definition at line 490 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::toggleAxesAsClosestTriad | ( | ) | [slot] |
Toggles if the axes are display with closest triad display mode.
Definition at line 478 of file DGVVolumePlotVTK.cpp.
DGVVolumePlotVTK::unsignedCharModeOff | ( | ) | [inline] |
Volume plot will expect any image data type.
Definition at line 140 of file DGVVolumePlotVTK.h.
DGVVolumePlotVTK::unsignedCharModeOn | ( | ) | [inline] |
Volume plot will expect unsigned chars in image data type. WARNING: Plotting appears not to work in unsigned char mode.
Definition at line 134 of file DGVVolumePlotVTK.h.
void DGVVolumePlotVTK::xLabel | ( | ) | [slot] |
Ask for x-label.
Definition at line 374 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::yLabel | ( | ) | [slot] |
Ask for y-label.
Definition at line 384 of file DGVVolumePlotVTK.cpp.
void DGVVolumePlotVTK::zLabel | ( | ) | [slot] |
Ask for z-label.
Definition at line 394 of file DGVVolumePlotVTK.cpp.
bool DGVVolumePlotVTK::antiAliasing [protected] |
Smooth Polygons?
Definition at line 272 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::antiAliasingAct [protected] |
Change Anti Aliasing.
Definition at line 289 of file DGVVolumePlotVTK.h.
vtkCubeAxesActor2D* DGVVolumePlotVTK::axes [protected] |
Axis for plot.
Definition at line 311 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::axesAct [protected] |
Change axes colour?
Definition at line 287 of file DGVVolumePlotVTK.h.
bool DGVVolumePlotVTK::axisGenerated [protected] |
Axis has been generated?
Definition at line 270 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::backgroundAct [protected] |
Change background colour?
Definition at line 286 of file DGVVolumePlotVTK.h.
DGVBlitzArrayCasterVTK<imageType> DGVVolumePlotVTK::Blitz [protected] |
For casting Blitz arrays to and from VTK structures.
Definition at line 296 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::closeAct [protected] |
Closes window.
Definition at line 293 of file DGVVolumePlotVTK.h.
bool DGVVolumePlotVTK::closestTriad [protected] |
Closest Triad being displayed?
Definition at line 271 of file DGVVolumePlotVTK.h.
vtkColorTransferFunction* DGVVolumePlotVTK::colorTransferFunction [protected] |
Colour map.
Definition at line 303 of file DGVVolumePlotVTK.h.
vtkVolumeRayCastCompositeFunction* DGVVolumePlotVTK::compositeFunction [protected] |
Definition at line 308 of file DGVVolumePlotVTK.h.
QMenu* DGVVolumePlotVTK::contextMenu [protected] |
bool DGVVolumePlotVTK::externalData [protected] |
External Data used?
Definition at line 267 of file DGVVolumePlotVTK.h.
bool DGVVolumePlotVTK::generated [protected] |
Plot has been generated?
Definition at line 269 of file DGVVolumePlotVTK.h.
bool DGVVolumePlotVTK::imageDataSource [protected] |
Source is VTK ImageData?
Definition at line 273 of file DGVVolumePlotVTK.h.
vtkAlgorithmOutput* DGVVolumePlotVTK::inputConnection [protected] |
VTK connection member.
Definition at line 299 of file DGVVolumePlotVTK.h.
bool DGVVolumePlotVTK::loaded [protected] |
Data loaded?
Definition at line 266 of file DGVVolumePlotVTK.h.
bool DGVVolumePlotVTK::mapper [protected] |
Has mapper been setup?
Definition at line 268 of file DGVVolumePlotVTK.h.
QString DGVVolumePlotVTK::name [protected] |
Name of the plot.
Definition at line 274 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::opacityAct [protected] |
Change opacity.
Definition at line 285 of file DGVVolumePlotVTK.h.
vtkPiecewiseFunction* DGVVolumePlotVTK::opacityTransferFunction [protected] |
Array<imageType,3> DGVVolumePlotVTK::plotArray [protected] |
Plot data in array form.
Definition at line 297 of file DGVVolumePlotVTK.h.
vtkImageData* DGVVolumePlotVTK::plotData [protected] |
Actual data stored as using an image geometry.
Definition at line 295 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::renameAct [protected] |
Refreshes window.
Definition at line 292 of file DGVVolumePlotVTK.h.
vtkRenderer* DGVVolumePlotVTK::renderer [protected] |
Renderer of the plot.
Definition at line 313 of file DGVVolumePlotVTK.h.
vtkRenderWindow* DGVVolumePlotVTK::renderWin [protected] |
Window that controls the renderer.
Definition at line 314 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::saveAct [protected] |
Saves data as VTI file.
Definition at line 291 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::surfaceAct [protected] |
Action object for surface scan.
Definition at line 280 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::triadAct [protected] |
Change Axis Type.
Definition at line 288 of file DGVVolumePlotVTK.h.
bool DGVVolumePlotVTK::unsignedCharMode [protected] |
Use this mode?
Definition at line 276 of file DGVVolumePlotVTK.h.
vtkVolume* DGVVolumePlotVTK::volume [protected] |
Actual volume actor.
Definition at line 310 of file DGVVolumePlotVTK.h.
vtkVolumeRayCastMapper* DGVVolumePlotVTK::volumeMapper [protected] |
Maps data to grid volume with unsigned chars.
Definition at line 307 of file DGVVolumePlotVTK.h.
vtkFixedPointVolumeRayCastMapper* DGVVolumePlotVTK::volumeMapper_Fixed [protected] |
Maps data to grid volume.
Definition at line 306 of file DGVVolumePlotVTK.h.
vtkVolumeProperty* DGVVolumePlotVTK::volumeProperty [protected] |
Encapsulates transparency and colour.
Definition at line 304 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::xLabelAct [protected] |
Show Change x label.
Definition at line 282 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::yLabelAct [protected] |
Show Change y label.
Definition at line 283 of file DGVVolumePlotVTK.h.
QAction* DGVVolumePlotVTK::zLabelAct [protected] |
Show Change z label.
Definition at line 284 of file DGVVolumePlotVTK.h.