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 
41 class vtkActor;
42 class vtkImageData;
44 class vtkImageReslice;
45 class vtkLookupTable;
46 class vtkMatrix4x4;
47 class vtkTexture;
49 
50 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitImageRepresentation
52 {
53 public:
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 
155 protected:
158 
164 
165  // These classes implement the imaging pipeline. Note that we
166  // use the superclass plane to draw the image texture.
174  void UpdatePlane();
176  void CreateDefaultProperties() override;
177 
178  // This enables texture mapping on the cropped plane
180 
181 private:
183  void operator=(const vtkImplicitImageRepresentation&) = delete;
184 };
185 
186 #endif
vtkImplicitImageRepresentation::PlaceImage
void PlaceImage(vtkAlgorithmOutput *aout)
Various ways to specify the vtkImageData* input for the vtkImageReslice; and perform PlaceWidget().
VTK_LINEAR_RESLICE
#define VTK_LINEAR_RESLICE
Definition: vtkImagePlaneWidget.h:157
vtkImplicitImageRepresentation::PlaceImage
void PlaceImage(vtkImageData *img)
Various ways to specify the vtkImageData* input for the vtkImageReslice; and perform PlaceWidget().
vtkImplicitImageRepresentation::TextureMapToPlane
vtkTextureMapToPlane * TextureMapToPlane
Definition: vtkImplicitImageRepresentation.h:179
vtkImplicitImageRepresentation::BuildRepresentation
void BuildRepresentation() override
Methods to interface with the vtkImplicitPlaneWidget2.
vtkImplicitImageRepresentation::~vtkImplicitImageRepresentation
~vtkImplicitImageRepresentation() override
vtkImplicitImageRepresentation::vtkImplicitImageRepresentation
vtkImplicitImageRepresentation()
vtkImplicitImageRepresentation::SetColorMap
virtual void SetColorMap(vtkImageMapToColors *)
Convenience method to get the vtkImageMapToColors filter used by this widget.
vtkImplicitImageRepresentation::UpdatePlane
void UpdatePlane()
vtkImageMapToColors
map the input image through a lookup table
Definition: vtkImageMapToColors.h:147
vtkImplicitImageRepresentation::TextureInterpolate
bool TextureInterpolate
Definition: vtkImplicitImageRepresentation.h:160
vtkImplicitImageRepresentation::ColorMap
vtkImageMapToColors * ColorMap
Definition: vtkImplicitImageRepresentation.h:170
vtkImplicitImageRepresentation::CreateDefaultProperties
void CreateDefaultProperties() override
vtkImplicitImageRepresentation::Texture
vtkTexture * Texture
Definition: vtkImplicitImageRepresentation.h:171
vtkImplicitImageRepresentation::SetResliceInterpolateToCubic
void SetResliceInterpolateToCubic()
Set the interpolation to use when texturing the plane.
Definition: vtkImplicitImageRepresentation.h:129
VTK_NEAREST_RESLICE
#define VTK_NEAREST_RESLICE
Definition: vtkImagePlaneWidget.h:156
vtkImplicitImageRepresentation::SetCropPlaneToBoundingBox
void SetCropPlaneToBoundingBox(bool) override
This method modifies the texture pipeline in order to generate texture coordinates.
vtkImplicitImageRepresentation
a representation for a vtkImplicitPlaneWidget2 which reslices a volume
Definition: vtkImplicitImageRepresentation.h:52
vtkImplicitPlaneRepresentation
a class defining the representation for a vtkImplicitPlaneWidget2
Definition: vtkImplicitPlaneRepresentation.h:84
vtkImplicitImageRepresentation::LookupTable
vtkLookupTable * LookupTable
Definition: vtkImplicitImageRepresentation.h:172
vtkImplicitImageRepresentation::SetLookupTable
virtual void SetLookupTable(vtkLookupTable *)
Set/Get the internal lookuptable (lut) to one defined by the user, or, alternatively,...
vtkTextureMapToPlane
generate texture coordinates by mapping points to plane
Definition: vtkTextureMapToPlane.h:76
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:175
vtkImplicitImageRepresentation::OriginalLevel
double OriginalLevel
Definition: vtkImplicitImageRepresentation.h:163
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:157
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkMatrix4x4
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:145
vtkImplicitImageRepresentation::UserControlledLookupTable
bool UserControlledLookupTable
Definition: vtkImplicitImageRepresentation.h:159
vtkImplicitImageRepresentation::GenerateTexturePlane
void GenerateTexturePlane()
vtkImplicitImageRepresentation::OriginalWindow
double OriginalWindow
Definition: vtkImplicitImageRepresentation.h:162
vtkImageReslice
Reslices a volume along a new set of axes.
Definition: vtkImageReslice.h:110
vtkImplicitImageRepresentation::SetResliceInterpolateToNearestNeighbour
void SetResliceInterpolateToNearestNeighbour()
Set the interpolation to use when texturing the plane.
Definition: vtkImplicitImageRepresentation.h:124
vtkImplicitImageRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
vtkLookupTable
map scalar values into colors via a lookup table
Definition: vtkLookupTable.h:178
vtkImplicitPlaneRepresentation.h
vtkImagePlaneWidget.h
vtkImplicitImageRepresentation::SetResliceInterpolateToLinear
void SetResliceInterpolateToLinear()
Set the interpolation to use when texturing the plane.
Definition: vtkImplicitImageRepresentation.h:128
vtkImplicitImageRepresentation::Reslice
vtkImageReslice * Reslice
Definition: vtkImplicitImageRepresentation.h:168
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:66
vtkImplicitImageRepresentation::SetResliceInterpolate
void SetResliceInterpolate(int)
Set the interpolation to use when texturing the plane.
vtkImplicitImageRepresentation::ResliceInterpolate
int ResliceInterpolate
Definition: vtkImplicitImageRepresentation.h:161
vtkImplicitImageRepresentation::CreateDefaultLookupTable
vtkLookupTable * CreateDefaultLookupTable()
vtkImplicitImageRepresentation::ResliceAxes
vtkMatrix4x4 * ResliceAxes
Definition: vtkImplicitImageRepresentation.h:169
VTK_CUBIC_RESLICE
#define VTK_CUBIC_RESLICE
Definition: vtkImagePlaneWidget.h:158
vtkImplicitImageRepresentation::New
static vtkImplicitImageRepresentation * New()
Instantiate the class.
vtkImplicitImageRepresentation::ImageData
vtkImageData * ImageData
Definition: vtkImplicitImageRepresentation.h:167