VTK  9.2.6
vtkImplicitImageRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImplicitImageRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
37 #ifndef vtkImplicitImageRepresentation_h
38 #define vtkImplicitImageRepresentation_h
39 
40 #include "vtkImagePlaneWidget.h" //For enums
42 #include "vtkInteractionWidgetsModule.h" // For export macro
43 
44 class vtkActor;
45 class vtkImageData;
47 class vtkImageReslice;
48 class vtkLookupTable;
49 class vtkMatrix4x4;
50 class vtkTexture;
52 
53 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitImageRepresentation
55 {
56 public:
61 
63 
67  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
71 
75  void PlaceImage(vtkImageData* img);
76  void PlaceImage(vtkAlgorithmOutput* aout);
78 
80 
84  void BuildRepresentation() override;
86 
88 
92  vtkSetMacro(UserControlledLookupTable, bool);
93  vtkGetMacro(UserControlledLookupTable, bool);
94  vtkBooleanMacro(UserControlledLookupTable, bool);
96 
98 
105  virtual void SetLookupTable(vtkLookupTable*);
106  vtkGetObjectMacro(LookupTable, vtkLookupTable);
108 
110 
116  vtkSetMacro(TextureInterpolate, bool);
117  vtkGetMacro(TextureInterpolate, bool);
118  vtkBooleanMacro(TextureInterpolate, bool);
120 
122 
125  void SetResliceInterpolate(int);
126  vtkGetMacro(ResliceInterpolate, int);
128  {
129  this->SetResliceInterpolate(VTK_NEAREST_RESLICE);
130  }
131  void SetResliceInterpolateToLinear() { this->SetResliceInterpolate(VTK_LINEAR_RESLICE); }
132  void SetResliceInterpolateToCubic() { this->SetResliceInterpolate(VTK_CUBIC_RESLICE); }
134 
136 
142  virtual void SetColorMap(vtkImageMapToColors*);
143  vtkGetObjectMacro(ColorMap, vtkImageMapToColors);
145 
150  vtkGetObjectMacro(Reslice, vtkImageReslice);
151 
156  void SetCropPlaneToBoundingBox(bool) override;
157 
158 protected:
160  ~vtkImplicitImageRepresentation() override;
161 
167 
168  // These classes implement the imaging pipeline. Note that we
169  // use the superclass plane to draw the image texture.
176  vtkLookupTable* CreateDefaultLookupTable();
177  void UpdatePlane();
178  void GenerateTexturePlane();
179  void CreateDefaultProperties() override;
180 
181  // This enables texture mapping on the cropped plane
183 
184 private:
186  void operator=(const vtkImplicitImageRepresentation&) = delete;
187 };
188 
189 #endif
#define VTK_CUBIC_RESLICE
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
#define VTK_LINEAR_RESLICE
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:41
a representation for a vtkImplicitPlaneWidget2 which reslices a volume
map scalar values into colors via a lookup table
Proxy object to connect input/output ports.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
void SetResliceInterpolateToNearestNeighbour()
Set the interpolation to use when texturing the plane.
a simple class to control print indentation
Definition: vtkIndent.h:39
a class defining the representation for a vtkImplicitPlaneWidget2
#define VTK_NEAREST_RESLICE
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
map the input image through a lookup table
handles properties associated with a texture map
Definition: vtkTexture.h:68
Reslices a volume along a new set of axes.
void BuildRepresentation() override
Methods to interface with the vtkImplicitPlaneWidget2.
static vtkImplicitPlaneRepresentation * New()
Instantiate the class.
void SetResliceInterpolateToLinear()
Set the interpolation to use when texturing the plane.
virtual void CreateDefaultProperties()
void SetResliceInterpolateToCubic()
Set the interpolation to use when texturing the plane.
virtual void SetCropPlaneToBoundingBox(bool)
Control if the plane should be drawn cropped by the bounding box or without cropping.
generate texture coordinates by mapping points to plane