Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxViewCollectionImageWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXVIEWCOLLECTIONIMAGEWRITER_H
12 #define CXVIEWCOLLECTIONIMAGEWRITER_H
13 
14 #include <QObject>
15 #include <QPointer>
16 #include <QMainWindow>
17 #include "vtkSmartPointer.h"
18 #include "cxVisServices.h"
19 #include "cxLayoutData.h"
20 #include "cxForwardDeclarations.h"
21 
22 typedef vtkSmartPointer<class vtkWindowToImageFilter> vtkWindowToImageFilterPtr;
23 typedef vtkSmartPointer<class vtkPNGWriter> vtkPNGWriterPtr;
24 typedef vtkSmartPointer<class vtkUnsignedCharArray> vtkUnsignedCharArrayPtr;
25 
26 namespace cx
27 {
28 class ViewCollectionWidget;
29 
34 class cxResourceVisualization_EXPORT ViewCollectionImageWriter
35 {
36 public:
38  vtkImageDataPtr grab();
39  static QImage vtkImageData2QImage(vtkImageDataPtr input);
40 private:
41  vtkImageDataPtr view2vtkImageData(ViewPtr view);
45  void drawImageAtPos(vtkImageDataPtr target, vtkImageDataPtr image, QPoint pos);
48  QPoint getVtkPositionOfView(ViewPtr view);
49  QPoint qt2vtk(QPoint qpos);
50 
51  ViewCollectionWidget* mWidget;
52 };
53 
54 } // namespace cx
55 
56 #endif // CXVIEWCOLLECTIONIMAGEWRITER_H
vtkSmartPointer< class vtkWindowToImageFilter > vtkWindowToImageFilterPtr
boost::shared_ptr< class View > ViewPtr
vtkSmartPointer< class vtkUnsignedCharArray > vtkUnsignedCharArrayPtr
vtkSmartPointer< class vtkPNGWriter > vtkPNGWriterPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Namespace for all CustusX production code.