CustusX  18.04-rc6
An IGT application
cxMultiVolume3DRepProducer.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 CXMULTIVOLUME3DREPPRODUCER_H
12 #define CXMULTIVOLUME3DREPPRODUCER_H
13 
14 #include "org_custusx_core_view_Export.h"
15 
16 #include <QObject>
17 #include <QPointer>
18 #include <boost/shared_ptr.hpp>
19 #include "cxImage.h"
20 #include "cxRep.h"
21 
22 namespace cx
23 {
24 
25 typedef boost::shared_ptr<class MultiVolume3DRepProducer> MultiVolume3DVisualizerPtr;
26 
35 class org_custusx_core_view_EXPORT MultiVolume3DRepProducer : public QObject
36 {
37  Q_OBJECT
38 public:
41 
42  void setView(ViewPtr view);
43  void setMaxRenderSize(int voxels);
44  int getMaxRenderSize() const;
45  void setVisualizerType(QString type);
46  void addImage(ImagePtr image);
47  void removeImage(QString uid);
48  std::vector<RepPtr> getAllReps();
49 // static QStringList getAvailableVisualizers();
50 // static std::map<QString, QString> getAvailableVisualizerDisplayNames();
51  void removeRepsFromView();
52 
53 signals:
54  void imagesChanged();
55 
56 private slots:
57  void clearReps();
58 
59 private:
60  QString mVisualizerType;
61  std::vector<ImagePtr> m2DImages;
62  std::vector<ImagePtr> m3DImages;
63  std::vector<RepPtr> mReps;
64  int mMaxRenderSize;
65  ViewPtr mView;
66 
67  void updateRepsInView();
68  void fillReps();
69  bool contains(ImagePtr image) const;
70 
71  void rebuildReps();
72  void rebuild2DReps();
73  void rebuild3DReps();
74 
75  void addRepsToView();
76 
77  ImagePtr removeImageFromVector(QString uid, std::vector<ImagePtr> &images);
78 
79  void buildVtkOpenGLGPUMultiVolumeRayCastMapper();
80  void buildVtkVolumeTextureMapper3D(ImagePtr image);
81  void buildVtkGPUVolumeRayCastMapper(ImagePtr image);
82  void buildSscImage2DRep3D(ImagePtr image);
83 
84  void buildSingleVolumeRenderer(ImagePtr image);
85  bool isSingleVolumeRenderer() const;
86 
87 };
88 
89 } // namespace cx
90 
91 
92 
93 #endif // CXMULTIVOLUME3DREPPRODUCER_H
boost::shared_ptr< class MultiVolume3DRepProducer > MultiVolume3DVisualizerPtr
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
boost::shared_ptr< class View > ViewPtr
bool contains(std::string const &s, std::string const &infix)
Definition: catch.hpp:168
Namespace for all CustusX production code.