47 #ifndef _MIRA_VISUALIZATION3DVIEW_H_ 48 #define _MIRA_VISUALIZATION3DVIEW_H_ 74 (
"Description",
"3D view for channel data")
75 (
"Category" ,
"Visualization")
76 (
"Visualization",
"mira::Visualization3D"))
87 destroyVisualizations();
93 template <
typename Reflector>
97 r.property(
"Camera Mode", mCameraMode,
98 setter(&Visualization3DView::setCameraMode,
this),
99 "The view mode of the camera", PERSPECTIVE,
102 r.property(
"Camera", mCameraSettings,
"Camera view", Camera());
104 r.property(
"Background", mBackgroundMode,
setter(&Visualization3DView::setBackgroundMode,
this),
"Background mode", BACKGROUND_GRADIENT,
106 r.property(
"Background Color", mBackgroundColor1,
setter(&Visualization3DView::setBackgroundColor1,
this),
"Solid background color / Top gradient color", Ogre::ColourValue(0.78f,0.86f,1.0f) );
107 r.property(
"Background Gradient Color", mBackgroundColor2,
setter(&Visualization3DView::setBackgroundColor2,
this),
"Bottom gradient color", Ogre::ColourValue(0.90f,0.94f,1.0f) );
109 r.property(
"Render Mode", mRenderMode,
110 setter(&Visualization3DView::setRenderMode,
this),
111 "The view mode of the camera", NORMAL,
114 r.property(
"Stereo Mode", mStereoMode,
115 setter(&Visualization3DView::setStereoMode,
this),
116 "The view mode of the camera", NONE,
118 r.property(
"Stereo Eye Distance", mStereoEyeDistance,
"in meter, >0 for cross view, <0 for parallel view", 0.2f);
120 r.property(
"Show Bounding Boxes", mShowBoundingBoxes,
setter(&Visualization3DView::showBoundingBoxes,
this),
"Show bounding boxes of all objects (for debugging)",
false);
127 r.property(
"SaveContentMinPictureSize", mSaveContentMinPictureSize,
128 "Minimum width or height of the image saved by rendering the viewport at an appropriate resolution.", 2048);
134 QGLWidget* getGLRenderWidget();
136 virtual QImage captureContent();
146 virtual const Class& supportedVisualizationClass()
const;
147 virtual const Class& supportedVisualizationToolClass()
const;
153 void changeLightColor();
154 virtual void changeLightDirection();
155 void changeAmbientLight();
159 virtual QWidget* createVisualizationPart();
161 virtual void resetView();
162 virtual void saveContentToFile();
170 virtual Ogre::SceneManager* getSceneManager();
174 virtual std::set<InteractionListener3D*> getInteractionListeners();
177 return mFixedFrame.getID();
181 return mCameraFrame.getID();
186 virtual const Camera& getCamera()
const;
187 virtual void setCamera(
const Camera& camera);
189 virtual Ogre::Camera* acquireCamera(boost::function<
void()> lostCameraCallback = boost::function<
void()>());
190 virtual void releaseCamera();
194 class RenderModeTechniqueMod;
198 class RenderQueueSorter;
202 friend class RenderModeTechniqueMod;
203 friend class RenderQueueSorter;
205 void setupVisualizations();
211 void populateDefaultVisualizations();
212 void createDefaultVisualization(
const std::string& className,
const std::string& displayName);
243 void setCameraMode(CameraMode mode);
245 void setBackgroundMode(BackgroundMode mode);
246 void setBackgroundColor1(Ogre::ColourValue color);
247 void setBackgroundColor2(Ogre::ColourValue color);
248 void showBoundingBoxes(
bool show=
true);
250 void setRenderMode(RenderMode mode);
251 void setStereoMode(StereoMode mode);
255 ChannelProperty<float> mIntrinsicParamsChannel;
257 CameraMode mCameraMode;
258 Camera mCameraSettings;
260 bool mCameraAcquired;
261 boost::function<void()> mLostCameraCallback;
263 BackgroundMode mBackgroundMode;
264 Ogre::ColourValue mBackgroundColor1;
265 Ogre::ColourValue mBackgroundColor2;
267 RenderMode mRenderMode;
268 StereoMode mStereoMode;
269 float mStereoEyeDistance;
271 bool mShowBoundingBoxes;
273 Ogre::ColourValue mLightColor;
277 boost::mutex mListenerMutex;
278 std::set<InteractionListener3D*> mListeners;
280 uint mSaveContentMinPictureSize;
The interface of a Visualization3DSite.
Definition: Visualization3D.h:84
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
Abstract base class for all derived visualizations, namely Visualization3D and Visualization2D.
Definition: Visualization.h:90
Provides a special setter, that simply sets the value of the member to the given value AND calls a us...
PropertyHint enumeration(const std::string &values)
Sets the attribute "enumeration".
Definition: PropertyHint.h:306
Class for 2D, 3D and N-dimensional points.
#define MIRA_REFLECT_BASE(reflector, BaseClass)
Macro that can be used to reflect the base class easily.
Definition: ReflectorInterface.h:912
Class object which supports some kind of class reflection.
Definition: Class.h:97
Setter< T > setter(void(*f)(const T &))
Creates a Setter for global or static class methods taking the argument by const reference.
Definition: GetterSetter.h:443
const RGB White(1.0f, 1.0f, 1.0f)
virtual const std::string & getFixedFrame() const
Definition: Visualization3DView.h:176
void reflect(Reflector &r)
Definition: Visualization3DView.h:94
Declaration of Visualization3D and related classes.
void changeAmbientLight()
PropertyHint limits(const T &min, const T &max)
Sets both attributes "minimum" and "maximum" to the specified values.
Definition: PropertyHint.h:275
#define MIRA_META_OBJECT(classIdentifier, MetaInfo)
Use this MACRO instead of MIRA_OBJECT if you like to add meta information to your class...
Definition: FactoryMacros.h:204
Use this class to represent time durations.
Definition: Time.h:104
virtual const std::string & getCameraFrame() const
Definition: Visualization3DView.h:180
Listener for mouse events on movable objects in a 3D view.
Definition: InteractionListener3D.h:66
PropertyHint minimum(const T &min)
Sets the attribute "minimum" to the specified value.
Definition: PropertyHint.h:243
Setter< T > setterNotify(T &member, boost::function< void()> notifyFn)
Creates a setter that simply sets the value of the specified member to the given value AND calls a us...
Definition: SetterNotify.h:86
#define MIRA_GUI_VIEWS_EXPORT
Definition: GuiViewsExports.h:61
PropertyHint step(const T &step)
Sets the attribute "step" to the specified value.
Definition: PropertyHint.h:265
Non intrusive reflect for OGRE color class.
Declaration of VisualizationView and VisualizationViewTransformable.
virtual void changeLightDirection()
3D view of a scene that may contain different visualization objects which show the actual content of ...
Definition: Visualization3DView.h:70