26 #include <vtkSmartPointer.h>
30 class vtkRenderWindow;
31 class vtkRenderWindowInteractor;
32 #if VTK_MAJOR_VERSION >= 6
34 class vtkImageSliceMapper;
46 ImageVis(
const std::string& viewerName,
bool autoInit =
false);
58 void setRenderWindowInteractor(
68 bool contains(
const std::string&
id)
const;
70 Layer* getLayer(
const std::string&
id);
71 void changeOpacity(
double opacity,
const std::string& viewID);
72 void hideShowActors(
bool visibility,
const std::string& viewID);
77 void removeLayer(
const std::string& layer_id);
87 LayerMap::iterator createLayer(
const std::string& layer_id,
93 bool fill_box =
true);
95 void addRGBImage(
const QImage& qimage,
98 const std::string& layer_id,
99 double opacity = 1.0);
106 void addQImage(
const QImage& qimage,
107 const std::string& layer_id =
"image",
108 double opacity = 1.0);
110 bool addText(
unsigned int x,
112 const std::string& text_string,
116 const std::string& layer_id =
"line",
117 double opacity = 1.0,
122 void enable2Dviewer(
bool state);
124 std::string pickItem(
int x,
int y);
127 void mouseEventProcess(
const pcl::visualization::MouseEvent&
event,
129 boost::signals2::connection m_mouseConnection;
130 std::string pickItem(
const pcl::visualization::MouseEvent&
event);
133 static void WindowResizeCallback(vtkObject* caller,
134 unsigned long eventId,
137 void onWindowResize();
138 void updateImageScales();
139 #if VTK_MAJOR_VERSION >= 6
140 void updateImageSliceTransform(vtkImageSlice* imageSlice,
148 void setImageInteractorStyle();
159 struct CameraParams {
160 bool parallelProjection;
161 double focalPoint[3];
165 double parallelScale;
166 double clippingRange[2];
168 CameraParams m_originalCameraParams;
169 bool m_cameraParamsSaved;
173 unsigned originalWidth;
174 unsigned originalHeight;
175 #if VTK_MAJOR_VERSION >= 6
180 std::map<std::string, ImageInfo> m_imageInfoMap;
Generic visualizer 2D interface.
ImageViewer is a class for 2D image visualization.
std::shared_ptr< ImageVis > ImageVisPtr
#define QPCL_ENGINE_LIB_API
Internal structure describing a layer.