ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
image_viewer.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <pcl/console/print.h>
11 #include <pcl/correspondence.h>
12 #include <pcl/geometry/planar_polygon.h>
13 #include <pcl/memory.h>
14 #include <pcl/pcl_macros.h>
15 #include <pcl/point_types.h>
16 #include <pcl/visualization/interactor_style.h>
19 #include <vtkInteractorStyleImage.h>
20 #include <vtkRenderWindowInteractor.h>
21 #include <vtkVersion.h>
22 
23 #include <boost/shared_array.hpp>
24 
25 class vtkImageSlice;
26 class vtkContextActor;
27 class vtkImageViewer;
28 class vtkImageFlip;
29 
30 namespace pcl {
31 namespace visualization {
32 using Vector3ub = Eigen::Array<unsigned char, 3, 1>;
33 static const Vector3ub green_color(0, 255, 0);
34 static const Vector3ub red_color(255, 0, 0);
35 static const Vector3ub blue_color(0, 0, 255);
36 
41 class PCL_EXPORTS ImageViewerInteractorStyle : public vtkInteractorStyleImage {
42 public:
45 
46  void OnMouseWheelForward() override {}
47  void OnMouseWheelBackward() override {}
48  void OnMiddleButtonDown() override {}
49  void OnRightButtonDown() override {}
50  void OnLeftButtonDown() override;
51 
52  void OnChar() override;
53 
54  void adjustCamera(vtkImageData* image, vtkRenderer* ren);
55 
56  void adjustCamera(vtkRenderer* ren);
57 };
58 
83 class PCL_EXPORTS ImageViewer {
84 public:
85  using Ptr = shared_ptr<ImageViewer>;
86  using ConstPtr = shared_ptr<const ImageViewer>;
87 
91  ImageViewer(const std::string& window_title = "");
92 
94  virtual ~ImageViewer();
95 
100  void setInteractorStyle(vtkInteractorObserver* style) {
101  interactor_->SetInteractorStyle(style);
102  }
103 
111  void showMonoImage(const unsigned char* data,
112  unsigned width,
113  unsigned height,
114  const std::string& layer_id = "mono_image",
115  double opacity = 1.0);
116 
123  void addMonoImage(const unsigned char* data,
124  unsigned width,
125  unsigned height,
126  const std::string& layer_id = "mono_image",
127  double opacity = 1.0);
128 
134  inline void showMonoImage(
135  const pcl::PointCloud<pcl::Intensity>::ConstPtr& cloud,
136  const std::string& layer_id = "mono_image",
137  double opacity = 1.0) {
138  return (showMonoImage(*cloud, layer_id, opacity));
139  }
140 
147  inline void addMonoImage(
148  const pcl::PointCloud<pcl::Intensity>::ConstPtr& cloud,
149  const std::string& layer_id = "mono_image",
150  double opacity = 1.0) {
151  return (addMonoImage(*cloud, layer_id, opacity));
152  }
153 
159  void showMonoImage(const pcl::PointCloud<pcl::Intensity>& cloud,
160  const std::string& layer_id = "mono_image",
161  double opacity = 1.0);
162 
168  void addMonoImage(const pcl::PointCloud<pcl::Intensity>& cloud,
169  const std::string& layer_id = "mono_image",
170  double opacity = 1.0);
171 
177  inline void showMonoImage(
178  const pcl::PointCloud<pcl::Intensity8u>::ConstPtr& cloud,
179  const std::string& layer_id = "mono_image",
180  double opacity = 1.0) {
181  return (showMonoImage(*cloud, layer_id, opacity));
182  }
183 
190  inline void addMonoImage(
191  const pcl::PointCloud<pcl::Intensity8u>::ConstPtr& cloud,
192  const std::string& layer_id = "mono_image",
193  double opacity = 1.0) {
194  return (addMonoImage(*cloud, layer_id, opacity));
195  }
196 
202  void showMonoImage(const pcl::PointCloud<pcl::Intensity8u>& cloud,
203  const std::string& layer_id = "mono_image",
204  double opacity = 1.0);
205 
211  void addMonoImage(const pcl::PointCloud<pcl::Intensity8u>& cloud,
212  const std::string& layer_id = "mono_image",
213  double opacity = 1.0);
214 
222  void showRGBImage(const unsigned char* data,
223  unsigned width,
224  unsigned height,
225  const std::string& layer_id = "rgb_image",
226  double opacity = 1.0);
227 
236  void addRGBImage(const unsigned char* data,
237  unsigned width,
238  unsigned height,
239  const std::string& layer_id = "rgb_image",
240  double opacity = 1.0,
241  bool autoresize = true);
242 
248  template <typename T>
249  inline void showRGBImage(const typename pcl::PointCloud<T>::ConstPtr& cloud,
250  const std::string& layer_id = "rgb_image",
251  double opacity = 1.0) {
252  return (showRGBImage<T>(*cloud, layer_id, opacity));
253  }
254 
260  template <typename T>
261  inline void addRGBImage(const typename pcl::PointCloud<T>::ConstPtr& cloud,
262  const std::string& layer_id = "rgb_image",
263  double opacity = 1.0) {
264  return (addRGBImage<T>(*cloud, layer_id, opacity));
265  }
266 
272  template <typename T>
273  void showRGBImage(const pcl::PointCloud<T>& cloud,
274  const std::string& layer_id = "rgb_image",
275  double opacity = 1.0);
276 
282  template <typename T>
283  void addRGBImage(const pcl::PointCloud<T>& cloud,
284  const std::string& layer_id = "rgb_image",
285  double opacity = 1.0);
286 
298  void showFloatImage(const float* data,
299  unsigned int width,
300  unsigned int height,
301  float min_value = std::numeric_limits<float>::min(),
302  float max_value = std::numeric_limits<float>::max(),
303  bool grayscale = false,
304  const std::string& layer_id = "float_image",
305  double opacity = 1.0);
306 
317  void addFloatImage(const float* data,
318  unsigned int width,
319  unsigned int height,
320  float min_value = std::numeric_limits<float>::min(),
321  float max_value = std::numeric_limits<float>::max(),
322  bool grayscale = false,
323  const std::string& layer_id = "float_image",
324  double opacity = 1.0);
325 
336  void showShortImage(const unsigned short* short_image,
337  unsigned int width,
338  unsigned int height,
339  unsigned short min_value =
340  std::numeric_limits<unsigned short>::min(),
341  unsigned short max_value =
342  std::numeric_limits<unsigned short>::max(),
343  bool grayscale = false,
344  const std::string& layer_id = "short_image",
345  double opacity = 1.0);
346 
358  void addShortImage(const unsigned short* short_image,
359  unsigned int width,
360  unsigned int height,
361  unsigned short min_value =
362  std::numeric_limits<unsigned short>::min(),
363  unsigned short max_value =
364  std::numeric_limits<unsigned short>::max(),
365  bool grayscale = false,
366  const std::string& layer_id = "short_image",
367  double opacity = 1.0);
368 
376  void showAngleImage(const float* data,
377  unsigned width,
378  unsigned height,
379  const std::string& layer_id = "angle_image",
380  double opacity = 1.0);
381 
388  void addAngleImage(const float* data,
389  unsigned width,
390  unsigned height,
391  const std::string& layer_id = "angle_image",
392  double opacity = 1.0);
393 
401  void showHalfAngleImage(const float* data,
402  unsigned width,
403  unsigned height,
404  const std::string& layer_id = "half_angle_image",
405  double opacity = 1.0);
406 
413  void addHalfAngleImage(const float* data,
414  unsigned width,
415  unsigned height,
416  const std::string& layer_id = "half_angle_image",
417  double opacity = 1.0);
418 
428  void markPoint(std::size_t u,
429  std::size_t v,
430  Vector3ub fg_color,
431  Vector3ub bg_color = red_color,
432  double radius = 3.0,
433  const std::string& layer_id = "points",
434  double opacity = 1.0);
435 
444  void markPoints(const std::vector<int>& uv,
445  Vector3ub fg_color,
446  Vector3ub bg_color = red_color,
447  double size = 3.0,
448  const std::string& layer_id = "markers",
449  double opacity = 1.0);
450 
459  void markPoints(const std::vector<float>& uv,
460  Vector3ub fg_color,
461  Vector3ub bg_color = red_color,
462  double size = 3.0,
463  const std::string& layer_id = "markers",
464  double opacity = 1.0);
465 
469  void setWindowTitle(const std::string& name);
470 
472  void spin();
473 
480  void spinOnce(int time = 1, bool force_redraw = true);
481 
488  boost::signals2::connection registerKeyboardCallback(
489  void (*callback)(const pcl::visualization::KeyboardEvent&, void*),
490  void* cookie = nullptr) {
491  return (registerKeyboardCallback(
492  [=](const pcl::visualization::KeyboardEvent& e) {
493  (*callback)(e, cookie);
494  }));
495  }
496 
504  template <typename T>
505  boost::signals2::connection registerKeyboardCallback(
506  void (T::*callback)(const pcl::visualization::KeyboardEvent&,
507  void*),
508  T& instance,
509  void* cookie = nullptr) {
510  return (registerKeyboardCallback(
511  [=, &instance](const pcl::visualization::KeyboardEvent& e) {
512  (instance.*callback)(e, cookie);
513  }));
514  }
515 
521  boost::signals2::connection registerKeyboardCallback(
522  std::function<void(const pcl::visualization::KeyboardEvent&)> cb);
523 
530  boost::signals2::connection registerMouseCallback(
531  void (*callback)(const pcl::visualization::MouseEvent&, void*),
532  void* cookie = nullptr) {
533  return (registerMouseCallback(
534  [=](const pcl::visualization::MouseEvent& e) {
535  (*callback)(e, cookie);
536  }));
537  }
538 
546  template <typename T>
547  boost::signals2::connection registerMouseCallback(
548  void (T::*callback)(const pcl::visualization::MouseEvent&, void*),
549  T& instance,
550  void* cookie = nullptr) {
551  return (registerMouseCallback(
552  [=, &instance](const pcl::visualization::MouseEvent& e) {
553  (instance.*callback)(e, cookie);
554  }));
555  }
556 
562  boost::signals2::connection registerMouseCallback(
563  std::function<void(const pcl::visualization::MouseEvent&)> cb);
564 
569  void setPosition(int x, int y);
570 
575  void setSize(int xw, int yw);
576 
578  int* getSize();
579 
581  bool wasStopped() const { return (stopped_); }
582 
584  void close() {
585  stopped_ = true;
586  // This tends to close the window...
587  interactor_->TerminateApp();
588  }
589 
598  bool addCircle(unsigned int x,
599  unsigned int y,
600  double radius,
601  const std::string& layer_id = "circles",
602  double opacity = 1.0);
603 
616  bool addCircle(unsigned int x,
617  unsigned int y,
618  double radius,
619  double r,
620  double g,
621  double b,
622  const std::string& layer_id = "circles",
623  double opacity = 1.0);
624 
632  bool addRectangle(const pcl::PointXY& min_pt,
633  const pcl::PointXY& max_pt,
634  const std::string& layer_id = "rectangles",
635  double opacity = 1.0);
636 
648  bool addRectangle(const pcl::PointXY& min_pt,
649  const pcl::PointXY& max_pt,
650  double r,
651  double g,
652  double b,
653  const std::string& layer_id = "rectangles",
654  double opacity = 1.0);
655 
665  bool addRectangle(unsigned int x_min,
666  unsigned int x_max,
667  unsigned int y_min,
668  unsigned int y_max,
669  const std::string& layer_id = "rectangles",
670  double opacity = 1.0);
671 
685  bool addRectangle(unsigned int x_min,
686  unsigned int x_max,
687  unsigned int y_min,
688  unsigned int y_max,
689  double r,
690  double g,
691  double b,
692  const std::string& layer_id = "rectangles",
693  double opacity = 1.0);
694 
702  template <typename T>
703  bool addRectangle(const typename pcl::PointCloud<T>::ConstPtr& image,
704  const T& min_pt,
705  const T& max_pt,
706  const std::string& layer_id = "rectangles",
707  double opacity = 1.0);
708 
720  template <typename T>
721  bool addRectangle(const typename pcl::PointCloud<T>::ConstPtr& image,
722  const T& min_pt,
723  const T& max_pt,
724  double r,
725  double g,
726  double b,
727  const std::string& layer_id = "rectangles",
728  double opacity = 1.0);
729 
740  template <typename T>
741  bool addRectangle(const typename pcl::PointCloud<T>::ConstPtr& image,
742  const pcl::PointCloud<T>& mask,
743  double r,
744  double g,
745  double b,
746  const std::string& layer_id = "rectangles",
747  double opacity = 1.0);
748 
756  template <typename T>
757  bool addRectangle(const typename pcl::PointCloud<T>::ConstPtr& image,
758  const pcl::PointCloud<T>& mask,
759  const std::string& layer_id = "image_mask",
760  double opacity = 1.0);
761 
771  bool addFilledRectangle(unsigned int x_min,
772  unsigned int x_max,
773  unsigned int y_min,
774  unsigned int y_max,
775  const std::string& layer_id = "boxes",
776  double opacity = 0.5);
777 
791  bool addFilledRectangle(unsigned int x_min,
792  unsigned int x_max,
793  unsigned int y_min,
794  unsigned int y_max,
795  double r,
796  double g,
797  double b,
798  const std::string& layer_id = "boxes",
799  double opacity = 0.5);
800 
814  bool addLine(unsigned int x_min,
815  unsigned int y_min,
816  unsigned int x_max,
817  unsigned int y_max,
818  double r,
819  double g,
820  double b,
821  const std::string& layer_id = "line",
822  double opacity = 1.0);
823 
833  bool addLine(unsigned int x_min,
834  unsigned int y_min,
835  unsigned int x_max,
836  unsigned int y_max,
837  const std::string& layer_id = "line",
838  double opacity = 1.0);
839 
852  bool addText(unsigned int x,
853  unsigned int y,
854  const std::string& text,
855  double r,
856  double g,
857  double b,
858  const std::string& layer_id = "line",
859  double opacity = 1.0);
860 
869  bool addText(unsigned int x,
870  unsigned int y,
871  const std::string& text,
872  const std::string& layer_id = "line",
873  double opacity = 1.0);
874 
885  template <typename T>
886  bool addMask(const typename pcl::PointCloud<T>::ConstPtr& image,
887  const pcl::PointCloud<T>& mask,
888  double r,
889  double g,
890  double b,
891  const std::string& layer_id = "image_mask",
892  double opacity = 0.5);
893 
901  template <typename T>
902  bool addMask(const typename pcl::PointCloud<T>::ConstPtr& image,
903  const pcl::PointCloud<T>& mask,
904  const std::string& layer_id = "image_mask",
905  double opacity = 0.5);
906 
919  template <typename T>
920  bool addPlanarPolygon(const typename pcl::PointCloud<T>::ConstPtr& image,
921  const pcl::PlanarPolygon<T>& polygon,
922  double r,
923  double g,
924  double b,
925  const std::string& layer_id = "planar_polygon",
926  double opacity = 1.0);
927 
936  template <typename T>
937  bool addPlanarPolygon(const typename pcl::PointCloud<T>::ConstPtr& image,
938  const pcl::PlanarPolygon<T>& polygon,
939  const std::string& layer_id = "planar_polygon",
940  double opacity = 1.0);
941 
949  bool addLayer(const std::string& layer_id,
950  int width,
951  int height,
952  double opacity = 0.5);
953 
957  void removeLayer(const std::string& layer_id);
958 
966  template <typename PointT>
967  bool showCorrespondences(const pcl::PointCloud<PointT>& source_img,
968  const pcl::PointCloud<PointT>& target_img,
969  const pcl::Correspondences& correspondences,
970  int nth = 1,
971  const std::string& layer_id = "correspondences");
972 
973 protected:
975  void render();
976 
984  void convertIntensityCloudToUChar(
985  const pcl::PointCloud<pcl::Intensity>& cloud,
986  boost::shared_array<unsigned char> data);
987 
995  void convertIntensityCloud8uToUChar(
996  const pcl::PointCloud<pcl::Intensity8u>& cloud,
997  boost::shared_array<unsigned char> data);
998 
1005  template <typename T>
1006  void convertRGBCloudToUChar(const pcl::PointCloud<T>& cloud,
1007  boost::shared_array<unsigned char>& data);
1008 
1010  void resetStoppedFlag() { stopped_ = false; }
1011 
1015  void emitMouseEvent(unsigned long event_id);
1016 
1020  void emitKeyboardEvent(unsigned long event_id);
1021 
1022  // Callbacks used to register for vtk command
1023  static void MouseCallback(vtkObject*,
1024  unsigned long eid,
1025  void* clientdata,
1026  void* calldata);
1027  static void KeyboardCallback(vtkObject*,
1028  unsigned long eid,
1029  void* clientdata,
1030  void* calldata);
1031 
1032 protected: // types
1033  struct ExitMainLoopTimerCallback : public vtkCommand {
1034  ExitMainLoopTimerCallback() : right_timer_id(), window() {}
1035 
1037  return (new ExitMainLoopTimerCallback);
1038  }
1039  void Execute(vtkObject* vtkNotUsed(caller),
1040  unsigned long event_id,
1041  void* call_data) override {
1042  if (event_id != vtkCommand::TimerEvent) return;
1043  int timer_id = *static_cast<int*>(call_data);
1044  if (timer_id != right_timer_id) return;
1045  window->interactor_->TerminateApp();
1046  }
1049  };
1050  struct ExitCallback : public vtkCommand {
1051  ExitCallback() : window() {}
1052 
1053  static ExitCallback* New() { return (new ExitCallback); }
1054  void Execute(vtkObject*, unsigned long event_id, void*) override {
1055  if (event_id != vtkCommand::ExitEvent) return;
1056  window->stopped_ = true;
1057  window->interactor_->TerminateApp();
1058  }
1060  };
1061 
1062 protected:
1064  struct Layer {
1065  Layer() {}
1067  std::string layer_name;
1068  };
1069 
1070  using LayerMap = std::vector<Layer>;
1071 
1080  LayerMap::iterator createLayer(const std::string& layer_id,
1081  int width,
1082  int height,
1083  double opacity = 0.5,
1084  bool fill_box = true);
1085 
1086  boost::signals2::signal<void(const pcl::visualization::MouseEvent&)>
1088  boost::signals2::signal<void(const pcl::visualization::KeyboardEvent&)>
1090 
1094 
1099 
1102 
1105 
1108 
1111 
1114 
1116  boost::shared_array<unsigned char> data_;
1117 
1119  std::size_t data_size_;
1120 
1122  bool stopped_;
1123 
1126 
1127  // /** \brief Internal blender used to overlay 2D geometry over the image.
1128  // */ vtkSmartPointer<vtkImageBlend> blend_;
1129 
1132 
1135 
1139  std::vector<unsigned char*> image_data_;
1140 
1142  LayerComparator(const std::string& str) : str_(str) {}
1143  const std::string& str_;
1144 
1145  bool operator()(const Layer& layer) {
1146  return (layer.layer_name == str_);
1147  }
1148  };
1149 
1150 public:
1151  PCL_MAKE_ALIGNED_OPERATOR_NEW
1152 };
1153 } // namespace visualization
1154 } // namespace pcl
1155 
std::shared_ptr< core::Tensor > image
std::function< void(std::shared_ptr< core::Tensor >)> callback
int width
int size
std::string name
int height
math::float2 uv
boost::geometry::model::polygon< point_xy > polygon
Definition: TreeIso.cpp:37
An image viewer interactor style, tailored for ImageViewer.
Definition: image_viewer.h:41
static ImageViewerInteractorStyle * New()
ImageViewer is a class for 2D image visualization.
Definition: image_viewer.h:83
vtkSmartPointer< vtkRenderWindow > win_
The render window.
vtkSmartPointer< vtkImageViewer > image_viewer_
The ImageViewer widget.
std::vector< Layer > LayerMap
vtkSmartPointer< vtkCallbackCommand > keyboard_command_
void resetStoppedFlag()
Set the stopped flag back to false.
boost::signals2::connection registerKeyboardCallback(void(T::*callback)(const pcl::visualization::KeyboardEvent &, void *), T &instance, void *cookie=nullptr)
Register a callback function for keyboard events.
Definition: image_viewer.h:505
shared_ptr< const ImageViewer > ConstPtr
Definition: image_viewer.h:86
boost::signals2::connection registerMouseCallback(void(*callback)(const pcl::visualization::MouseEvent &, void *), void *cookie=nullptr)
Register a callback std::function for mouse events.
Definition: image_viewer.h:530
void addMonoImage(const pcl::PointCloud< pcl::Intensity8u >::ConstPtr &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
Definition: image_viewer.h:190
void showRGBImage(const typename pcl::PointCloud< T >::ConstPtr &cloud, const std::string &layer_id="rgb_image", double opacity=1.0)
Show a 2D image on screen, obtained from the RGB channel of a point cloud.
Definition: image_viewer.h:249
std::vector< unsigned char * > image_data_
Internal data array. Used everytime add***Image is called. Cleared, everytime the render loop is exec...
boost::signals2::connection registerKeyboardCallback(void(*callback)(const pcl::visualization::KeyboardEvent &, void *), void *cookie=nullptr)
Register a callback function for keyboard events.
Definition: image_viewer.h:488
vtkSmartPointer< vtkImageSlice > slice_
Global prop. This is the actual "actor".
boost::shared_array< unsigned char > data_
The data array representing the image. Used internally.
int timer_id_
Global timer ID. Used in destructor only.
boost::signals2::signal< void(const pcl::visualization::KeyboardEvent &)> keyboard_signal_
LayerMap layer_map_
Internal list with different 2D layers shapes.
void showMonoImage(const pcl::PointCloud< pcl::Intensity8u >::ConstPtr &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
Show a monochrome 2D image on screen.
Definition: image_viewer.h:177
boost::signals2::signal< void(const pcl::visualization::MouseEvent &)> mouse_signal_
bool stopped_
Set to false if the interaction loop is running.
boost::signals2::connection registerMouseCallback(void(T::*callback)(const pcl::visualization::MouseEvent &, void *), T &instance, void *cookie=nullptr)
Register a callback function for mouse events.
Definition: image_viewer.h:547
vtkSmartPointer< vtkRenderer > ren_
The renderer.
vtkSmartPointer< ExitMainLoopTimerCallback > exit_main_loop_timer_callback_
Callback object enabling us to leave the main loop, when a timer fires.
void close()
Stop the interaction and close the visualizaton window.
Definition: image_viewer.h:584
void addRGBImage(const typename pcl::PointCloud< T >::ConstPtr &cloud, const std::string &layer_id="rgb_image", double opacity=1.0)
Add an RGB 2D image layer, but do not render it (use spin/spinOnce to update).
Definition: image_viewer.h:261
vtkSmartPointer< vtkRenderWindowInteractor > interactor_
shared_ptr< ImageViewer > Ptr
Definition: image_viewer.h:85
std::size_t data_size_
The data array (representing the image) size. Used internally.
void addMonoImage(const pcl::PointCloud< pcl::Intensity >::ConstPtr &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
Add a monochrome 2D image layer, but do not render it (use spin/spinOnce to update).
Definition: image_viewer.h:147
vtkSmartPointer< ImageViewerInteractorStyle > interactor_style_
The interactor style.
vtkSmartPointer< vtkCallbackCommand > mouse_command_
vtkSmartPointer< ExitCallback > exit_callback_
bool wasStopped() const
Returns true when the user tried to close the window.
Definition: image_viewer.h:581
vtkSmartPointer< vtkImageFlip > algo_
Image reslice, used for flipping the image.
void showMonoImage(const pcl::PointCloud< pcl::Intensity >::ConstPtr &cloud, const std::string &layer_id="mono_image", double opacity=1.0)
Show a monochrome 2D image on screen.
Definition: image_viewer.h:134
void setInteractorStyle(vtkInteractorObserver *style)
Set up the interactor style. By default the interactor style is set to vtkInteractorStyleImage you ca...
Definition: image_viewer.h:100
const double * e
GraphType data
Definition: graph_cut.cc:138
normal_z y
normal_z x
std::vector< Pair > Correspondences
Eigen::Array< unsigned char, 3, 1 > Vector3ub
Definition: image_viewer.h:32
static const Vector3ub red_color(255, 0, 0)
static const Vector3ub blue_color(0, 0, 255)
static const Vector3ub green_color(0, 255, 0)
void Execute(vtkObject *, unsigned long event_id, void *) override
void Execute(vtkObject *vtkNotUsed(caller), unsigned long event_id, void *call_data) override
Internal structure describing a layer.
vtkSmartPointer< vtkContextActor > actor