ParaView
vtkPVMultiSliceView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVMultiSliceView.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
22 #ifndef vtkPVMultiSliceView_h
23 #define vtkPVMultiSliceView_h
24 
25 #include "vtkNew.h" // needed for vtkNew
26 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
27 #include "vtkPVRenderView.h"
28 #include <vector> // needed for std::vector
29 
31 class vtkMatrix4x4;
32 
33 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkPVMultiSliceView : public vtkPVRenderView
34 {
35 public:
36  static vtkPVMultiSliceView* New();
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
40  virtual void Update();
41 
42  void SetNumberOfXSlices(unsigned int count) { this->SetNumberOfSlices(0, count); }
43  void SetXSlices(const double* values) { this->SetSlices(0, values); }
44  void SetNumberOfYSlices(unsigned int count) { this->SetNumberOfSlices(1, count); }
45  void SetYSlices(const double* values) { this->SetSlices(1, values); }
46  void SetNumberOfZSlices(unsigned int count) { this->SetNumberOfSlices(2, count); }
47  void SetZSlices(const double* values) { this->SetSlices(2, values); }
48 
49  const std::vector<double>& GetSlices(int axis) const;
50  const std::vector<double>& GetXSlices() const { return this->GetSlices(0); }
51  const std::vector<double>& GetYSlices() const { return this->GetSlices(1); }
52  const std::vector<double>& GetZSlices() const { return this->GetSlices(2); }
53 
54  void GetDataBounds(double bounds[6]) const;
55 
56  // These return NULL when no overrides were specified.
57  const char* GetXAxisLabel() const { return this->GetAxisLabel(0); }
58  const char* GetYAxisLabel() const { return this->GetAxisLabel(1); }
59  const char* GetZAxisLabel() const { return this->GetAxisLabel(2); }
60 
61  const vtkClientServerStream& GetAxisLabels() const;
62 
63  // Convenience methods used by representations to pass information to the view
64  // in vtkPVView::REQUEST_UPDATE() pass. SetAxisTitle can be used to tell the
65  // view if the representation's data has information about titles to use for
66  // each of the axis. SetDataBounds can be used to tell the view the raw data
67  // bounds which are to be use when showing the slice-sliders.
68  static void SetAxisTitle(vtkInformation* info, int axis, const char* title);
69  static void SetDataBounds(vtkInformation* info, const double bounds[6]);
70 
71  void SetModelTransformationMatrix(vtkMatrix4x4*);
72 
73 protected:
76 
77  virtual void AboutToRenderOnLocalProcess(bool interactive);
78 
79  void SetNumberOfSlices(int type, unsigned int count);
80  void SetSlices(int type, const double* values);
81  const char* GetAxisLabel(int axis) const;
82  vtkNew<vtkMatrix4x4> ModelTransformationMatrix;
83 
85 
86 private:
87  vtkPVMultiSliceView(const vtkPVMultiSliceView&) VTK_DELETE_FUNCTION;
88  void operator=(const vtkPVMultiSliceView&) VTK_DELETE_FUNCTION;
89 
90  class vtkSliceInternal;
91  vtkSliceInternal* Internal;
92 };
93 
94 #endif
void SetXSlices(const double *values)
virtual void AboutToRenderOnLocalProcess(bool interactive)
Called just before the local process renders.
void SetNumberOfXSlices(unsigned int count)
void SetZSlices(const double *values)
const char * GetZAxisLabel() const
const std::vector< double > & GetYSlices() const
void SetNumberOfZSlices(unsigned int count)
Store messages for the interpreter.
const std::vector< double > & GetXSlices() const
vtkTimeStamp ModelTransformationMatrixUpdateTime
vtkPVMultiSliceView extends vtkPVRenderView but add meta-data informations used by SliceRepresentatio...
const char * GetYAxisLabel() const
vtkNew< vtkMatrix4x4 > ModelTransformationMatrix
static vtkPVRenderView * New()
void SetYSlices(const double *values)
const char * GetXAxisLabel() const
void SetNumberOfYSlices(unsigned int count)
virtual void Update()
Overridden to synchronize information among processes whenever data changes.
const std::vector< double > & GetZSlices() const
Render View for ParaView.
void PrintSelf(ostream &os, vtkIndent indent)