35 #include <ctkPluginContext.h>
58 std::cout <<
"ViewImplService got no viewManager" << std::endl;
80 return viewManager()->
get3DView(group, index);
94 this->
getGroup(0)->setRegistrationMode(mode);
104 CX_LOG_DEBUG() <<
"About to destruct the visualizationservice and viewmanager, making sure timers are stopped.";
145 return this->mClippers;
188 void ViewImplService::onSessionChanged()
191 void ViewImplService::onSessionCleared()
193 viewManager()->
clear();
197 void ViewImplService::onSessionLoad(QDomElement& node)
199 XMLNodeParser root(node);
200 QDomElement viewManagerNode = root.descend(
"managers/viewManager").node().toElement();
201 if (!viewManagerNode.isNull())
202 viewManager()->
parseXml(viewManagerNode);
204 mClippers->parseXml(node);
206 void ViewImplService::onSessionSave(QDomElement& node)
208 XMLNodeAdder root(node);
209 QDomElement managerNode = root.descend(
"managers").node().toElement();
210 viewManager()->
addXml(managerNode);
211 mClippers->addXml(node);
QActionGroup * getInteractorStyleActionGroup()
virtual QWidget * getLayoutWidget(int index)
Get the specified layout widget, NULL if not created.
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
void isLoading(QDomElement &root)
emitted while loading a session. Xml storage is available, getRootFolder() is set to loaded value...
void activeViewChanged()
emitted when the active view changes
boost::shared_ptr< class LayoutRepository > LayoutRepositoryPtr
virtual int getActiveGroupId() const
virtual ViewPtr get3DView(int group=0, int index=0)
void fps(int number)
Emits number of frames per second.
boost::shared_ptr< class VisServices > VisServicesPtr
LayoutRepositoryPtr getLayoutRepository()
virtual InteractiveCropperPtr getCropper()
void fps(int number)
Emits number of frames per second.
virtual CyclicActionLoggerPtr getRenderTimer()
virtual ViewGroupDataPtr getGroup(int groupIdx) const
virtual bool renderingIsEnabled() const
virtual void setRegistrationMode(REGISTRATION_STATUS mode)
virtual QString getActiveLayout(int widgetIndex) const
static VisServicesPtr create(ctkPluginContext *context)
CameraControlPtr getCameraControl()
static SessionStorageServicePtr create(ctkPluginContext *pluginContext)
QWidget * getLayoutWidget(int index)
virtual void centerToImageCenterInActiveViewGroup()
virtual void addDefaultLayout(LayoutData layoutData)
boost::shared_ptr< class View > ViewPtr
void autoShowData(DataPtr data)
boost::shared_ptr< class Navigation > NavigationPtr
void pointSampled(Vector3D p_r)
void sessionChanged()
emitted after change to a new session (new or loaded or cleared)
virtual ~ViewImplService()
void setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx)
virtual void autoShowData(DataPtr data)
virtual NavigationPtr getNavigation()
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
void addXml(QDomNode &parentNode)
boost::shared_ptr< class Data > DataPtr
void parseXml(QDomNode viewmanagerNode)
virtual LayoutRepositoryPtr getLayoutRepository()
virtual ClippersPtr getClippers()
void pointSampled(Vector3D p_r)
boost::shared_ptr< class CyclicActionLogger > CyclicActionLoggerPtr
ViewImplService(ctkPluginContext *context)
virtual void aboutToStop()
QWidget * createLayoutWidget(QWidget *parent, int index)
boost::shared_ptr< class InteractiveCropper > InteractiveCropperPtr
InteractiveCropperPtr getCropper()
void activeViewChanged()
emitted when the active view changes
void setActiveLayout(const QString &uid, int widgetIndex=0)
change the layout
void cleared()
emitted when session is cleared, before isLoading is called
virtual QWidget * createLayoutWidget(QWidget *parent, int index)
Get the specified layout widget, create if necessary.
void activeLayoutChanged()
emitted when the active layout changes
Clipper container. Used by ClippersWidget.
virtual int getActiveViewGroup() const
boost::shared_ptr< class CameraControl > CameraControlPtr
void enableRender(bool val)
CyclicActionLoggerPtr getRenderTimer()
static ViewManagerPtr create(VisServicesPtr backend)
virtual CameraControlPtr getCameraControl()
bool renderingIsEnabled() const
NavigationPtr getNavigation(int group=0)
virtual ViewGroupDataPtr getViewGroup(int groupIdx) const
boost::shared_ptr< class Clippers > ClippersPtr
void activeLayoutChanged()
emitted when the active layout changes
virtual void setCameraStyle(CAMERA_STYLE_TYPE style, int groupIdx)
void isSaving(QDomElement &root)
xml storage is available
virtual void setActiveLayout(const QString &uid, int widgetIndex)
void centerToImageCenterInViewGroup(unsigned groupNr)
virtual void enableRender(bool val)
ViewPtr get3DView(int group=0, int index=0)
void addDefaultLayout(LayoutData layoutData)
void renderingEnabledChanged()
emitted then rendering is enabled/disabled
virtual QActionGroup * getInteractorStyleActionGroup()
QString getActiveLayout(int widgetIndex=0) const
returns the active layout