VTK  9.3.0
vtkImplicitImageRepresentation.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
25 #ifndef vtkImplicitImageRepresentation_h
26 #define vtkImplicitImageRepresentation_h
27 
28 #include "vtkImagePlaneWidget.h" //For enums
30 #include "vtkInteractionWidgetsModule.h" // For export macro
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkActor;
34 class vtkImageData;
36 class vtkImageReslice;
37 class vtkLookupTable;
38 class vtkMatrix4x4;
39 class vtkTexture;
41 
42 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitImageRepresentation
44 {
45 public:
50 
52 
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
67 
69 
73  void BuildRepresentation() override;
75 
77 
81  vtkSetMacro(UserControlledLookupTable, bool);
82  vtkGetMacro(UserControlledLookupTable, bool);
83  vtkBooleanMacro(UserControlledLookupTable, bool);
85 
87 
95  vtkGetObjectMacro(LookupTable, vtkLookupTable);
97 
99 
105  vtkSetMacro(TextureInterpolate, bool);
106  vtkGetMacro(TextureInterpolate, bool);
107  vtkBooleanMacro(TextureInterpolate, bool);
109 
111 
115  vtkGetMacro(ResliceInterpolate, int);
117  {
118  this->SetResliceInterpolate(VTK_NEAREST_RESLICE);
119  }
120  void SetResliceInterpolateToLinear() { this->SetResliceInterpolate(VTK_LINEAR_RESLICE); }
121  void SetResliceInterpolateToCubic() { this->SetResliceInterpolate(VTK_CUBIC_RESLICE); }
123 
125 
132  vtkGetObjectMacro(ColorMap, vtkImageMapToColors);
134 
139  vtkGetObjectMacro(Reslice, vtkImageReslice);
140 
145  void SetCropPlaneToBoundingBox(bool) override;
146 
147 protected:
150 
156 
157  // These classes implement the imaging pipeline. Note that we
158  // use the superclass plane to draw the image texture.
166  void UpdatePlane();
168  void CreateDefaultProperties() override;
169 
170  // This enables texture mapping on the cropped plane
172 
173 private:
175  void operator=(const vtkImplicitImageRepresentation&) = delete;
176 };
177 
178 VTK_ABI_NAMESPACE_END
179 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
Proxy object to connect input/output ports.
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
map the input image through a lookup table
Reslices a volume along a new set of axes.
a representation for a vtkImplicitPlaneWidget2 which reslices a volume
void SetResliceInterpolate(int)
Set the interpolation to use when texturing the plane.
void SetCropPlaneToBoundingBox(bool) override
This method modifies the texture pipeline in order to generate texture coordinates.
void CreateDefaultProperties() override
static vtkImplicitImageRepresentation * New()
Instantiate the class.
void PlaceImage(vtkAlgorithmOutput *aout)
Various ways to specify the vtkImageData* input for the vtkImageReslice; and perform PlaceWidget().
~vtkImplicitImageRepresentation() override
virtual void SetLookupTable(vtkLookupTable *)
Set/Get the internal lookuptable (lut) to one defined by the user, or, alternatively,...
void SetResliceInterpolateToLinear()
Set the interpolation to use when texturing the plane.
void SetResliceInterpolateToNearestNeighbour()
Set the interpolation to use when texturing the plane.
void SetResliceInterpolateToCubic()
Set the interpolation to use when texturing the plane.
vtkLookupTable * CreateDefaultLookupTable()
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
void BuildRepresentation() override
Methods to interface with the vtkImplicitPlaneWidget2.
virtual void SetColorMap(vtkImageMapToColors *)
Convenience method to get the vtkImageMapToColors filter used by this widget.
void PlaceImage(vtkImageData *img)
Various ways to specify the vtkImageData* input for the vtkImageReslice; and perform PlaceWidget().
a class defining the representation for a vtkImplicitPlaneWidget2
a simple class to control print indentation
Definition: vtkIndent.h:29
map scalar values into colors via a lookup table
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
generate texture coordinates by mapping points to plane
handles properties associated with a texture map
Definition: vtkTexture.h:58
#define VTK_LINEAR_RESLICE
#define VTK_CUBIC_RESLICE
#define VTK_NEAREST_RESLICE