vtkPVMultiSliceView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
10 #ifndef vtkPVMultiSliceView_h
11 #define vtkPVMultiSliceView_h
12 
13 #include "vtkNew.h" // needed for vtkNew
14 #include "vtkPVRenderView.h"
15 #include "vtkRemotingViewsModule.h" //needed for exports
16 #include <vector> // needed for std::vector
17 
19 class vtkMatrix4x4;
20 
22 {
23 public:
24  static vtkPVMultiSliceView* New();
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
28  void Update() override;
29 
30  void SetNumberOfXSlices(unsigned int count) { this->SetNumberOfSlices(0, count); }
31  void SetXSlices(const double* values) { this->SetSlices(0, values); }
32  void SetNumberOfYSlices(unsigned int count) { this->SetNumberOfSlices(1, count); }
33  void SetYSlices(const double* values) { this->SetSlices(1, values); }
34  void SetNumberOfZSlices(unsigned int count) { this->SetNumberOfSlices(2, count); }
35  void SetZSlices(const double* values) { this->SetSlices(2, values); }
36 
37  const std::vector<double>& GetSlices(int axis) const;
38  const std::vector<double>& GetXSlices() const { return this->GetSlices(0); }
39  const std::vector<double>& GetYSlices() const { return this->GetSlices(1); }
40  const std::vector<double>& GetZSlices() const { return this->GetSlices(2); }
41 
42  void GetDataBounds(double bounds[6]) const;
43 
44  // These return nullptr when no overrides were specified.
45  const char* GetXAxisLabel() const { return this->GetAxisLabel(0); }
46  const char* GetYAxisLabel() const { return this->GetAxisLabel(1); }
47  const char* GetZAxisLabel() const { return this->GetAxisLabel(2); }
48 
49  const vtkClientServerStream& GetAxisLabels() const;
50 
51  // Convenience methods used by representations to pass information to the view
52  // in vtkPVView::REQUEST_UPDATE() pass. SetAxisTitle can be used to tell the
53  // view if the representation's data has information about titles to use for
54  // each of the axis. SetDataBounds can be used to tell the view the raw data
55  // bounds which are to be use when showing the slice-sliders.
56  static void SetAxisTitle(vtkInformation* info, int axis, const char* title);
57  static void SetDataBounds(vtkInformation* info, const double bounds[6]);
58 
59  void SetModelTransformationMatrix(vtkMatrix4x4*);
60 
61 protected:
63  ~vtkPVMultiSliceView() override;
64 
65  void AboutToRenderOnLocalProcess(bool interactive) override;
66 
67  void SetNumberOfSlices(int type, unsigned int count);
68  void SetSlices(int type, const double* values);
69  const char* GetAxisLabel(int axis) const;
71 
73 
74 private:
76  void operator=(const vtkPVMultiSliceView&) = delete;
77 
78  class vtkSliceInternal;
79  vtkSliceInternal* Internal;
80 };
81 
82 #endif
void SetXSlices(const double *values)
type
#define VTKREMOTINGVIEWS_EXPORT
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
info
void SetNumberOfZSlices(unsigned int count)
void Update() override
Overridden to synchronize information among processes whenever data changes.
Store messages for the interpreter.
const std::vector< double > & GetXSlices() const
vtkTimeStamp ModelTransformationMatrixUpdateTime
vtkPVMultiSliceView extends vtkPVRenderView but add meta-data information used by SliceRepresentation...
const char * GetYAxisLabel() const
vtkNew< vtkMatrix4x4 > ModelTransformationMatrix
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkPVRenderView * New()
void SetYSlices(const double *values)
const char * GetXAxisLabel() const
void SetNumberOfYSlices(unsigned int count)
const std::vector< double > & GetZSlices() const
Render View for ParaView.
title