SMILX  1.01
milxQtRenderWindow.h
1 /*=========================================================================
2  The Software is copyright (c) Commonwealth Scientific and Industrial Research Organisation (CSIRO)
3  ABN 41 687 119 230.
4  All rights reserved.
5 
6  Licensed under the CSIRO BSD 3-Clause License
7  You may not use this file except in compliance with the License.
8  You may obtain a copy of the License in the file LICENSE.md or at
9 
10  https://stash.csiro.au/projects/SMILI/repos/smili/browse/license.txt
11 
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17 =========================================================================*/
18 #ifndef MILXQTRENDERWINDOW_H
19 #define MILXQTRENDERWINDOW_H
20 
21 #include "milxQtWindow.h"
22 
23 #include <vtkSmartPointer.h>
24 #include <vtkRenderWindow.h>
25 #include <vtkRenderer.h>
26 #include <vtkCamera.h>
27 #include <vtkActor.h>
28 #include <vtkActor2D.h>
29 #include <vtkActorCollection.h>
30 #include <vtkAxesActor.h>
31 #include <vtkLookupTable.h>
32 #include <vtkImageData.h>
33 #include <vtkImageActor.h>
34 #include <vtkEventQtSlotConnect.h>
35 #include <vtkTable.h>
36 #include <vtkScalarBarActor.h>
37 //Widgets
38 #include <vtkScalarBarWidget.h>
39 #include <vtkContourWidget.h>
40 #include <vtkLineWidget2.h>
41 #include <vtkDistanceWidget.h>
42 #include <vtkBiDimensionalWidget.h>
43 #include <vtkAngleWidget.h>
44 #include <vtkPlaneWidget.h>
45 #include <vtkBoxWidget2.h>
46 #include <vtkSphereRepresentation.h>
47 #include <vtkSphereWidget2.h>
48 #include <vtkOrientationMarkerWidget.h>
49 #include <vtkTextWidget.h>
50 
51 //Enum for views
52 enum ViewType { AXIAL = 0, CORONAL = 1, SAGITTAL = 2 };
53 enum ViewerType { SINGLE = 0, SCANNER = 1};
54 enum OrientationType { RADIOLOGICAL = 0, NEUROLOGICAL = 1};
55 
56 //Struct for image actors, since actors per view is only possible need to link to parent (otherwise you get white actor)
58 {
59  vtkSmartPointer<vtkImageActor> parentActor; //The parent actor it's connected to
60  vtkSmartPointer<vtkImageActor> imageActor; //image actor to display in 3D view
61 };
62 
63 class LabelledAction : public QWidgetAction {
64 public:
65  LabelledAction (const QString& title, QPixmap pix, QWidget *theParent = 0) :
66  QWidgetAction(theParent) {
67  pWidget = new QWidget(theParent);
68  pLayout = new QHBoxLayout();
69  pLabel = new QLabel(title);
70  pPixmapLabel = new QLabel(title);
71  pPixmapLabel->setPixmap(pix);
72  pPixmapLabel->setScaledContents(true);
73  pLayout->addWidget (pPixmapLabel);
74  pLayout->addWidget (pLabel);
75  pWidget->setLayout (pLayout);
76  setDefaultWidget(pWidget);
77  }
78 
79  QLabel* label() {
80  return pLabel;
81  }
82  QLabel* pixmapLabel() {
83  return pPixmapLabel;
84  }
85 
86 private:
87  QLabel *pLabel;
88  QLabel *pPixmapLabel;
89  QWidget* pWidget;
90  QHBoxLayout* pLayout;
91 };
92 
105 
127 {
128  Q_OBJECT
129 
130 public:
135  milxQtRenderWindow(QWidget *theParent = 0, bool contextSystem = true);
140  virtual ~milxQtRenderWindow();
141 
150  void contextMenuSystem(bool context);
151 
156  inline void AddActor(vtkSmartPointer<vtkProp> actor)
157  {
158  renderer->AddActor(actor);
159  }
164  inline void AddVolume(vtkSmartPointer<vtkVolume> actor)
165  {
166  renderer->AddVolume(actor);
167  }
172  inline void AddActor2D(vtkSmartPointer<vtkProp> actor)
173  {
174  renderer->AddActor2D(actor);
175  }
176 
181  inline void SetActor(vtkSmartPointer<vtkProp> actor)
182  {
183  renderer->AddActor(actor);
184  }
189  inline void SetActor2D(vtkSmartPointer<vtkProp> actor)
190  {
191  renderer->AddActor2D(actor);
192  }
197  inline void SetBackground(double red, double green, double blue)
198  {
199  renderer->GradientBackgroundOff();
200  renderer->SetBackground(red, green, blue);
201  }
206  inline void SetSize(int height, int width)
207  {
208  QVTKWidget::GetRenderWindow()->SetSize(width, height);
209  int *winSize = QVTKWidget::GetRenderWindow()->GetSize();
210  QVTKWidget::resize(winSize[0],winSize[1]);
211  }
216  inline void SetLookupTable(vtkSmartPointer<vtkLookupTable> lut)
217  {
218  lookupTable = lut;
219  }
220 
225  inline void RemoveAllActors()
226  {
227  renderer->RemoveAllViewProps();
228  }
233  inline void RemoveActor(vtkSmartPointer<vtkProp> actor)
234  {
235  renderer->RemoveActor(actor);
236  }
241  inline void RemoveActor2D(vtkSmartPointer<vtkProp> actor)
242  {
243  renderer->RemoveActor(actor);
244  }
245 
249  inline vtkActorCollection* GetActors()
250  {
251  return renderer->GetActors();
252  }
256  inline vtkVolumeCollection* GetVolumes()
257  {
258  return renderer->GetVolumes();
259  }
263  inline virtual vtkImageActor* GetImageActor()
264  {
265  if(!imageActors.empty())
266  return imageActors.last().imageActor; //Implement in derived class
267  else
268  return NULL;
269  }
274  inline vtkLookupTable* GetLookupTable()
275  {
276  return lookupTable;
277  }
282  inline void SetScalarBar(vtkScalarBarActor* bar)
283  {
284  scalarBar->SetScalarBarActor(bar);
285  }
290  inline vtkScalarBarActor* GetScalarBar()
291  {
292  return scale;
293  }
298  inline void GetBackground(double &red, double &green, double &blue)
299  {
300  renderer->GetBackground(red, green, blue);
301  }
307  inline virtual vtkDataSet* GetDataSet()
308  {
309  return NULL; //Implement in derived class that uses images
310  }
311 
316  inline void SetRenderer(vtkRenderer* rnder)
317  {
318  renderer = rnder;
319  }
324  inline vtkRenderer* GetRenderer()
325  {
326  return renderer;
327  }
331  inline virtual vtkRenderWindowInteractor* GetVTKInteractor()
332  {
333  return QVTKWidget::GetRenderWindow()->GetInteractor();
334  }
335 
340  inline void OffScreenRenderingOn()
341  {
342  QVTKWidget::GetRenderWindow()->OffScreenRenderingOn();
343  }
348  inline void OffScreenRenderingOff()
349  {
350  QVTKWidget::GetRenderWindow()->OffScreenRenderingOff();
351  }
352 
357  inline void Render()
358  {
359  QVTKWidget::GetRenderWindow()->Render();
360  }
361 
366  void enableUpdates(QStatusBar *bar);
367 
368 public slots:
373  void addModelActor(vtkSmartPointer<vtkActor> mdlActor);
378  void removeModelActor(vtkSmartPointer<vtkActor> mdlActor);
383  void addActor(vtkSmartPointer<vtkActor> imgActor, vtkMatrix4x4 *transformMatrix = NULL);
388  void addImageActor(vtkSmartPointer<vtkImageActor> imgActor, vtkMatrix4x4 *transformMatrix = NULL);
393  void removeImageActor(vtkSmartPointer<vtkImageActor> imgActor);
398  void importFrom(milxQtRenderWindow *windowToImportFrom);
403  inline void importViewFrom(milxQtRenderWindow *windowToImportFrom)
404  { importFrom(windowToImportFrom); }
409  virtual void updateTextActor(vtkObject * obj, unsigned long, void * client_data, void *, vtkCommand * command);
414  virtual void updateImageActor(vtkObject * obj, unsigned long, void * client_data, void *, vtkCommand * command);
415  virtual void updateImageActor(vtkSmartPointer<vtkImageActor> actor);
416 
417  void userEvent(QMouseEvent *event = NULL);
418  void userEvent(QKeyEvent *event);
419  void userEvent(QWheelEvent *event);
420 
425  void refresh();
430  inline vtkSmartPointer<vtkMatrix4x4> getTransformMatrix()
431  { return transformMatrix; }
436  void reset();
441  inline bool isLoaded()
442  {
443  return loaded;
444  }
449  void linkProgressEventOf(vtkObject * obj);
454  virtual void updateCoords(vtkObject *obj);
459  virtual void contour();
464  void contourAsPolyData();
469  void contourAsNodePolyData();
474  void contourInitFromPolyData(QString filename = "");
479  void enableAxes(float xScale = 1.0, float yScale = 1.0, float zScale = 1.0);
484  void disableAxes();
489  void axesDisplay();
494  void disableOrient();
499  void orientDisplay();
504  virtual void background(bool white = false);
509  void lighting();
514  void textDisplay();
519  void crosshair();
520 
521  //Viewing
526  virtual void viewToXYPlane();
527  inline void viewToAxial()
528  {
529  viewToXYPlane();
530  }
535  virtual void viewToZXPlane();
536  inline void viewToCoronal()
537  {
538  viewToZXPlane();
539  }
544  virtual void viewToZYPlane();
545  inline void viewToSagittal()
546  {
547  viewToZYPlane();
548  }
557  { return orientationView; }
565  inline void setDefaultOrientation(int orientMode)
566  { orientationView = orientMode; }
572  inline int getView()
573  { return currentView; }
579  void setView(int viewMode);
584  void enableActionBasedOnView();
591  inline void disableDefaultView()
592  { useDefaultView = false; }
599  inline void enableDefaultView()
600  { useDefaultView = true; }
606  inline void setDefaultView(int viewMode)
607  { defaultView = viewMode; }
612  void saveView(QString filename = "");
613  void saveViewFile();
618  void loadView(QString filename = "");
619  void loadViewFile();
626  virtual void enableScale(QString title = "", const bool quiet = false, double minRange = 0.0, double maxRange = 0.0, int noOfLabels = 3) {}
631  virtual void disableScale();
636  virtual inline void enableCrosshair()
637  {
638  if(rendered)
639  {
640  renderWindow->SetCurrentCursor(VTK_CURSOR_CROSSHAIR);
641  crosshairAct->setChecked(true);
642  }
643  }
648  virtual inline void disableCrosshair()
649  {
650  renderWindow->SetCurrentCursor(0);
651  crosshairAct->setChecked(false);
652  }
653 
660  virtual void scaleDisplay(const bool forceDisplay = false) {}
665  virtual void colourMapToRainbow(double minRange = 0.0, double maxRange = 0.0);
670  virtual void colourMapToVTK(double minRange = 0.0, double maxRange = 0.0);
675  virtual void colourMapToGray(double minRange = 0.0, double maxRange = 0.0);
680  virtual void colourMapToSeismic(double minRange = 0.0, double maxRange = 0.0);
685  virtual void colourMapToLogGray(double minRange = 0.0, double maxRange = 0.0);
690  virtual void colourMapToJet(double minRange = 0.0, double maxRange = 0.0);
695  virtual void colourMapToNIH(double minRange = 0.0, double maxRange = 0.0);
700  virtual void colourMapToNIH_Fire(double minRange = 0.0, double maxRange = 0.0);
705  virtual void colourMapToAAL(double minRange = 0.0, double maxRange = 0.0);
710  virtual void colourMapToFS(double minRange = 0.0, double maxRange = 0.0);
715  virtual void colourMapToHOT(double minRange = 0.0, double maxRange = 0.0);
720  virtual void colourMapToCOOL(double minRange = 0.0, double maxRange = 0.0);
725  virtual void colourMapToCOOLWARM(double minRange = 0.0, double maxRange = 0.0);
730  virtual void colourMapToKnee(double minRange = 0.0, double maxRange = 0.0);
735  virtual void colourMapToBone(double minRange = 0.0, double maxRange = 0.0);
740  virtual void colourMapToSpectral(double minRange = 0.0, double maxRange = 0.0);
745  virtual void colourMapToGNUPlot(double minRange = 0.0, double maxRange = 0.0);
750  virtual void colourMapToCubeHelix(double minRange = 0.0, double maxRange = 0.0);
755  virtual void colourMapToHSV(double minRange = 0.0, double maxRange = 0.0);
760  virtual void updateLookupTable();
761 
769  void generateRender();
770 
771  //Custom
776  inline void setCustomActionGroup(QActionGroup *actionGrp)
777  {
778  windowActionGroup = actionGrp;
779  }
784  void createCustomConnections(QList<QAction *> actionsInMenu);
789  void createCustomConnections(QMenu *fromMenu);
796  virtual void customOperation();
797 
802  virtual void createMenu(QMenu *menu);
803 
811  bool openModelUsingQt(const QString filename, vtkSmartPointer<vtkPolyData> &data);
812 
813 signals:
818  void imageAvailable(vtkImageData*, QString );
823  void modelAvailable(vtkPolyData*, QString );
828  void tableToPlot(vtkSmartPointer<vtkTable>, QString);
833  void modified(vtkSmartPointer<vtkImageActor> );
834 
835 protected:
836  //Flags
837  bool loaded;
838  bool rendered;
839  bool axesBefore;
840  bool scaleBefore;
841  bool customScalarBar;
842  bool logScale;
846 
847  //Variables
851 
852  //Window Menu
854  QAction* backgroundAct;
855  QAction* axesAct;
856  QAction* lightingAct;
857  QAction* lineAct;
858  QAction* distanceAct;
859  QAction* biDirectionAct;
860  QAction* angleAct;
861  QAction* planeAct;
862  QAction* boxAct;
863  QAction* sphereAct;
864  QAction* humanAct;
865  QAction* textAct;
866  QAction* crosshairAct;
867 
868  //Contouring Menu
869  QMenu* contourMenu;
870  QAction* contourAct;
873  QAction* contourInitAct;
874 // QAction* contourImageAct; //!< Save contour surface points as binary image.
875 
876  //View Menu
877  QMenu* viewMenu;
878  QActionGroup* viewGroup;
879  QAction* viewXY;
880  QAction* viewZY;
881  QAction* viewZX;
882  QAction* saveViewAct;
883  QAction* loadViewAct;
884  QAction* saveViewFileAct;
885  QAction* loadViewFileAct;
886  QAction* scaleAct;
887  QMenu* colourMapMenu;
888  QActionGroup* mapGroup;
889  QAction* actionDefault;
890  QAction* actionJet;
891  QAction* actionRainbow;
892  QAction* actionInvRainbow;
895  QAction* actionLogGray;
896  QAction* actionNIH;
897  QAction* actionNIH_FIRE;
898  QAction* actionAAL;
899  QAction* actionFS;
901  QAction* actionCOOL;
903  QAction* actionKnee;
909 
910  //Actions
911  QAction* resetAct;
912  QAction* refreshAct;
913 
915 
916  vtkSmartPointer<vtkEventQtSlotConnect> Connector;
917  vtkSmartPointer<vtkMatrix4x4> transformMatrix;
918 
919  //VTK Rendering Internals
920  vtkSmartPointer<vtkRenderer> renderer;
921  vtkSmartPointer<vtkRenderWindow> renderWindow;
922  vtkSmartPointer<vtkLookupTable> lookupTable;
923  vtkSmartPointer<vtkCamera> camera;
924 
925  vtkSmartPointer<vtkScalarBarActor> scale;
926  vtkSmartPointer<vtkScalarBarWidget> scalarBar;
927  vtkSmartPointer<vtkAxesActor> axes;
928  vtkSmartPointer<vtkAxesActor> orientAxes;
929  vtkSmartPointer<vtkPointPicker> dataPicker;
930 
931  //Widgets
932  vtkSmartPointer<vtkContourWidget> contourWidget;
933  vtkSmartPointer<vtkLineWidget2> lineWidget;
934  vtkSmartPointer<vtkDistanceWidget> distanceWidget;
935  vtkSmartPointer<vtkBiDimensionalWidget> biDirectionWidget;
936  vtkSmartPointer<vtkAngleWidget> angleWidget;
937  vtkSmartPointer<vtkPlaneWidget> planeWidget;
938  vtkSmartPointer<vtkBoxWidget2> boxWidget;
939  vtkSmartPointer<vtkSphereRepresentation> sphereRep;
940  vtkSmartPointer<vtkSphereWidget2> sphereWidget;
941  vtkSmartPointer<vtkOrientationMarkerWidget> humanGlyph;
942  QList< vtkSmartPointer<vtkTextWidget> > textWidgets;
943  QList< vtkSmartPointer<vtkTextActor> > textActors;
944  QList<ImageActorItem> imageActors;
945 
946  QStatusBar *updateBar;
947 
948  QActionGroup* windowActionGroup;
949 
954  void createActions();
959  void createConnections();
964  void contextMenuEvent(QContextMenuEvent *event);
969  QMenu* colourMapsMenu();
974  void dragMoveEvent(QDragMoveEvent *event);
979  void dragLeaveEvent(QDragLeaveEvent *event);
984  void dragEnterEvent(QDragEnterEvent *event);
989  void mouseDoubleClickEvent(QMouseEvent *event);
994  void dropEvent(QDropEvent *event);
995 
1000  virtual void SetupWidgets(vtkRenderWindowInteractor *interactor);
1001 
1006  void setupHumanGlyph(vtkSmartPointer<vtkMatrix4x4> mat = NULL);
1007 
1008 private:
1009 
1010 };
1011 
1012 #endif // MILXQTRENDERWINDOW_H
QAction * scaleAct
Action for the scale bar of the display.
vtkLookupTable * GetLookupTable()
Get the lookup table of the colours in display window.
int defaultView
Default view for data (default is axial)
QPoint dragStartPosition
Dragging helper variable.
bool logScale
Using custom scalar bar?
int getDefaultOrientation()
Get the orientation mode to one of the supported standards.
vtkSmartPointer< vtkAxesActor > axes
Axes for the model.
void RemoveActor(vtkSmartPointer< vtkProp > actor)
Remove the VTK actor from this window.
LabelledAction * actionGNUPlot
GNUPlot colours.
QAction * saveViewFileAct
Save camera view to file.
LabelledAction * actionHSV
Cube Helix colours.
QMenu * viewMenu
Context Menu.
vtkSmartPointer< vtkBoxWidget2 > boxWidget
Used for measuring angles.
void disableDefaultView()
Disables the default view whenever data is process or displayed. Enabled by default.
QAction * lightingAct
Action for two-sided lighting of the display.
int currentView
Current view for data.
virtual void enableScale(QString title="", const bool quiet=false, double minRange=0.0, double maxRange=0.0, int noOfLabels=3)
Enable scale bar display with the title provided.
QActionGroup * windowActionGroup
used for the custom menu
void SetActor(vtkSmartPointer< vtkProp > actor)
Add a VTK actor to this window. Alias for AddActor.
vtkActorCollection * GetActors()
Get all the actors in the render window.
vtkSmartPointer< vtkContourWidget > contourWidget
contour interaction
vtkSmartPointer< vtkRenderer > renderer
Renderer for the data.
void AddActor(vtkSmartPointer< vtkProp > actor)
Add a VTK actor to this window.
QAction * actionNIH_FIRE
NIH_FIRE colours.
This class represents the MILX Qt Render Window Display object using QVTK.
vtkSmartPointer< vtkAngleWidget > angleWidget
Used for measuring angles.
void RemoveActor2D(vtkSmartPointer< vtkProp > actor)
Remove the VTK 2D actor from this window.
vtkSmartPointer< vtkLookupTable > lookupTable
Lookup table for the shapes/images, base class is used to allow references to different look up table...
void SetActor2D(vtkSmartPointer< vtkProp > actor)
Add a VTK actor to this window. Alias for AddActor2D.
QAction * viewZY
Change view to zy-plane (Coronal)
void AddVolume(vtkSmartPointer< vtkVolume > actor)
Add a VTK volume to this window.
QAction * actionNIH
NIH colours.
bool loaded
Loaded Image from file?
bool axesBefore
Axes displayed?
QAction * actionLogGray
Logarithmic Gray colours.
vtkSmartPointer< vtkBiDimensionalWidget > biDirectionWidget
Used for measuring cross distances.
vtkSmartPointer< vtkMatrix4x4 > transformMatrix
Transform matrix for actor(s)
QAction * actionKnee
Knee colours.
QAction * axesAct
Action for axes of the display.
virtual vtkDataSet * GetDataSet()
Get the data, Implement in derived class that uses data derived from vtkDataSet, like vtkPolyData or ...
QAction * boxAct
Action for box drawing display.
void SetLookupTable(vtkSmartPointer< vtkLookupTable > lut)
Set the lookup table of the colours in display window.
vtkSmartPointer< vtkOrientationMarkerWidget > humanGlyph
Glyph for showing equivalent view on human.
QAction * crosshairAct
Action for crosshair.
void setCustomActionGroup(QActionGroup *actionGrp)
Set the action group for the menu with custom connections.
LabelledAction * actionCubeHelix
Cube Helix colours.
This class represents the MILX Qt Window Display object using QVTK.
Definition: milxQtWindow.h:40
QAction * humanAct
Show human view orientation glyph?
QAction * actionInvRainbow
Inv Default colours.
QAction * backgroundAct
Action for axes of the display.
LabelledAction * actionSpectral
Spectral colours.
vtkSmartPointer< vtkDistanceWidget > distanceWidget
Used for measuring distances.
vtkSmartPointer< vtkLineWidget2 > lineWidget
Used for drawing lines.
QActionGroup * viewGroup
Grouping for check boxes.
QAction * contourPolyDataAct
Save contour surface points as polydata.
QAction * lineAct
Action for distance measuring display.
virtual void disableCrosshair()
Restores the mouse pointer to default.
QAction * actionRainbow
Default colours.
QAction * actionDefault
Default colours.
QAction * contourAct
Action for contouring surface points using Dijkstras algorithm.
bool orientationAxes
Display orientation (posterior etc.) axes?
void OffScreenRenderingOn()
Enable off-screen rendering, which is faster for large datasets in some instances.
QList< ImageActorItem > imageActors
Images actors being displayed in model view.
void Render()
Force Render or Update of the display.
LabelledAction * actionBone
Spectral colours.
void OffScreenRenderingOff()
Disable off-screen rendering, which is faster for large datasets in some instances.
void setDefaultOrientation(int orientMode)
Change orientation mode to one of the supported standards. Default: Radiological. ...
#define MILXQT_EXPORT
Define Windows DLL importing.
Definition: milxQtAliases.h:80
QAction * actionJet
Jet colours.
virtual vtkRenderWindowInteractor * GetVTKInteractor()
Get the interactor associated with the view rendering.
int orientationView
view orientation standard
QAction * contourNodePolyDataAct
Save contour surface nodes as polydata.
QAction * refreshAct
Action for refreshing the display.
vtkSmartPointer< vtkAxesActor > orientAxes
Orientation (posterior etc.) axes for the orientation marker.
QAction * textAct
Action for angle measuring display.
QAction * contourInitAct
Load contour surface points from polydata.
bool scaleBefore
scale displayed?
bool contextMenuEnabled
Display orientation (posterior etc.) axes?
QMenu * contourMenu
Contour Menu.
void SetRenderer(vtkRenderer *rnder)
Assigns a VTK Renderer object.
void GetBackground(double &red, double &green, double &blue)
Get the background of the display window.
QAction * resetAct
Action for refreshing the display.
QMenu * colourMapMenu
Colour map menu.
void SetScalarBar(vtkScalarBarActor *bar)
Get the scalar bar of the display window.
LabelledAction * actionHOT
HOT colours.
virtual void scaleDisplay(const bool forceDisplay=false)
Toggles the scale bar display.
QAction * saveViewAct
Save camera view.
bool isLoaded()
Is the data successfully loaded? Use this to check if all is ok with data display.
virtual void enableCrosshair()
Enables the mouse pointer as a crosshair instead. Scene must be rendered before calling.
QAction * viewXY
Change view to xy-plane (Axial)
vtkScalarBarActor * GetScalarBar()
Get the scalar bar of the display window.
QActionGroup * mapGroup
Grouping for check boxes.
vtkSmartPointer< vtkPlaneWidget > planeWidget
Used for drawing planes.
vtkSmartPointer< vtkCamera > camera
camera for the view
void AddActor2D(vtkSmartPointer< vtkProp > actor)
Add a VTK actor to this window.
LabelledAction * actionGray
Gray colours.
void RemoveAllActors()
Remove all VTK actors from this window.
QAction * actionCOOL
COOL colours.
bool rendered
Scene as been setup for rendering? (by generateRender())
vtkSmartPointer< vtkSphereWidget2 > sphereWidget
Used for measuring angles.
void SetBackground(double red, double green, double blue)
Set the background of the display window.
void SetSize(int height, int width)
Set the size of the display window.
QAction * viewZX
Change view to zx-plane (Sagittal)
LabelledAction * actionCOOLWARM
COOL colours.
vtkSmartPointer< vtkScalarBarActor > scale
Scale for the display.
LabelledAction * actionSeismic
Gray2 colours.
vtkSmartPointer< vtkMatrix4x4 > getTransformMatrix()
Internal transform matrix used to transform actors appropriately for direction and coordinate systems...
QAction * distanceAct
Action for distance measuring display.
QList< vtkSmartPointer< vtkTextWidget > > textWidgets
Used for displaying movable texts in render window.
vtkSmartPointer< vtkSphereRepresentation > sphereRep
Sphere for widgets.
void setDefaultView(int viewMode)
Change default view to view mode identified by number. 0-axial, 1-coronal, 2-sagittal.
QAction * biDirectionAct
Action for cross distance measuring display.
QList< vtkSmartPointer< vtkTextActor > > textActors
text actors for text widgets
virtual vtkImageActor * GetImageActor()
Get the image actors, Implement in derived class that uses images.
vtkSmartPointer< vtkRenderWindow > renderWindow
Render Window used if no other set, only for deletion, access through QVTKWidget members.
QAction * actionFS
FS colours.
bool useDefaultView
Using log scalar map?
QAction * actionAAL
AAL colours.
vtkSmartPointer< vtkEventQtSlotConnect > Connector
VTK Events to slots convertor.
vtkSmartPointer< vtkScalarBarWidget > scalarBar
Scalar Bar Widget for the display.
int getView()
Return current view mode identified by number. 0-axial, 1-coronal, 2-sagittal.
QMenu * windowPropertiesMenu
Context Menu.
vtkRenderer * GetRenderer()
Returns the VTK Renderer object.
vtkVolumeCollection * GetVolumes()
Get all the actors in the render window.
QAction * planeAct
Action for drawing planes.
QAction * angleAct
Action for angle measuring display.
void importViewFrom(milxQtRenderWindow *windowToImportFrom)
Same as importFrom()
QStatusBar * updateBar
Pointer to bar, not allocated or deleted. To be passed to only.
QAction * loadViewAct
Load camera view.
vtkSmartPointer< vtkPointPicker > dataPicker
For determining coordinates and points from the window.
QAction * sphereAct
Action for sphere annotate display.
QAction * loadViewFileAct
Load camera view to file.