VTK  9.7.1
vtkImageSlice.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
26 #ifndef vtkImageSlice_h
27 #define vtkImageSlice_h
28 
29 #include "vtkProp3D.h"
30 #include "vtkRenderingCoreModule.h" // For export macro
31 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class vtkRenderer;
35 class vtkPropCollection;
36 class vtkImageProperty;
37 class vtkImageMapper3D;
38 
39 class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkImageSlice : public vtkProp3D
40 {
41 public:
42  vtkTypeMacro(vtkImageSlice, vtkProp3D);
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
50  static vtkImageSlice* New();
51 
53 
56  void SetMapper(vtkImageMapper3D* mapper);
57  vtkGetObjectMacro(Mapper, vtkImageMapper3D);
59 
61 
64  void SetProperty(vtkImageProperty* property);
65  virtual vtkImageProperty* GetProperty();
67 
71  void Update();
72 
74 
78  double* GetBounds() override;
79  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
80  double GetMinXBound();
81  double GetMaxXBound();
82  double GetMinYBound();
83  double GetMaxYBound();
84  double GetMinZBound();
85  double GetMaxZBound();
87 
91  vtkMTimeType GetMTime() override;
92 
99  vtkMTimeType GetRedrawMTime() override;
100 
102 
105  vtkGetMacro(ForceTranslucent, bool);
106  vtkSetMacro(ForceTranslucent, bool);
107  vtkBooleanMacro(ForceTranslucent, bool);
109 
113  void ShallowCopy(vtkProp* prop) override;
114 
120  void GetImages(vtkPropCollection*);
121 
123 
126  int RenderOverlay(vtkViewport* viewport) override;
127  int RenderOpaqueGeometry(vtkViewport* viewport) override;
128  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
130 
136 
141  virtual void Render(vtkRenderer*);
142 
146  void ReleaseGraphicsResources(vtkWindow* win) override;
147 
154  void SetStackedImagePass(int pass);
155 
156 protected:
157  vtkImageSlice();
158  ~vtkImageSlice() override;
159 
162 
164 
165 private:
166  vtkImageSlice(const vtkImageSlice&) = delete;
167  void operator=(const vtkImageSlice&) = delete;
168 };
169 
170 VTK_ABI_NAMESPACE_END
171 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void GetBounds(double bounds[6])
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time...
Definition: vtkImageSlice.h:79
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual int RenderOpaqueGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:236
virtual vtkTypeBool HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkProp.h:300
virtual int RenderOverlay(vtkViewport *)
Definition: vtkProp.h:239
image display properties
abstract specification for renderers
Definition: vtkRenderer.h:63
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:39
vtkImageProperty * Property
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:64
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkProp.h:321
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
virtual vtkMTimeType GetRedrawMTime()
Return the mtime of anything that would cause the rendered image to appear differently.
Definition: vtkProp.h:110
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract class for mapping images to the screen
vtkImageMapper3D * Mapper
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkProp3D.
represents an image in a 3D scene
Definition: vtkImageSlice.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
Definition: vtkProp.h:237
#define VTK_MARSHALAUTO
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkMTimeType GetMTime() override
Get the vtkProp3D's mtime.