VTK  9.1.0
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=========================================================================*/
34#ifndef vtkImplicitImageRepresentation_h
35#define vtkImplicitImageRepresentation_h
36
37#include "vtkImagePlaneWidget.h" //For enums
39#include "vtkInteractionWidgetsModule.h" // For export macro
40
41class vtkActor;
42class vtkImageData;
44class vtkImageReslice;
45class vtkLookupTable;
46class vtkMatrix4x4;
47class vtkTexture;
49
50class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitImageRepresentation
52{
53public:
58
60
64 void PrintSelf(ostream& os, vtkIndent indent) override;
66
68
75
77
81 void BuildRepresentation() override;
83
85
89 vtkSetMacro(UserControlledLookupTable, bool);
90 vtkGetMacro(UserControlledLookupTable, bool);
91 vtkBooleanMacro(UserControlledLookupTable, bool);
93
95
103 vtkGetObjectMacro(LookupTable, vtkLookupTable);
105
107
113 vtkSetMacro(TextureInterpolate, bool);
114 vtkGetMacro(TextureInterpolate, bool);
115 vtkBooleanMacro(TextureInterpolate, bool);
117
119
123 vtkGetMacro(ResliceInterpolate, int);
125 {
126 this->SetResliceInterpolate(VTK_NEAREST_RESLICE);
127 }
128 void SetResliceInterpolateToLinear() { this->SetResliceInterpolate(VTK_LINEAR_RESLICE); }
129 void SetResliceInterpolateToCubic() { this->SetResliceInterpolate(VTK_CUBIC_RESLICE); }
131
133
140 vtkGetObjectMacro(ColorMap, vtkImageMapToColors);
142
147 vtkGetObjectMacro(Reslice, vtkImageReslice);
148
153 void SetCropPlaneToBoundingBox(bool) override;
154
155protected:
158
164
165 // These classes implement the imaging pipeline. Note that we
166 // use the superclass plane to draw the image texture.
176 void CreateDefaultProperties() override;
177
178 // This enables texture mapping on the cropped plane
180
181private:
183 void operator=(const vtkImplicitImageRepresentation&) = delete;
184};
185
186#endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
Proxy object to connect input/output ports.
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
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
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.
vtkLookupTable * CreateDefaultLookupTable()
void SetResliceInterpolateToNearestNeighbour()
Set the interpolation to use when texturing the plane.
void SetResliceInterpolateToCubic()
Set the interpolation to use when texturing the plane.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
void BuildRepresentation() override
Methods to interface with the vtkImplicitPlaneWidget2.
static vtkImplicitImageRepresentation * New()
Instantiate the class.
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:113
map scalar values into colors via a lookup table
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
generate texture coordinates by mapping points to plane
handles properties associated with a texture map
Definition: vtkTexture.h:175
#define VTK_LINEAR_RESLICE
#define VTK_CUBIC_RESLICE
#define VTK_NEAREST_RESLICE