VTK  9.0.1
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 =========================================================================*/
22 #ifndef vtkQImageToImageSource_h
23 #define vtkQImageToImageSource_h
24 
25 #include "vtkImageAlgorithm.h"
26 #include "vtkRenderingQtModule.h" // For export macro
27 
28 class QImage;
29 
30 class VTKRENDERINGQT_EXPORT vtkQImageToImageSource : public vtkImageAlgorithm
31 {
32 public:
33  static vtkQImageToImageSource* New();
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
40  void SetQImage(QImage* image)
41  {
42  this->QtImage = image;
43  this->Modified();
44  }
45  const QImage* GetQImage() { return QtImage; }
46 
47 protected:
50 
51  const QImage* QtImage;
52  int DataExtent[6];
53 
55  int RequestInformation(vtkInformation* vtkNotUsed(request),
56  vtkInformationVector** vtkNotUsed(inputVector), vtkInformationVector* outputVector) override;
57 
58 private:
60  void operator=(const vtkQImageToImageSource&) = delete;
61 };
62 
63 #endif
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkX3D::image
@ image
Definition: vtkX3D.h:380
vtkQImageToImageSource::~vtkQImageToImageSource
~vtkQImageToImageSource() override
Definition: vtkQImageToImageSource.h:49
vtkObject::Modified
virtual void Modified()
Update the modification time for this object.
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkQImageToImageSource::GetQImage
const QImage * GetQImage()
Definition: vtkQImageToImageSource.h:45
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkQImageToImageSource
Create image data from a QImage.
Definition: vtkQImageToImageSource.h:30
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkQImageToImageSource::QtImage
const QImage * QtImage
Definition: vtkQImageToImageSource.h:51
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkQImageToImageSource::SetQImage
void SetQImage(QImage *image)
Set/Get QImage surface to be used.
Definition: vtkQImageToImageSource.h:40