vtkImageSliceRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkImageSliceRepresentation.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 =========================================================================*/
25 #ifndef vtkImageSliceRepresentation_h
26 #define vtkImageSliceRepresentation_h
27 
28 #include "vtkNew.h" // for vtkNew.
30 #include "vtkRemotingViewsModule.h" //needed for exports
31 #include "vtkStructuredData.h" // for VTK_*_PLANE
32 
33 class vtkImageData;
35 class vtkPVLODActor;
36 class vtkScalarsToColors;
37 
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
51  int idx, int port, int connection, int fieldAssociation, const char* name) override;
53  int idx, int port, int connection, int fieldAssociation, int fieldAttributeType) override
54  {
56  idx, port, connection, fieldAssociation, fieldAttributeType);
57  }
58  void SetInputArrayToProcess(int idx, vtkInformation* info) override
59  {
60  this->Superclass::SetInputArrayToProcess(idx, info);
61  }
62  void SetInputArrayToProcess(int idx, int port, int connection, const char* fieldAssociation,
63  const char* attributeTypeorName) override
64  {
66  idx, port, connection, fieldAssociation, attributeTypeorName);
67  }
69 
77  vtkInformation* outInfo) override;
78 
84  void SetVisibility(bool val) override;
85 
87 
90  virtual void SetSlice(unsigned int);
91  vtkGetMacro(Slice, unsigned int);
93 
94  enum
95  {
96  XY_PLANE = VTK_XY_PLANE,
97  YZ_PLANE = VTK_YZ_PLANE,
98  XZ_PLANE = VTK_XZ_PLANE
99  };
100 
102 
105  virtual void SetSliceMode(int);
106  vtkGetMacro(SliceMode, int);
108 
109  //---------------------------------------------------------------------------
110  // Forwarded to Actor.
111  void SetOrientation(double, double, double);
112  void SetOrigin(double, double, double);
113  void SetPickable(int val);
114  void SetPosition(double, double, double);
115  void SetScale(double, double, double);
116 
117  //---------------------------------------------------------------------------
118  // Forwarded to vtkProperty.
119  void SetOpacity(double val);
120 
121  //---------------------------------------------------------------------------
122  // Forwarded to vtkPVImageSliceMapper.
123  void SetLookupTable(vtkScalarsToColors* val);
124  void SetMapScalars(int val);
125  void SetUseXYPlane(int val);
126 
130  vtkPVLODActor* GetActor() { return this->Actor; }
131 
132 protected:
134  ~vtkImageSliceRepresentation() override;
135 
139  void UpdateSliceData(vtkInformationVector**);
140 
144  int FillInputPortInformation(int port, vtkInformation* info) override;
145 
157 
163  bool AddToView(vtkView* view) override;
164 
170  bool RemoveFromView(vtkView* view) override;
171 
173  unsigned int Slice;
174 
178 
179  // meta-data about the input image to pass on to render view for hints
180  // when redistributing data.
181  double WholeBounds[6];
182 
183 private:
185  void operator=(const vtkImageSliceRepresentation&) = delete;
186 };
187 
188 #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:37
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