VTK  9.2.20230603
vtkQImageToImageSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkQImageToImageSource.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 =========================================================================*/
41 #ifndef vtkQImageToImageSource_h
42 #define vtkQImageToImageSource_h
43 
44 #include "vtkImageAlgorithm.h"
45 #include "vtkRenderingQtModule.h" // For export macro
46 
47 class QImage;
48 
49 VTK_ABI_NAMESPACE_BEGIN
50 
51 class VTKRENDERINGQT_EXPORT vtkQImageToImageSource : public vtkImageAlgorithm
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
61  void SetQImage(QImage* image)
62  {
63  this->QtImage = image;
64  this->Modified();
65  }
66  const QImage* GetQImage() { return QtImage; }
67 
68 protected:
70  ~vtkQImageToImageSource() override = default;
71 
72  const QImage* QtImage;
73  int DataExtent[6];
74 
76  int RequestInformation(vtkInformation* vtkNotUsed(request),
77  vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector) override;
78 
79 private:
81  void operator=(const vtkQImageToImageSource&) = delete;
82 };
83 
84 VTK_ABI_NAMESPACE_END
85 #endif
Generic algorithm superclass for image algs.
a simple class to control print indentation
Definition: vtkIndent.h:120
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void Modified()
Update the modification time for this object.
Create image data from a QImage.
void SetQImage(QImage *image)
Set/Get QImage surface to be used.
static vtkQImageToImageSource * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkQImageToImageSource() override=default
int RequestInformation(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *outputVector) override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
@ image
Definition: vtkX3D.h:386