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 
34 
39  int idx, int port, int connection, int fieldAssociation, const char* name) override;
41  int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) override
42  {
44  idx, port, connection, fieldAssociation, fieldAttributeType);
45  }
46  void SetInputArrayToProcess(int idx, vtkInformation* info) override
47  {
48  this->Superclass::SetInputArrayToProcess(idx, info);
49  }
50  void SetInputArrayToProcess(int idx, int port, int connection, const char* fieldAssociation,
51  const char* attributeTypeorName) override
52  {
54  idx, port, connection, fieldAssociation, attributeTypeorName);
55  }
57 
65  vtkInformation* outInfo) override;
66 
72  void SetVisibility(bool val) override;
73 
75 
78  virtual void SetSlice(unsigned int);
79  vtkGetMacro(Slice, unsigned int);
81 
82  enum
83  {
84  XY_PLANE = VTK_XY_PLANE,
85  YZ_PLANE = VTK_YZ_PLANE,
86  XZ_PLANE = VTK_XZ_PLANE
87  };
88 
90 
93  virtual void SetSliceMode(int);
94  vtkGetMacro(SliceMode, int);
96 
97  //---------------------------------------------------------------------------
98  // Forwarded to Actor.
99  void SetOrientation(double, double, double);
100  void SetOrigin(double, double, double);
101  void SetPickable(int val);
102  void SetPosition(double, double, double);
103  void SetScale(double, double, double);
104 
105  //---------------------------------------------------------------------------
106  // Forwarded to vtkProperty.
107  void SetOpacity(double val);
108 
109  //---------------------------------------------------------------------------
110  // Forwarded to vtkPVImageSliceMapper.
111  void SetLookupTable(vtkScalarsToColors* val);
112  void SetMapScalars(int val);
113  void SetUseXYPlane(int val);
114 
118  vtkPVLODActor* GetActor() { return this->Actor; }
119 
120 protected:
122  ~vtkImageSliceRepresentation() override;
123 
127  void UpdateSliceData(vtkInformationVector**);
128 
132  int FillInputPortInformation(int port, vtkInformation* info) override;
133 
145 
151  bool AddToView(vtkView* view) override;
152 
158  bool RemoveFromView(vtkView* view) override;
159 
161  unsigned int Slice;
162 
166 
167  // meta-data about the input image to pass on to render view for hints
168  // when redistributing data.
169  double WholeBounds[6];
170 
171 private:
173  void operator=(const vtkImageSliceRepresentation&) = delete;
174 };
175 
176 #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.
#define VTK_XZ_PLANE
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.
#define VTK_XY_PLANE
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.
#define VTK_YZ_PLANE
void PrintSelf(ostream &os, vtkIndent indent) override
vtkPVLODActor * GetActor()
Provides access to the actor used by this representation.
port