VTK  9.3.0
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
35 #ifndef vtkImageSlice_h
36 #define vtkImageSlice_h
37 
38 #include "vtkProp3D.h"
39 #include "vtkRenderingCoreModule.h" // For export macro
40 
41 VTK_ABI_NAMESPACE_BEGIN
42 class vtkRenderer;
43 class vtkPropCollection;
44 class vtkImageProperty;
45 class vtkImageMapper3D;
46 
47 class VTKRENDERINGCORE_EXPORT vtkImageSlice : public vtkProp3D
48 {
49 public:
50  vtkTypeMacro(vtkImageSlice, vtkProp3D);
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
58  static vtkImageSlice* New();
59 
61 
64  void SetMapper(vtkImageMapper3D* mapper);
65  vtkGetObjectMacro(Mapper, vtkImageMapper3D);
67 
69 
72  void SetProperty(vtkImageProperty* property);
75 
79  void Update();
80 
82 
86  double* GetBounds() override;
87  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
88  double GetMinXBound();
89  double GetMaxXBound();
90  double GetMinYBound();
91  double GetMaxYBound();
92  double GetMinZBound();
93  double GetMaxZBound();
95 
99  vtkMTimeType GetMTime() override;
100 
108 
110 
113  vtkGetMacro(ForceTranslucent, bool);
114  vtkSetMacro(ForceTranslucent, bool);
115  vtkBooleanMacro(ForceTranslucent, bool);
117 
121  void ShallowCopy(vtkProp* prop) override;
122 
129 
131 
134  int RenderOverlay(vtkViewport* viewport) override;
135  int RenderOpaqueGeometry(vtkViewport* viewport) override;
138 
144 
149  virtual void Render(vtkRenderer*);
150 
154  void ReleaseGraphicsResources(vtkWindow* win) override;
155 
162  void SetStackedImagePass(int pass);
163 
164 protected:
166  ~vtkImageSlice() override;
167 
170 
172 
173 private:
174  vtkImageSlice(const vtkImageSlice&) = delete;
175  void operator=(const vtkImageSlice&) = delete;
176 };
177 
178 VTK_ABI_NAMESPACE_END
179 #endif
abstract class for mapping images to the screen
image display properties
represents an image in a 3D scene
Definition: vtkImageSlice.h:48
virtual void Render(vtkRenderer *)
This causes the image and its mapper to be rendered.
double GetMaxYBound()
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time.
vtkMTimeType GetMTime() override
Return the MTime also considering the property etc.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageMapper3D * Mapper
double GetMinXBound()
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
double GetMinZBound()
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time.
double GetMinYBound()
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time.
double GetMaxZBound()
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time.
void Update()
Update the rendering pipeline by updating the ImageMapper.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
static vtkImageSlice * New()
Creates an Image with the following defaults: origin(0,0,0) position=(0,0,0) scale=1 visibility=1 pic...
void SetProperty(vtkImageProperty *property)
Set/Get the image display properties.
void SetMapper(vtkImageMapper3D *mapper)
Set/Get the mapper.
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
void SetStackedImagePass(int pass)
For stacked image rendering, set the pass.
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkImageSlice.
vtkMTimeType GetRedrawMTime() override
Return the mtime of anything that would cause the rendered image to appear differently.
void ReleaseGraphicsResources(vtkWindow *win) override
Release any resources held by this prop.
void GetImages(vtkPropCollection *)
For some exporters and other other operations we must be able to collect all the actors,...
~vtkImageSlice() override
double GetMaxXBound()
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time.
virtual vtkImageProperty * GetProperty()
Set/Get the image display properties.
double * GetBounds() override
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time.
vtkImageProperty * Property
vtkTypeBool HasTranslucentPolygonalGeometry() override
Internal method, should only be used by rendering.
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:87
a simple class to control print indentation
Definition: vtkIndent.h:38
represents an 3D object for placement in a rendered scene
Definition: vtkProp3D.h:48
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:55
abstract specification for renderers
Definition: vtkRenderer.h:71
abstract specification for Viewports
Definition: vtkViewport.h:54
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270