18 #include "milxQtPlot.h" 20 #include <vtkContextView.h> 21 #include <vtkPlotPoints.h> 22 #include <vtkContextScene.h> 23 #include <vtkImageDataGeometryFilter.h> 24 #include <vtkXMLImageDataWriter.h> 25 #include <vtkImageData.h> 26 #include <vtkWarpScalar.h> 27 #include <vtkPolyDataNormals.h> 29 #include <vtkTextProperty.h> 31 #include <vtkColorTransferFunction.h> 32 #include <vtkPiecewiseFunction.h> 33 #include <vtkVolumeProperty.h> 51 table = vtkSmartPointer<vtkTable>::New();
74 cout <<
"Creating Plot Menu 1" << endl;
82 cout <<
"Creating Plot Menu 2" << endl;
87 menu->addAction(currAct);
91 menu->addMenu(currMenu);
94 menu->addSeparator()->setText(tr(
"Plotting"));
108 menu->addSeparator();
134 printInfo(
"Volume Plot mode set. Trying Volume plot.");
140 printInfo(
"Surface Plot mode set. Trying Table Surface plot.");
146 printInfo(
"Scatter 2D Plot mode set. Trying Scatter xy plot.");
152 printInfo(
"Scatter 3D Plot mode set. Trying Scatter xyz plot.");
158 printError(
"Insufficient number of columns for 3D scatter plot. Try adding more columns.");
165 printInfo(
"Image data found. Trying Image Surface plot.");
170 if(
table->GetNumberOfColumns() == 1)
172 cerr <<
"One column is not supported yet." << endl;
174 else if(
table->GetNumberOfColumns() == 2)
176 printInfo(
"Two columns found. Trying 2D scatter plot.");
180 else if(
table->GetNumberOfColumns() > 3 &&
table->GetNumberOfColumns() < 10)
182 printInfo(
"Less than 10 columns found. Trying 3D scatter plot.");
188 printInfo(
"More than 10 columns found. Trying Surface plot.");
197 vtkSmartPointer<vtkContextView> view = vtkSmartPointer<vtkContextView>::New();
203 view->GetRenderer()->SetBackground(1.0, 1.0, 1.0);
204 view->GetRenderWindow()->SetSize(400, 300);
207 #if (VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION < 8) 208 view->SetLabelRenderModeToQt();
212 vtkPlot *templatePoints =
templateChart->AddPlot(vtkChart::LINE);
213 printDebug(
"Source Table is " + QString::number(table->GetNumberOfRows()) +
"x" + QString::number(table->GetNumberOfColumns()));
214 #if VTK_MAJOR_VERSION <=5 215 templatePoints->SetInput(table, xColumn, yColumn);
217 templatePoints->SetInputData(table, xColumn, yColumn);
218 #endif // VTK_MAJOR_VERSION 219 templatePoints->SetColor(0, 0, 0, 255);
220 templatePoints->SetWidth(1.0);
221 vtkPlotPoints::SafeDownCast(templatePoints)->SetMarkerStyle(vtkPlotPoints::DIAMOND);
224 templatePoints->Update();
226 view->SetInteractor(QVTKWidget::GetInteractor());
227 QVTKWidget::SetRenderWindow(view->GetRenderWindow());
236 QString xAxisTitle(table->GetColumnName(xColumn));
237 QString yAxisTitle(table->GetColumnName(yColumn));
238 if(!xAxisTitle.isEmpty() && !yAxisTitle.isEmpty())
248 vtkSmartPointer<vtkPoints>
points = vtkSmartPointer<vtkPoints>::New();
249 for(
int j = 0; j < table->GetNumberOfRows(); j ++)
251 vtkVariant x = table->GetValue(j, xColumn);
252 vtkVariant y = table->GetValue(j, yColumn);
253 vtkVariant z = table->GetValue(j, zColumn);
254 points->InsertNextPoint(x.ToDouble(), y.ToDouble(), z.ToDouble());
271 printInfo(
"To generate larger points for scatter plot. Use Generate->Point Model in context menu.");
274 QString xAxisTitle(table->GetColumnName(xColumn));
275 QString yAxisTitle(table->GetColumnName(yColumn));
276 QString zAxisTitle(table->GetColumnName(zColumn));
277 printInfo(
"Column Names: " + xAxisTitle +
", " + yAxisTitle +
", " + zAxisTitle);
278 if(!xAxisTitle.isEmpty() && !yAxisTitle.isEmpty() && !zAxisTitle.isEmpty())
279 renameAxes(xAxisTitle, yAxisTitle, zAxisTitle);
290 vtkSmartPointer<vtkImageDataGeometryFilter> geometry = vtkSmartPointer<vtkImageDataGeometryFilter>::New();
291 #if VTK_MAJOR_VERSION <=5 292 geometry->SetInput(img);
294 geometry->SetInputData(img);
295 #endif // VTK_MAJOR_VERSION 298 double range[2], bounds[6];
299 img->GetScalarRange(range);
300 img->GetBounds(bounds);
301 const double scaling = 0.25*( 1.0 / ( 2.0*(range[1]-range[0]) / (bounds[1]+bounds[3]) ) );
302 printInfo(
"Min/Max for z-axis: " + QString::number(range[0]) +
"/" + QString::number(range[1]));
303 printInfo(
"Scaling for z-axis: " + QString::number(scaling));
306 vtkSmartPointer<vtkWarpScalar> warpScalar = vtkSmartPointer<vtkWarpScalar>::New();
307 warpScalar->SetInputConnection(geometry->GetOutputPort());
309 warpScalar->SetNormal(1, 0, 0);
310 else if(zDirection == 1)
311 warpScalar->SetNormal(0, 1, 0);
313 warpScalar->SetNormal(0, 0, 1);
314 warpScalar->UseNormalOn();
315 warpScalar->SetScaleFactor(scaling);
316 warpScalar->Update();
321 axesRange[0] = bounds[0];
322 axesRange[1] = bounds[1];
323 axesRange[2] = bounds[2];
324 axesRange[3] = bounds[3];
325 axesRange[4] = range[0];
326 axesRange[5] = range[1];
328 vtkSmartPointer<vtkPolyDataNormals>
normals = vtkSmartPointer<vtkPolyDataNormals>::New();
329 normals->SetInputConnection(warpScalar->GetOutputPort());
332 printDebug(
"Creating Surface Model for Display");
348 dim[0] = table->GetNumberOfRows();
349 dim[1] = table->GetNumberOfColumns();
352 imageData = vtkSmartPointer<vtkImageData>::New();
354 imageData->SetExtent(0, table->GetNumberOfRows()-1, 0, table->GetNumberOfColumns()-1, 0, 0);
355 #if VTK_MAJOR_VERSION <=5 356 imageData->SetNumberOfScalarComponents(1);
360 imageData->AllocateScalars(VTK_DOUBLE,1);
364 for(
int j = 0; j < table->GetNumberOfRows(); j ++)
365 for(
int k = 0; k < table->GetNumberOfColumns(); k ++)
366 imageData->SetScalarComponentFromDouble(j, k, 0, 0, table->GetValue(j, k).ToDouble());
376 double range[2], bounds[6];
377 img->GetScalarRange(range);
378 img->GetBounds(bounds);
381 QDialog *slidersDlg =
new QDialog(
this);
382 QLabel *lowValueLbl =
new QLabel(
this);
383 lowSldr =
new QSlider(
this);
384 QLabel *highValueLbl =
new QLabel(
this);
385 highSldr =
new QSlider(
this);
386 QVBoxLayout *sliderLayout =
new QVBoxLayout(
this);
387 slideInterval = (range[1]-range[0])/tickNumber;
389 lowValueLbl->setText(
"Lower Value");
390 lowSldr->setMinimum(0);
391 lowSldr->setMaximum(tickNumber);
392 lowSldr->setValue(0);
393 highValueLbl->setText(
"Upper Value");
394 highSldr->setMinimum(0);
395 highSldr->setMaximum(tickNumber);
396 highSldr->setValue(tickNumber);
399 connect(lowSldr, SIGNAL(valueChanged(
int)),
this, SLOT(
updateVolumePlot(
int)));
400 connect(highSldr, SIGNAL(valueChanged(
int)),
this, SLOT(
updateVolumePlot(
int)));
402 sliderLayout->addWidget(lowValueLbl);
403 sliderLayout->addWidget(lowSldr);
404 sliderLayout->addWidget(highValueLbl);
405 sliderLayout->addWidget(highSldr);
406 slidersDlg->setLayout(sliderLayout);
416 vtkSmartPointer<vtkPiecewiseFunction> compositeOpacity = vtkSmartPointer<vtkPiecewiseFunction>::New();
419 compositeOpacity->AddPoint(range[0], 0.0);
420 compositeOpacity->AddPoint(range[1], 1.0);
428 vtkSmartPointer<vtkColorTransferFunction> color = vtkSmartPointer<vtkColorTransferFunction>::New();
435 double incr = (range[1]-range[0])/100;
436 for(
double j = range[0]; j <= range[1]; j += incr)
441 color->AddRGBPoint(j, colour[0], colour[1], colour[2]);
466 vtkSmartPointer<vtkVolumeProperty> volumeProperty = vtkSmartPointer<vtkVolumeProperty>::New();
467 volumeProperty->SetScalarOpacity(compositeOpacity);
468 volumeProperty->SetColor(color);
470 volumeProperty->ShadeOn();
471 volumeProperty->SetAmbient(0.6);
472 volumeProperty->SetDiffuse(0.4);
473 volumeProperty->SetSpecular(0.2);
475 volumeProperty->SetInterpolationTypeToNearest();
477 volumeProperty->SetInterpolationTypeToLinear();
480 volume = vtkSmartPointer<vtkVolume>::New();
481 volume->SetProperty(volumeProperty);
484 vtkSmartPointer<vtkSmartVolumeMapper> volumeMapper = vtkSmartPointer<vtkSmartVolumeMapper>::New();
485 volumeMapper->SetBlendModeToComposite();
486 #if VTK_MAJOR_VERSION <= 5 487 volumeMapper->SetInputConnection(img->GetProducerPort());
489 volumeMapper->SetInputData(img);
492 volumeMapper->SetInterpolationModeToNearestNeighbor();
494 volumeMapper->SetInterpolationModeToLinear();
495 volumeMapper->SetRequestedRenderModeToDefault();
496 #if !defined(VTK_LEGACY_REMOVE) && (VTK_MAJOR_VERSION <= 5 || (VTK_MAJOR_VERSION == 6 && VTK_MINOR_VERSION <= 2)) 497 volumeMapper->SetRequestedRenderModeToRayCastAndTexture();
498 #else // VTK_LEGACY_REMOVE 499 if(milxQtRenderWindow::GetRenderWindow()->IsDirect() && milxQtRenderWindow::GetRenderWindow()->SupportsOpenGL())
501 printDebug(
"Requesting GPU Volume Rendering");
502 volumeMapper->SetRequestedRenderModeToGPU();
508 volume->SetMapper(volumeMapper);
530 if(xLabel.isEmpty() || yLabel.isEmpty())
533 xLabel = QInputDialog::getText(
this, tr(
"Please Provide the name of the x-axis"),
534 tr(
"x-Axis Name:"), QLineEdit::Normal,
"x", &ok1);
535 yLabel = QInputDialog::getText(
this, tr(
"Please Provide the name of the y-axis"),
536 tr(
"y-Axis Name:"), QLineEdit::Normal,
"y", &ok2);
545 zLabel = QInputDialog::getText(
this, tr(
"Please Provide the name of the z-axis"),
546 tr(
"z-Axis Name:"), QLineEdit::Normal,
"z", &ok3);
554 templateChart->GetPlot(0)->GetXAxis()->SetTitle(xLabel.toStdString().c_str());
555 templateChart->GetPlot(0)->GetYAxis()->SetTitle(yLabel.toStdString().c_str());
570 if(newTitle.isEmpty())
573 newTitle = QInputDialog::getText(
this, tr(
"Please Provide the name of the title"),
574 tr(
"Title Name:"), QLineEdit::Normal,
"", &ok1);
623 vtkPlotPoints::SafeDownCast(plot)->SetMarkerStyle(vtkPlotPoints::DIAMOND);
625 vtkPlotPoints::SafeDownCast(plot)->SetMarkerStyle(vtkPlotPoints::NONE);
643 vtkDataArray *data = vtkDataArray::SafeDownCast(plot->GetInput()->GetColumn(1));
644 data->GetRange(range);
646 vtkAxis *axis = plot->GetYAxis();
649 axis->SetLogScale(
true);
650 #if ( (VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION >= 8) || (VTK_MAJOR_VERSION > 5) ) 651 double scaleMin = log(range[0]);
652 double scaleMax = log(range[1]);
653 axis->SetRange(scaleMin, scaleMax);
658 axis->SetLogScale(
false);
659 #if ( (VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION >= 8) || (VTK_MAJOR_VERSION > 5) ) 660 double scaleMin = range[0];
661 double scaleMax = range[1];
662 axis->SetRange(scaleMin, scaleMax);
675 scale = vtkSmartPointer<vtkScalarBarActor>::New();
677 scalarBar = vtkSmartPointer<vtkScalarBarWidget>::New();
681 msgBox.setText(
"An auto adjusted bar is about to be created");
682 msgBox.setInformativeText(
"Would you like to customise the bar?");
683 msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
684 msgBox.setDefaultButton(QMessageBox::No);
685 int ret = msgBox.exec();
687 const float barWidth = 0.1, barHeight = 0.7;
689 if(ret == QMessageBox::Yes)
691 bool ok1, ok2, ok3, ok4;
693 double minRange = QInputDialog::getDouble(
this, tr(
"Enter Table Range of new Lookup Table"),
694 tr(
"Minimum:"), 0, -2147483647, 2147483647, 5, &ok1);
695 double maxRange = QInputDialog::getDouble(
this, tr(
"Enter Table Range of new Lookup Table"),
696 tr(
"Maximum:"), 1.0, -2147483647, 2147483647, 5, &ok2);
697 int noOfLabels = QInputDialog::getInt(
this, tr(
"How many labels to show"),
698 tr(
"Labels:"), 3, 0, 99, 1, &ok3);
699 title = QInputDialog::getText(
this, tr(
"Title of Bar"),
700 tr(
"Title:"), QLineEdit::Normal,
703 if(!ok1 || !ok2 || !ok3 || !ok4)
707 scale->SetNumberOfLabels(noOfLabels);
715 slideInterval = (maxRange-minRange)/tickNumber;
716 vtkSmartPointer<vtkPiecewiseFunction> compositeOpacity = volume->GetProperty()->GetScalarOpacity();
717 compositeOpacity->RemoveAllPoints();
718 compositeOpacity->AddPoint(minRange, 0.0);
719 compositeOpacity->AddPoint(maxRange, 0.2);
727 customScalarBar =
true;
738 slideInterval = (range[1]-range[0])/tickNumber;
739 vtkSmartPointer<vtkPiecewiseFunction> compositeOpacity = volume->GetProperty()->GetScalarOpacity();
740 compositeOpacity->RemoveAllPoints();
741 compositeOpacity->AddPoint(range[0], 0.0);
742 compositeOpacity->AddPoint(range[1], 0.2);
751 scale->SetNumberOfLabels(3);
752 customScalarBar =
false;
754 scale->SetTitle(title.toStdString().c_str());
755 scale->GetLabelTextProperty()->SetFontFamilyToArial();
756 scale->GetLabelTextProperty()->SetFontSize(8);
757 scale->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
758 scale->GetPositionCoordinate()->SetValue(.2,.05);
759 scale->SetWidth( barWidth );
760 scale->SetHeight( barHeight );
761 scale->SetPosition( 0.99 - barWidth, 0.1 );
762 scale->SetLabelFormat(
"%-#6.3f");
763 scale->GetTitleTextProperty()->SetFontFamilyToArial();
764 scale->GetTitleTextProperty()->SetFontSize(8);
765 scale->GetLabelTextProperty()->SetJustificationToCentered();
769 scale->GetLabelTextProperty()->SetColor(0, 0, 0);
770 scale->GetTitleTextProperty()->SetColor(0, 0, 0);
774 scalarBar->SetInteractor(QVTKWidget::GetInteractor());
806 vtkSmartPointer<vtkColorTransferFunction> color = vtkSmartPointer<vtkColorTransferFunction>::New();
809 double incr = (range[1]-range[0])/100;
810 for(
double j = range[0]; j <= range[1]; j += incr)
815 color->AddRGBPoint(j, colour[0], colour[1], colour[2]);
829 volume->GetProperty()->SetColor(color);
852 QString message =
"Coordinates Unsupported at the moment.";
897 const float value1 = lowSldr->minimum() + lowSldr->value()*slideInterval;
898 const float value2 = highSldr->minimum() + highSldr->value()*slideInterval;
899 printDebug(
"Slider Min Value: " + QString::number(value1));
900 printDebug(
"Slider Max Value: " + QString::number(value2));
902 vtkSmartPointer<vtkPiecewiseFunction> compositeOpacity = volume->GetProperty()->GetScalarOpacity();
903 compositeOpacity->RemoveAllPoints();
904 compositeOpacity->AddPoint(value1, 0.0);
905 compositeOpacity->AddPoint(value2, 0.2);
915 xAxisName->setText(QApplication::translate(
"Plot",
"Rename &Axes", 0, QApplication::UnicodeUTF8));
918 titleName->setText(QApplication::translate(
"Plot",
"Rename &Title", 0, QApplication::UnicodeUTF8));
921 legendAct->setText(QApplication::translate(
"Plot",
"Legend", 0, QApplication::UnicodeUTF8));
926 pointsAct->setText(QApplication::translate(
"Plot",
"Show Points", 0, QApplication::UnicodeUTF8));
927 pointsAct->setShortcut(tr(
"Shift+Alt+l"));
931 logScaleAct->setText(QApplication::translate(
"Plot",
"Log Scale", 0, QApplication::UnicodeUTF8));
953 contextMenu->setTitle(QApplication::translate(
"MainWindow",
"Plotting", 0, QApplication::UnicodeUTF8));
QAction * scaleAct
Action for the scale bar of the display.
void printError(QString msg)
Error message wrapper for console.
std::vector< float > opacityTransferValues
values for volume rendering opacity transfer function
void createConnections()
Create the connections for context menu etc.
QAction * outlineAct
show outline action
QAction * saveViewFileAct
Save camera view to file.
QMenu * viewMenu
Context Menu.
void setName(const QString filename)
Set the name of the data.
void renameTitle(QString newTitle="")
Rename the title of the plot.
vtkSmartPointer< vtkPolyDataMapper > modelMapper
Model mapper.
vtkSmartPointer< vtkRenderer > renderer
Renderer for the data.
void surfacePlot(vtkSmartPointer< vtkImageData > img, const int zDirection=2)
Display a surface plot from image data given.
void generateVertices(float red=defaultColour, float green=defaultColour, float blue=defaultColour)
Generates the vertices for the dataset. Arguments provided are for the colours of the vertices...
vtkSmartPointer< vtkLookupTable > lookupTable
Lookup table for the shapes/images, base class is used to allow references to different look up table...
void logScale(const bool showIt=true)
Show/hide log scale (of the y-axis) for the line plot.
void enableCubeAxes(double *range=NULL, double *bounds=NULL)
Display cube (plot) axes of data.
QAction * viewZY
Change view to zy-plane (Coronal)
void AddVolume(vtkSmartPointer< vtkVolume > actor)
Add a VTK volume to this window.
QMenu * contextMenu
Context Menu.
bool plotTypeGPU
Use GPU whenever possible?
virtual void updateVolumePlot(int value)
Updates the volume rendering display. Used when slider values are changed.
vtkSmartPointer< vtkOrientationMarkerWidget > humanGlyph
Glyph for showing equivalent view on human.
void contextMenuEvent(QContextMenuEvent *event)
The context menu setup member.
QAction * titleName
Action for title name.
QAction * humanAct
Show human view orientation glyph?
void SetInput(vtkSmartPointer< vtkPolyData > mesh)
Assigns the mesh provided to the class, preparing for display. Call generateModel() and then show() t...
void scaleDisplay()
Toggles the scale bar display.
void setDeletableOnClose(bool delOnClose)
Set if the window deletable on close. Default is true.
bool plotType2D
2D plot type?
QList< QMenu * > menusToAdd
Context Menu's to add.
QAction * backgroundAct
Action for axes of the display.
virtual void updateLookupTable()
Sets the necessary LUTs to model view.
QString prefix
Prefix of the data.
virtual ~milxQtPlot()
Default destructor.
vtkSmartPointer< vtkPolyData > & Result()
Returns the current model, i.e. the result of the latest operation.
void printDebug(QString msg)
Debug message wrapper for console.
void enableScale(QString title="")
Enable scale bar display with the title provided.
This class represents the MILX Qt Model/Mesh Display object using VTK.
std::vector< float > colourTransferValues
values for volume rendering colour transfer function
virtual void scaleDisplay(const bool forceDisplay=false)
Toggles the scale bar display.
bool plotType3D
3D plot type?
virtual void updateCoords(vtkObject *obj)
Picks the coordinates and pixel value from the current mouse position in the window.
milxQtPlot(QWidget *theParent=0, bool contextSystem=true)
Default constructor.
void Render()
Force Render or Update of the display.
void renameAxes(QString xLabel="", QString yLabel="", QString zLabel="")
Rename the axes.
bool sourceEightbit
Table/data loaded is eightbit?
QMenu * basicContextMenu()
Return the basic context menu with the milxQtModel class ordering. This is for the benefit of derived...
vtkSmartPointer< vtkChartXY > templateChart
chart (used only for xy scatter plot)
QAction * cubeAxesAct
show cube axes action
QAction * refreshAct
Action for refreshing the display.
void resultAvailable(milxQtRenderWindow *)
Send signal that Resultant render window is available for showing.
void generatePlot()
Generate appropriate plot from the table of data provided by SetInput().
bool scaleBefore
scale displayed?
void enableActionBasedOnView()
Enables the view actions corresponding to current view set.
QAction * legendAct
Action for showing legend.
QMenu * contourMenu
Contour Menu.
vtkSmartPointer< vtkTable > table
data presented as a table
void generateModel(float red=defaultColour, float green=defaultColour, float blue=defaultColour)
Generates the model so that its ready for display. It requires that data has been set or assigned alr...
QAction * logScaleAct
Action for showing a log scale.
void SetRenderer(vtkRenderer *rnder)
Assigns a VTK Renderer object.
void SetPoints(vtkSmartPointer< vtkPoints > modelPoints)
Sets the points for the model to be generated. Must pass a vtkPoints objects, which is easy to use...
virtual void updateCoords(vtkObject *obj)
Picks the coordinates and pixel value from the current mouse position in the window.
virtual void updateLookupTable()
Sets the necessary LUTs to model view.
QAction * resetAct
Action for refreshing the display.
QMenu * colourMapMenu
Colour map menu.
void generateRender()
Generate the render so it is ready for display. Should be called before showing the window...
virtual void disableScale()
Disables the scale bar display.
void linkProgressEventOf(vtkObject *obj)
Link the progress of filters etc to keep the UI responsive.
QAction * saveViewAct
Save camera view.
int xIndex
x axis index of table
int displaceAxis
warp axis for surface plots
QAction * viewXY
Change view to xy-plane (Axial)
int yIndex
y axis index of table
vtkSmartPointer< vtkImageData > imageData
data presented as a image
void createActions()
Create the actions for context menu etc.
QList< QAction * > actionsToAdd
Context actions to add.
bool sourceLoaded
Table/data loaded in class?
QAction * xAxisName
Action for x-axis name.
QAction * viewZX
Change view to zx-plane (Sagittal)
virtual void createMenu(QMenu *menu)
Create the menu for the data in this object. Used for context menu and file menus.
void points(const bool showIt=true)
Show/hide points for the line plot.
int zIndex
z axis index of table
void done(int value)
Send signal that computation is done. Value carries the progress,.
vtkSmartPointer< vtkScalarBarActor > scale
Scale for the display.
QAction * pointsAct
Action for showing line points.
milx::Model model
Actual model and its operations (from SMILI)
bool plotTypeVolume
2D plot type?
bool plotTypeSurface
2D plot type?
void printInfo(QString msg)
Info message wrapper for console.
void volumePlot(vtkSmartPointer< vtkImageData > img, const bool eightbit, const bool quiet=false)
Display a volume plot from data in image given.
void scatterPlot(vtkSmartPointer< vtkTable > table, const int xColumn, const int yColumn)
Display a scatter x-y plot from data in table given at column indices x and y.
void working(int value)
Send signal that computation is in progress. Value carries the progress,.
vtkSmartPointer< vtkScalarBarWidget > scalarBar
Scalar Bar Widget for the display.
QMenu * windowPropertiesMenu
Context Menu.
void legend(const bool showIt=true)
Show/hide legend for plot.
vtkSmartPointer< vtkCubeAxesActor > cubeAxesActor
outline box
QStatusBar * updateBar
Pointer to bar, not allocated or deleted. To be passed to only.
void refresh()
Refresh the display of the window.
void normals(const bool turnOn=false)
Shows the point normals of the model.
QAction * loadViewAct
Load camera view.
virtual vtkDataSet * GetDataSet()
Get the underlying data, return the vtkImageData object if volume plot else polydata, useful for getting scalar range etc.
virtual void colourMapToJet(double minRange=0.0, double maxRange=0.0)
Change the colour map to Jet.
QAction * loadViewFileAct
Load camera view to file.
QString name
Name of the data.