vtkImageSliceRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
13 #ifndef vtkImageSliceRepresentation_h
14 #define vtkImageSliceRepresentation_h
15 
16 #include "vtkNew.h" // for vtkNew.
18 #include "vtkRemotingViewsModule.h" //needed for exports
19 #include "vtkStructuredData.h" // for VTK_*_PLANE
20 
21 class vtkImageData;
23 class vtkPVLODActor;
24 class vtkScalarsToColors;
25 
27 {
28 public:
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
35 
40  int idx, int port, int connection, int fieldAssociation, const char* name) override;
42  int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) override
43  {
45  idx, port, connection, fieldAssociation, fieldAttributeType);
46  }
47  void SetInputArrayToProcess(int idx, vtkInformation* info) override
48  {
49  this->Superclass::SetInputArrayToProcess(idx, info);
50  }
51  void SetInputArrayToProcess(int idx, int port, int connection, const char* fieldAssociation,
52  const char* attributeTypeorName) override
53  {
55  idx, port, connection, fieldAssociation, attributeTypeorName);
56  }
58 
66  vtkInformation* outInfo) override;
67 
73  void SetVisibility(bool val) override;
74 
76 
79  virtual void SetSlice(unsigned int);
80  vtkGetMacro(Slice, unsigned int);
82 
83  enum
84  {
85  XY_PLANE = vtkStructuredData::VTK_STRUCTURED_XY_PLANE,
86  YZ_PLANE = vtkStructuredData::VTK_STRUCTURED_YZ_PLANE,
87  XZ_PLANE = vtkStructuredData::VTK_STRUCTURED_XZ_PLANE
88  };
89 
91 
94  virtual void SetSliceMode(int);
95  vtkGetMacro(SliceMode, int);
97 
98  //---------------------------------------------------------------------------
99  // Forwarded to Actor.
100  void SetOrientation(double, double, double);
101  void SetOrigin(double, double, double);
102  void SetPickable(int val);
103  void SetPosition(double, double, double);
104  void SetScale(double, double, double);
105  virtual void SetCoordinateSystem(int);
106 
107  //---------------------------------------------------------------------------
108  // Forwarded to vtkProperty.
109  void SetOpacity(double val);
110 
111  //---------------------------------------------------------------------------
112  // Forwarded to vtkPVImageSliceMapper.
113  void SetLookupTable(vtkScalarsToColors* val);
114  void SetMapScalars(int val);
115  void SetUseXYPlane(int val);
116 
120  vtkPVLODActor* GetActor() { return this->Actor; }
121 
122 protected:
124  ~vtkImageSliceRepresentation() override;
125 
129  void UpdateSliceData(vtkInformationVector**);
130 
134  int FillInputPortInformation(int port, vtkInformation* info) override;
135 
147 
153  bool AddToView(vtkView* view) override;
154 
160  bool RemoveFromView(vtkView* view) override;
161 
163  unsigned int Slice;
164 
168 
169  // meta-data about the input image to pass on to render view for hints
170  // when redistributing data.
171  double WholeBounds[6];
172 
173 private:
175  void operator=(const vtkImageSliceRepresentation&) = delete;
176 };
177 
178 #endif
void SetInputArrayToProcess(int idx, vtkInformation *info) override
Set the input data arrays that this algorithm will process.
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
bool AddToView(vtkView *view) override
Making these methods public.
info
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) override
Set the input data arrays that this algorithm will process.
Mapper for vtkImageData that renders the image using a texture applied to a quad. ...
representation for showing slices from a vtkImageData.
bool RemoveFromView(vtkView *view) override
Making these methods public.
static vtkDataRepresentation * New()
an actor that supports multiple levels of detail
Definition: vtkPVLODActor.h:25
void SetInputArrayToProcess(int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName) override
Set the input data arrays that this algorithm will process.
void PrintSelf(ostream &os, vtkIndent indent) override
vtkPVLODActor * GetActor()
Provides access to the actor used by this representation.
port